summaryrefslogtreecommitdiff
path: root/lib/asan
Commit message (Collapse)AuthorAge
* [asan] Bypass pthread_attr_getdetachstate interceptor in compiler_rt code.Evgeniy Stepanov2013-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194369 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib Alexander Potapenko2013-11-07
| | | | | | | | | | | CMake changes to build the ASan runtime for the iOS simulator. This is a universal library targeting the same architectures as the OSX ASan runtime does, thus the iossim version can't live in the same universal libclang_rt.asan_osx_dynamic.dylib The difference between the OSX and iossim builds is in the -mios-simulator-version-min and -ios_simulator_version_min flags that tell Clang to compile and link iossim code. The iossim runtime can only be built on a machine with both Xcode and the iOS Simulator SDK installed. If xcodebuild -version -sdk iphonesimulator Path returns a nonempty path, it is used when compiling and linking the iossim runtime. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194199 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Use OS-specific matches in the malloc_context_size.cc lit test.Alexander Potapenko2013-11-06
| | | | | | | The top stack frames for operator new and operator delete are different on Linux and Darwin. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194150 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Disable back init-order checker. Make strict_init_order imply ↵Alexey Samsonov2013-11-06
| | | | | | check_initialization_order git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194125 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Make sure slow stack unwinder doesn't return empty stacks.Alexey Samsonov2013-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194107 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Kill use_stack_depot runtime flag and stack trace compression routines.Alexey Samsonov2013-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193868 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Unify summary reporting across all sanitizers.Alexey Samsonov2013-11-01
| | | | | | | | | | | This change unifies the summary printing across sanitizers: now each tool uses specific version of ReportErrorSummary() method, which deals with symbolization of the top frame and formatting a summary message. This change modifies the summary line for ASan+LSan mode: now the summary mentions "AddressSanitizer" instead of "LeakSanitizer". git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193864 91177308-0d34-0410-b5e6-96231b3b80d8
* Consistently use StackTrace::PrintStack in ASan, LSan and MSanAlexey Samsonov2013-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193834 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Make asan_symbolize.py fall back to ASAN_SYMBOLIZER_PATH (which is ↵Alexander Potapenko2013-10-31
| | | | | | used when ASAN_OPTIONS=symbolize=1) if LLVM_SYMBOLIZER_PATH is empty. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193758 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Turn on (non-strict) initialization order checker by default for all ↵Alexey Samsonov2013-10-31
| | | | | | ASan users git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193729 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Maybe fix test failures on lld bots.Evgeniy Stepanov2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193647 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix build.Evgeniy Stepanov2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193635 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Fix build warnings.Evgeniy Stepanov2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193634 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] increase the max malloc size from 8Gb to 64GbKostya Serebryany2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193615 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan/asan: support pthread_setname_np to set thread namesDmitry Vyukov2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193602 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Simplify StackTrace::PrintStack interface: prefer common flags ↵Alexey Samsonov2013-10-29
| | | | | | to turn on/off the symbolization git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193587 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Revert r193501 and properly fix r193448Alexey Samsonov2013-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193522 91177308-0d34-0410-b5e6-96231b3b80d8
* asan/msan: separate different report blocks with new linesDmitry Vyukov2013-10-28
| | | | | | | | this makes the reports consistent with tsan, and much more readable. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193520 91177308-0d34-0410-b5e6-96231b3b80d8
* Work around ASan/Win breakage by r193448Timur Iskhodzhanov2013-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193501 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a CMake option COMPILER_RT_DEBUG for building runtimes with full debug info.Peter Collingbourne2013-10-25
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1984 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193449 91177308-0d34-0410-b5e6-96231b3b80d8
* Overhaul the symbolizer interface.Peter Collingbourne2013-10-25
| | | | | | | | | | | | | | | | | | | | | | This moves away from creating the symbolizer object and initializing the external symbolizer as separate steps. Those steps now always take place together. Sanitizers with a legacy requirement to specify their own symbolizer path should use InitSymbolizer to initialize the symbolizer with the desired path, and GetSymbolizer to access the symbolizer. Sanitizers with no such requirement (e.g. UBSan) can use GetOrInitSymbolizer with no need for initialization. The symbolizer interface has been made thread-safe (as far as I can tell) by protecting its member functions with mutexes. Finally, the symbolizer interface no longer relies on weak externals, the introduction of which was probably a mistake on my part. Differential Revision: http://llvm-reviews.chandlerc.com/D1985 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193448 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept pthread_attr_get*.Evgeniy Stepanov2013-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193405 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce an operator new for LowLevelAllocator, and convert most users to it.Peter Collingbourne2013-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193308 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] ASan can be combined with LSan and UBSan, so export symbol from them ↵Alexey Samsonov2013-10-23
| | | | | | as well. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193245 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure ASan always emits an error summary if it reports an error.Nick Lewycky2013-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193229 91177308-0d34-0410-b5e6-96231b3b80d8
* Runtime support for the indirect function call checker.Peter Collingbourne2013-10-20
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1339 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193060 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] fix stack trace printing on MacKostya Serebryany2013-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192990 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] allocate AsanThreadContext using LowLevelAllocator instead of mmap to ↵Kostya Serebryany2013-10-18
| | | | | | save space git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192980 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] reduce the size of AsanThreadContext by storing the stack trace in ↵Kostya Serebryany2013-10-18
| | | | | | the stack depot git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192979 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] fix compilation of atexit_stats.cc on OSXAlexander Potapenko2013-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192973 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] fix a test on MacKostya Serebryany2013-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192960 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] fix atexit statsKostya Serebryany2013-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192956 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] fix assign_large_valloc_to_global.cc to use the correct header for ↵Alexander Potapenko2013-10-17
| | | | | | valloc() on OSX. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192901 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] fix a failure with ASAN_OPTIONS=verbosity=1:use_sigaltstack=1Kostya Serebryany2013-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192892 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix a deadlock between asan's allocator and lsanKostya Serebryany2013-10-17
| | | | | | | | | | | | | | | | Summary: This fixes a deadlock which happens in lsan on a large memalign-allocated chunk that resides in lsan's root set. Reviewers: samsonov, earthdok Reviewed By: earthdok CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1957 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192885 91177308-0d34-0410-b5e6-96231b3b80d8
* Use configured PYTHON in asan lit tests.Will Dietz2013-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192870 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] introduce run-time flag 'poison_partial' Kostya Serebryany2013-10-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192793 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Remove CallocOverflow32 test from asan_test.Evgeniy Stepanov2013-10-16
| | | | | | | | The same as with MSan, this test behavior depends on ASAN_OPTIONS, and we've got a lit_test that covers this. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192777 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: move verbosity flag to CommonFlagsDmitry Vyukov2013-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192701 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo.Evgeniy Stepanov2013-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192685 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Make test from r192581 Linux-only, as wild memory contents is less ↵Alexey Samsonov2013-10-15
| | | | | | predictable on Mac git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192677 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Support ASan's stack-use-after-return mode in LSan.Sergey Matveev2013-10-14
| | | | | | Treat the fake stack as live memory. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192593 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Improve thread lifetime tracking on POSIX systems.Sergey Matveev2013-10-14
| | | | | | | | Call AsanThread::Destroy() from a late-running TSD destructor. Previously we called it before any user-registered TSD destructors, which caused false positives in LeakSanitizer. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192585 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Don't die with internal ASan error on large buffer overflowsAlexey Samsonov2013-10-14
| | | | | | | | | | | | | | | | | | | | Summary: Out-of-bound access may touch not-yet allocated or already freed and recycled from quarantine chunks. We should treat this situation as a "free-range memory access" and avoid printing any data about that irrelevant chunk (which may be inconsistent). This should fix https://code.google.com/p/address-sanitizer/issues/detail?id=183 Reviewers: kcc Reviewed By: kcc CC: timurrrr, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1893 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192581 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Turn GetStackTrace() into StackTrace::Unwind()Alexey Samsonov2013-10-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192533 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the usage of strip_path_prefix option and make it more consistent ↵Alexey Samsonov2013-10-04
| | | | | | across sanitizers git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191943 91177308-0d34-0410-b5e6-96231b3b80d8
* asan/msan: fix "unused function 'OnExit'" warningDmitry Vyukov2013-10-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191904 91177308-0d34-0410-b5e6-96231b3b80d8
* asan/msan/tsan: move _exit interceptor to common interceptorsDmitry Vyukov2013-10-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191903 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] introduce run-time flag uar_stack_size_log to control the size of ↵Kostya Serebryany2013-09-27
| | | | | | FakeStack; don't crash when the fake stack is exhausted, move some code to .cc file git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191510 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Fix GCD tests by spinning forever in the main thread.Alexander Potapenko2013-09-24
| | | | | | | Since the error is always reported by one of the GCD workers, this will help avoid premature program termination with exit code 0. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191294 91177308-0d34-0410-b5e6-96231b3b80d8