summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 80 colsAlexey Samsonov2013-08-281-3/+4
| | | | llvm-svn: 189473
* DataFlowSanitizer: Implement trampolines for function pointers passed to ↵Peter Collingbourne2013-08-271-3/+77
| | | | | | | | custom functions. Differential Revision: http://llvm-reviews.chandlerc.com/D1503 llvm-svn: 189408
* DataFlowSanitizer: correctly combine labels in the case where they are equal.Peter Collingbourne2013-08-231-1/+1
| | | | llvm-svn: 189133
* 80 colsAlexey Samsonov2013-08-231-3/+3
| | | | llvm-svn: 189091
* DataFlowSanitizer: Replace non-instrumented aliases of instrumented ↵Peter Collingbourne2013-08-221-1/+12
| | | | | | | | functions, and vice versa, with wrappers. Differential Revision: http://llvm-reviews.chandlerc.com/D1442 llvm-svn: 189054
* DataFlowSanitizer: Factor the wrapper builder out to buildWrapperFunction.Peter Collingbourne2013-08-221-20/+33
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1441 llvm-svn: 189053
* DataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".Peter Collingbourne2013-08-221-7/+51
| | | | | | | | | | | | | | | | DFSan changes the ABI of each function in the module. This makes it possible for a function with the native ABI to be called with the instrumented ABI, or vice versa, thus possibly invoking undefined behavior. A simple way of statically detecting instances of this problem is to prepend the prefix "dfs$" to the name of each instrumented-ABI function. This will not catch every such problem; in particular function pointers passed across the instrumented-native barrier cannot be used on the other side. These problems could potentially be caught dynamically. Differential Revision: http://llvm-reviews.chandlerc.com/D1373 llvm-svn: 189052
* DataFlowSanitizer: Add a debugging feature to help us track nonzero labels.Peter Collingbourne2013-08-151-2/+48
| | | | | | | | | | | | | | | | | | Summary: When the -dfsan-debug-nonzero-labels parameter is supplied, the code is instrumented such that when a call parameter, return value or load produces a nonzero label, the function __dfsan_nonzero_label is called. The idea is that a debugger breakpoint can be set on this function in a nominally label-free program to help identify any bugs in the instrumentation pass causing labels to be introduced. Reviewers: eugenis CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1405 llvm-svn: 188472
* DataFlowSanitizer: Instrumentation for memset.Peter Collingbourne2013-08-141-1/+22
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1395 llvm-svn: 188412
* DataFlowSanitizer: greylist is now ABI list.Peter Collingbourne2013-08-141-96/+271
| | | | | | | | | | | | | | | | | | | | | | | | | This replaces the old incomplete greylist functionality with an ABI list, which can provide more detailed information about the ABI and semantics of specific functions. The pass treats every function in the "uninstrumented" category in the ABI list file as conforming to the "native" (i.e. unsanitized) ABI. Unless the ABI list contains additional categories for those functions, a call to one of those functions will produce a warning message, as the labelling behaviour of the function is unknown. The other supported categories are "functional", "discard" and "custom". - "discard" -- This function does not write to (user-accessible) memory, and its return value is unlabelled. - "functional" -- This function does not write to (user-accessible) memory, and the label of its return value is the union of the label of its arguments. - "custom" -- Instead of calling the function, a custom wrapper __dfsw_F is called, where F is the name of the function. This function may wrap the original function or provide its own implementation. Differential Revision: http://llvm-reviews.chandlerc.com/D1345 llvm-svn: 188402
* dfsan: fix lint warningsDmitry Vyukov2013-08-131-2/+2
| | | | llvm-svn: 188293
* DataFlowSanitizer: fix a use-after-free. Spotted by libgmalloc.Peter Collingbourne2013-08-121-1/+4
| | | | llvm-svn: 188216
* Add SpecialCaseList::createOrDie() factory and use it in sanitizer passesAlexey Samsonov2013-08-121-3/+3
| | | | llvm-svn: 188169
* DataFlowSanitizer: Remove unreachable BBs so IR continues to verifyPeter Collingbourne2013-08-091-0/+3
| | | | | | | | under the args ABI. Differential Revision: http://llvm-reviews.chandlerc.com/D1316 llvm-svn: 188113
* Fix ARM build.Peter Collingbourne2013-08-081-1/+1
| | | | llvm-svn: 187944
* DataFlowSanitizer; LLVM changes.Peter Collingbourne2013-08-071-0/+1006
DataFlowSanitizer is a generalised dynamic data flow analysis. Unlike other Sanitizer tools, this tool is not designed to detect a specific class of bugs on its own. Instead, it provides a generic dynamic data flow analysis framework to be used by clients to help detect application-specific issues within their own code. Differential Revision: http://llvm-reviews.chandlerc.com/D965 llvm-svn: 187923
OpenPOWER on IntegriCloud