summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [asan] set a hard limit on the number of instructions instrumented pear each ↵Kostya Serebryany2012-06-281-0/+12
| | | | | | BB. This is (hopefully temporary) workaround for PR13225 llvm-svn: 159344
* Extend the IL for selecting TLS models (PR9788)Hans Wennborg2012-06-231-1/+1
| | | | | | | | | | | | | | | This allows the user/front-end to specify a model that is better than what LLVM would choose by default. For example, a variable might be declared as @x = thread_local(initialexec) global i32 42 if it will not be used in a shared library that is dlopen'ed. If the specified model isn't supported by the target, or if LLVM can make a better choice, a different model may be used. llvm-svn: 159077
* [asan] instrument cmpxchg and atomicrmwKostya Serebryany2012-05-301-8/+30
| | | | llvm-svn: 157683
* Use zero-based shadow by default on Android.Evgeniy Stepanov2012-05-231-2/+7
| | | | llvm-svn: 157317
* [asan] small optimization: do not emit "x+0" instructions Kostya Serebryany2012-04-271-3/+4
| | | | llvm-svn: 155701
* Fix issue 67 by checking that the interface functions weren't redefined in ↵Alexander Potapenko2012-04-231-4/+18
| | | | | | the compiled source file. llvm-svn: 155346
* [asan] fix one more bug related to long doubleKostya Serebryany2012-03-211-1/+1
| | | | llvm-svn: 153189
* [asan] don't emit __asan_mapping_offset/__asan_mapping_scale by default -- ↵Kostya Serebryany2012-03-191-12/+17
| | | | | | they are currently used only for experiments llvm-svn: 153040
* [asan] rename class BlackList to FunctionBlackList and move it into a ↵Kostya Serebryany2012-03-141-70/+3
| | | | | | separate file -- we will need the same functionality in ThreadSanitizer llvm-svn: 152753
* ASan: use getTypeAllocSize instead of getTypeStoreSize.Evgeniy Stepanov2012-03-021-1/+1
| | | | | | | | | | | | | | | | This change replaces getTypeStoreSize with getTypeAllocSize in AddressSanitizer instrumentation for stack allocations. One case where old behaviour produced undesired results is an optimization in InstCombine pass (PromoteCastOfAllocation), which can replace alloca(T) with alloca(S), where S has the same AllocSize, but a smaller StoreSize. Another case is memcpy(long double => long double), where ASan will poison bytes 10-15 of a stack-allocated long double (StoreSize 10, AllocSize 16, sizeof(long double) = 16). See http://llvm.org/bugs/show_bug.cgi?id=12047 for more context. llvm-svn: 151887
* [asan] unpoison the stack before every noreturn call. Fixes asan issue 37. ↵Kostya Serebryany2012-02-081-2/+17
| | | | | | llvm part llvm-svn: 150102
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-071-2/+1
| | | | llvm-svn: 149967
* reapply the patches reverted in r149470 that reenable ConstantDataArray,Chris Lattner2012-02-051-1/+1
| | | | | | | | | but with a critical fix to the SelectionDAG code that optimizes copies from strings into immediate stores: the previous code was stopping reading string data at the first nul. Address this by adding a new argument to llvm::getConstantStringInfo, preserving the behavior before the patch. llvm-svn: 149800
* Revert Chris' commits up to r149348 that started causing VMCoreTests unit ↵Argyrios Kyrtzidis2012-02-011-1/+1
| | | | | | | | | | | | | | | | | | | test to fail. These are: r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365 llvm-svn: 149470
* eliminate the "string" form of ConstantArray::get, usingChris Lattner2012-01-311-1/+1
| | | | | | ConstantDataArray::getString instead. llvm-svn: 149365
* [asan] fix the ObjC support (asan Issue #33)Kostya Serebryany2012-01-301-13/+21
| | | | llvm-svn: 149300
* Fix compilation of ASan tests on OS X Lion (see ↵Alexander Potapenko2012-01-301-3/+15
| | | | | | | | http://code.google.com/p/address-sanitizer/issues/detail?id=32) The redzones emitted by AddressSanitizer for CFString instances confuse the linker and are of little use, so we shouldn't add them. llvm-svn: 149243
* [asan] correctly use ConstantExpr::getGetElementPtr. Catch by NAKAMURA TakumiKostya Serebryany2012-01-281-1/+1
| | | | llvm-svn: 149172
* [asan] enable asan only for the functions that have Attribute::AddressSafetyKostya Serebryany2012-01-241-0/+1
| | | | llvm-svn: 148846
* Implemented AddressSanitizer::getPassName()Alexander Potapenko2012-01-231-0/+5
| | | | llvm-svn: 148697
* [asan] extend the workaround for http://llvm.org/bugs/show_bug.cgi?id=11395: ↵Kostya Serebryany2012-01-111-1/+1
| | | | | | don't instrument the function at all on x86_32 if it has a large asm blob llvm-svn: 147953
* [asan] cleanup: remove the SIGILL-related code (compiler part)Kostya Serebryany2012-01-061-68/+8
| | | | llvm-svn: 147667
* [asan] add the name of the module to the description of a global variable. ↵Kostya Serebryany2011-12-151-1/+5
| | | | | | This improves the readability of global-buffer-overflow reports. llvm-svn: 146698
* [asan] fix a bug (issue 19) where dlclose and the following mmap caused a ↵Kostya Serebryany2011-12-151-1/+20
| | | | | | false positive. compiler part. llvm-svn: 146688
* [asan] remove .preinit_array from the compiler module (it breaks .so ↵Kostya Serebryany2011-12-141-16/+0
| | | | | | builds). This should be done in the run-time. llvm-svn: 146527
* [asan] report an error if blacklist file contains a malformed regex. fixes ↵Kostya Serebryany2011-12-131-5/+13
| | | | | | asan issue 17 llvm-svn: 146503
* [asan] use .preinit_array only on linuxKostya Serebryany2011-12-121-2/+3
| | | | llvm-svn: 146379
* [asan] call __asan_init from .preinit_array. This simplifies __asan_init vs ↵Kostya Serebryany2011-12-091-0/+15
| | | | | | malloc chicken-and-egg situation on Android and probably on other flavours of Linux. Patch by eugenis@google.com. llvm-svn: 146284
* [asan] two minor fixes: use UnreachableInst after the neverreturn function ↵Kostya Serebryany2011-12-011-2/+3
| | | | | | call; use report_fatal_error when blacklist file can not be found llvm-svn: 145611
* [asan] do not instrument threadlocal globals, this is buggyKostya Serebryany2011-11-231-0/+6
| | | | llvm-svn: 145092
* [asan] workaround for reg alloc bug 11395: don't instrument functions with ↵Kostya Serebryany2011-11-181-0/+13
| | | | | | large chunks of inline assembler llvm-svn: 144962
* quick fix: remove GlobalVariable::GlobalVariable mistakenly commited at ↵Kostya Serebryany2011-11-171-3/+3
| | | | | | r144933. For some reason this compiles on linux llvm-svn: 144936
* fall back to explicit list of allowed linkages when instrumenting globals in ↵Kostya Serebryany2011-11-171-2/+5
| | | | | | asan; add a test check that asan does not touch linkonce_odr llvm-svn: 144933
* AddressSanitizer, first commit (compiler module only)Kostya Serebryany2011-11-161-0/+965
llvm-svn: 144758
OpenPOWER on IntegriCloud