Commit Graph

16 Commits

Author SHA1 Message Date
Axel Naumann
18bd806414 Only check pointers for Decls from writable dirs (ROOT-9377). 2018-06-25 12:59:56 +02:00
Axel Naumann
6f3a95eef2 Doxygen. 2016-04-22 12:29:14 +02:00
Axel Naumann
cec046a44f Dump stack trace when throwing a null deref exception. 2016-04-21 19:14:47 +02:00
Axel Naumann
50bfb01db7 NullDerefProtectionTransformer is not a WrapperTransformer anymore. 2016-04-21 19:14:47 +02:00
Axel Naumann
690d4b0578 Rename ASTTransformer.h -> TransactionTransformer.h. 2015-03-16 15:24:52 +01:00
Axel Naumann
166032069e Emit Decls as DeclCollector sees them.
Now that we can easily revert Transactions' IR (by unloading their
module) we do not need to queue the Decls before emitting them.
This enables EndOfTU actions to be emitted seeminglessly, without
extra transactions, or explicit post-EndOfTU-emission: each
Transaction will have its TU finalized exactly once.

This in turn allows us to turn on Debug emission - which relies on
being invoked exactly once per Module.

Transformers must be invoked before emitting Decls. They are now
invoked for each Decl; WrapperTransformers are invoked when seeing
a wrapper decl. They do not see the "full transaction AST" anymore
- luckily none of our transformers requires this and actually become
simpler because of this change.

This also fixes a bug where the relative sequencing of parsed and
deserialized Decls was lost (parsed was emitted before deserialized).

Remove unused IRTransactions; they should really be llvm::Pass-es.
We don't have them anyway.

Disable a few transformations if the Decl isFromASTFile.

When reverting a Transaction, also revert its nested ones.

In the ValueExtractionSynthesizer, pass the ValuePrinter option as
int, instead of the transaction pointer - that might have changed
(at least its options) by the time we invoke the wrapper.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Explicit paths specified without -i or -o; assuming --only paths...
# rebase in progress; onto b3d9f92
# You are currently splitting a commit while rebasing branch 'declcollector-emits-v2' on 'b3d9f92'.
#
# Changes to be committed:
#	modified:   interpreter/cling/include/cling/Interpreter/RuntimeUniverse.h
#	modified:   interpreter/cling/lib/Interpreter/AutoSynthesizer.cpp
#	modified:   interpreter/cling/lib/Interpreter/AutoSynthesizer.h
#	modified:   interpreter/cling/lib/Interpreter/CheckEmptyTransactionTransformer.cpp
#	modified:   interpreter/cling/lib/Interpreter/CheckEmptyTransactionTransformer.h
#	modified:   interpreter/cling/lib/Interpreter/DeclCollector.cpp
#	modified:   interpreter/cling/lib/Interpreter/DeclCollector.h
#	modified:   interpreter/cling/lib/Interpreter/DeclExtractor.cpp
#	modified:   interpreter/cling/lib/Interpreter/DeclExtractor.h
#	modified:   interpreter/cling/lib/Interpreter/DynamicLookup.cpp
#	modified:   interpreter/cling/lib/Interpreter/DynamicLookup.h
#	modified:   interpreter/cling/lib/Interpreter/IncrementalParser.cpp
#	modified:   interpreter/cling/lib/Interpreter/IncrementalParser.h
#	modified:   interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.cpp
#	modified:   interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.h
#	modified:   interpreter/cling/lib/Interpreter/TransactionTransformer.cpp
#	modified:   interpreter/cling/lib/Interpreter/TransactionTransformer.h
#	modified:   interpreter/cling/lib/Interpreter/TransactionUnloader.cpp
#	modified:   interpreter/cling/lib/Interpreter/ValueExtractionSynthesizer.cpp
#	modified:   interpreter/cling/lib/Interpreter/ValueExtractionSynthesizer.h
#	modified:   interpreter/cling/lib/Interpreter/ValuePrinterSynthesizer.cpp
#	modified:   interpreter/cling/lib/Interpreter/ValuePrinterSynthesizer.h
#
# Untracked files:
#	.idea/
#	0001-Fix-llvm-merge-issue.patch
#	0002-Fix-warnings.patch
#	0003-Keep-weak-symbols-around-subsequent-transactions-mig.patch
#	T.cxx
#	T.cxx~
#	TMVA.root
#	a.out
#	boost.root
#	config/Makefile.depend~
#	core/textinput/src/textinput/TerminalDisplayWin.cpp.orig
#	ct.root
#	data.root
#	interpreter/cling/76fc2055249da7b03148a7d4197a279e9943f012.patch
#	interpreter/cling/lib/Interpreter/CIFactory.cpp~
#	interpreter/cling/lib/Interpreter/DeclCollector.h~
#	interpreter/cling/lib/Interpreter/DynamicLibraryManager.cpp~
#	modulemap-one-header-per-file.txt
#	osrm-routed
#	tiles.tar.bz2
#	tmva_class_example.root
#	tutorials/v3.root
#	weights/
#
2015-03-16 14:58:58 +01:00
Philippe Canal
576ca3ca96 Remove trailing spaces 2014-08-13 16:08:36 +02:00
Axel Naumann
44481ace1e Fix license; remove $Id$ version. 2014-01-07 11:14:04 +01:00
Vassil Vassilev
e92c7da7c3 Use better name. 2013-09-11 13:50:57 +02:00
Vassil Vassilev
5d88b742d2 Remove unused files. 2013-09-11 13:50:57 +02:00
Baozeng Ding
2fe19f6639 Reduce the dependence from the IR. It will be soon replaced by the AST one. 2013-09-09 15:38:51 +02:00
Baozeng Ding
cc877954ae Add support for mangling: How we can check regular C++ functions.
Indirect calls are still an issue.
2013-08-21 11:14:55 +02:00
Baozeng Ding
10602d688f Protect the non-null taking functions like strcmp. 2013-08-14 21:05:55 +02:00
Baozeng Ding
261bedbfe6 Instead of check each load and store instruction, we check the usage of the load instruction. Currently, there are four kinds of instruction that may use a load instruction as its argument: load, store, GEP and call instruction. We instrument these four kinds instruction to check there may be a null pointer dereference. 2013-08-08 17:23:53 +02:00
Baozeng Ding
8e17b5e93e Report the null deref warning through diagnostic engine. 2013-07-27 20:43:03 +02:00
Baozeng Ding
e02eb39090 Add null deref ptr transformer, which instruments the llvm::IR to protect user code at the prompt accidentally dereferencing a null ptr.
Tests coming soon.
2013-07-14 22:27:52 +02:00