summaryrefslogtreecommitdiffstats
path: root/compiler-rt
Commit message (Collapse)AuthorAgeFilesLines
...
* tsan: don't crash with NULL deref during reportingDmitry Vyukov2014-12-181-1/+3
| | | | | | | | tctx==NULL crash observed during deadlock reporting. There seems to be some bugs in the deadlock detector, but it is still useful to be more robust during reporting. llvm-svn: 224508
* tsan: disable flaky debug checkDmitry Vyukov2014-12-181-2/+3
| | | | | | see the comment for details llvm-svn: 224507
* Do not define CRT_HAS_128BIT for MIPS64Petar Jovanovic2014-12-181-1/+2
| | | | | | | | | | | Do not define it for MIPS64 until its backend supports it. See the bug report [1] for more information. [1] http://llvm.org/bugs/show_bug.cgi?id=20098 Differential Revision: http://reviews.llvm.org/D6703 llvm-svn: 224488
* [ASan] Mark test for -fsized-delete as XFAIL for dynamic runtime.Alexey Samsonov2014-12-171-1/+1
| | | | | | | | -fsized-delete is implemented via weak symbols, and doesn't work properly when malloc/free replacements are provided in shared ASan runtime. llvm-svn: 224474
* [ASan] Add -ldl to linker invocation to lit tests that require it.Alexey Samsonov2014-12-179-20/+24
| | | | | | This fixes these tests under dynamic ASan runtime. llvm-svn: 224473
* Fix obvious cut&paste error on AArch64 Compiler-RT settingsRenato Golin2014-12-171-1/+1
| | | | llvm-svn: 224472
* [ASan] Always build shared ASan runtime on Linux.Alexey Samsonov2014-12-177-65/+105
| | | | | | | | | | | | | | | | | This commit changes the strategy for building shared ASan runtime and the way we test it: - COMPILER_RT_BUILD_SHARED_ASAN CMake option is removed. We now always build shared ASan runtime (it is the default on Android, Windows and Mac, and not the default on Linux and FreeBSD). - Platforms, which use static runtime by default now have "check-asan-dynamic" testsuite. This testsuite contains instrumented unit tests, and ASan lit tests, and runs them with shared ASan runtime. This testsuite is *not* a part of "check-asan" and *not* a part of "check-all", as adding 1000 more test cases, which duplicate existing ones is costly. However, you're welcome to add this command to your buildbot. llvm-svn: 224470
* [sanitizer] add CombinedAllocator::InitIfLinkerInitialized and use it in ↵Kostya Serebryany2014-12-172-7/+25
| | | | | | lsan: speeds up lsan start-up time by ~25% llvm-svn: 224469
* [sanitizer] allow -fsanitize-coverage=N w/ -fsanitize=leak, compiler-rt partKostya Serebryany2014-12-171-0/+6
| | | | llvm-svn: 224464
* [ASan] Move flag parsing logic to asan_flags.cc. NFC.Alexey Samsonov2014-12-176-277/+309
| | | | llvm-svn: 224450
* Revert "Fix test cases given Clang's improved location information."David Blaikie2014-12-172-2/+2
| | | | | | | | | The Clang improevments were reverted due to failures created in an asan bootstrap. This reverts commit r224387. llvm-svn: 224446
* [msan] Stop calling pthread_getspecific in signal handlers.Evgeniy Stepanov2014-12-172-16/+14
| | | | | | | | | | | pthread_getspecific is not async-signal-safe. MsanThread pointer is now stored in a TLS variable, and the TSD slot is used only for its destructor, and never from a signal handler. This should fix intermittent CHECK failures in MsanTSDSet. llvm-svn: 224423
* tsan: add disabled test case for issue 87Dmitry Vyukov2014-12-171-0/+68
| | | | llvm-svn: 224422
* [ASan] Re-structure the allocator code. NFC.Alexey Samsonov2014-12-172-422/+472
| | | | | | | | | | | | | Introduce "Allocator" object, which contains all the bits and pieces ASan allocation machinery actually use: allocator from sanitizer_common, quarantine, fallback allocator and quarantine caches, fallback mutex. This step is a preparation to adding more state to this object. We want to reduce dependency of Allocator on commandline flags and be able to "safely" modify its behavior (such as the size of the redzone) at runtime. llvm-svn: 224406
* Rename asan_allocator2.cc to asan_allocator.ccAlexey Samsonov2014-12-174-4/+4
| | | | llvm-svn: 224396
* [ASan] Introduce SetCanPoisonMemory() function.Alexey Samsonov2014-12-176-13/+31
| | | | | | | | | | SetCanPoisonMemory()/CanPoisonMemory() functions are now used instead of "poison_heap" flag to determine if ASan is allowed to poison the shadow memory. This allows to hot-patch this value in runtime (e.g. during ASan activation) without introducing a data race. llvm-svn: 224395
* Fix test cases given Clang's improved location information.David Blaikie2014-12-162-2/+2
| | | | llvm-svn: 224387
* [asan] trying to fix Mac buildKostya Serebryany2014-12-161-1/+1
| | | | llvm-svn: 224370
* Fix Win build after r224353: void function returning zero.Hans Wennborg2014-12-161-1/+1
| | | | llvm-svn: 224366
* Fixes wrong -march=aarch64 option in compiler-rtRenato Golin2014-12-161-1/+1
| | | | llvm-svn: 224362
* [asan] new flag: hard_rss_limit_mbKostya Serebryany2014-12-1613-18/+138
| | | | llvm-svn: 224353
* internal_stat for mips64Mohit K. Bhakkad2014-12-161-0/+39
| | | | llvm-svn: 224326
* Add an MACOS_VERSION_UNKNOWN_NEWER enum value for OS X versions above 10.10.Kuba Brecka2014-12-162-1/+6
| | | | | | | | We recently had a broken version check because an newer OS X version is treated as MACOS_VERSION_UNKNOWN which is less than all the defined values. Let's have a separate enum value for unknown but newer versions, so the ">=" and "<=" version checks still work even in upcoming OS X releases. Reviewed at http://reviews.llvm.org/D6137 llvm-svn: 224315
* Fix data symbolization with libbacktrace. Patch by Jakub Jelinek!Alexey Samsonov2014-12-163-6/+6
| | | | llvm-svn: 224308
* [ASan] Allow to atomically modify malloc_context_size at runtime.Alexey Samsonov2014-12-165-11/+30
| | | | | | | | | | | | | | | | | | Summary: Introduce __asan::malloc_context_size atomic that is used to determine required malloc/free stack trace size. It is initialized with common_flags()->malloc_context_size flag, but can later be overwritten at runtime (e.g. when ASan is activated / deactivated). Test Plan: regression test suite Reviewers: kcc, eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6645 llvm-svn: 224305
* [asan] introduce __sanitizer_set_death_callback, deprecate ↵Kostya Serebryany2014-12-156-12/+70
| | | | | | __asan_set_death_callback llvm-svn: 224286
* Update lib/profile tests for metadata assembly changeDuncan P. N. Exon Smith2014-12-157-9/+9
| | | | | | | | | Running the upgrade script from PR21532. Hopefully this will unstick compiler-rt bots [1] after r224257. [1]: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_check/181/ llvm-svn: 224276
* profile: Add the relevant parts of lib/profile to cc_kext on darwinJustin Bogner2014-12-151-0/+6
| | | | | | Patch by Lawrence D'Anna. Thanks! llvm-svn: 224270
* [ubsan][arm] supporting misaligned testcaseKumar Sukhani2014-12-151-1/+0
| | | | | | After previous commit: http://reviews.llvm.org/rL224242, misaligned testcase is now supported on ARM also llvm-svn: 224243
* [UBSan][MIPS] Adding support of MIPS64 in UBSan testingKumar Sukhani2014-12-151-2/+2
| | | | | | | | | | On mips64 addresses are 40-bit. Where as a 48 bit address is used in TypeCheck/misaligned.cpp. Using regular expression for that address. reviewed by : samsonov submitted by: sagar llvm-svn: 224242
* [UBSan][MIPS] Adding support for MIPS64Kumar Sukhani2014-12-151-1/+1
| | | | | | | | | No MIPS64 architecture dependant code reviewed by : samsonov submitted by: sagar llvm-svn: 224239
* Update test case with more accurate column information now that Clang ↵David Blaikie2014-12-141-1/+1
| | | | | | produces same llvm-svn: 224222
* Use the newer python syntax for exceptionsJustin Bogner2014-12-132-2/+2
| | | | | | | We've dropped support for python 2.5, so now we can use the forward compatible "except ... as" syntax. llvm-svn: 224181
* [Sanitizer] Introduce Allocator::may_return_null bool flag.Alexey Samsonov2014-12-1214-60/+91
| | | | | | | | | | | | | | | | | | | | Summary: Turn "allocator_may_return_null" common flag into an Allocator::may_return_null bool flag. We want to make sure that common flags are immutable after initialization. There are cases when we want to change this flag in the allocator at runtime: e.g. in unit tests and during ASan activation on Android. Test Plan: regression test suite, real-life applications Reviewers: kcc, eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6623 llvm-svn: 224148
* [Asan] XFAIL the interception_failure_test.cc test on FreeBSDViktor Kutuzov2014-12-121-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D6591 llvm-svn: 224117
* [Asan] Fix the tsd_dtor_leak.cc test to pass on FreeBSDViktor Kutuzov2014-12-121-0/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D6590 llvm-svn: 224116
* [mips] [test] Enable COMPILER_RT_INCLUDE_TESTS for MIPSKumar Sukhani2014-12-123-35/+31
| | | | | | | | Enabling COMPILER_RT_INCLUDE_TESTS and updating tests/sanitizer_allocator_test.cc to remove Allocator64 related tests for MIPS. Reviewed By: samsonov llvm-svn: 224101
* [ASan] Group all flag parsing code together. NFC.Alexey Samsonov2014-12-121-12/+14
| | | | llvm-svn: 224087
* [ASan] Change fake stack and local variables handling.Alexey Samsonov2014-12-112-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the way we get fake stack from ASan runtime (to find use-after-return errors) and the way we represent local variables: - __asan_stack_malloc function now returns pointer to newly allocated fake stack frame, or NULL if frame cannot be allocated. It doesn't take pointer to real stack as an input argument, it is calculated inside the runtime. - __asan_stack_free function doesn't take pointer to real stack as an input argument. Now this function is never called if fake stack frame wasn't allocated. - __asan_init version is bumped to reflect changes in the ABI. - new flag "-asan-stack-dynamic-alloca" allows to store all the function local variables in a dynamic alloca, instead of the static one. It reduces the stack space usage in use-after-return mode (dynamic alloca will not be called if the local variables are stored in a fake stack), and improves the debug info quality for local variables (they will not be described relatively to %rbp/%rsp, which are assumed to be clobbered by function calls). This flag is turned off by default for now, but I plan to turn it on after more testing. llvm-svn: 224063
* [Sanitizer] Don't modify mmap_limit_mb flag in runtime.Alexey Samsonov2014-12-111-6/+3
| | | | | | | Instead, rely on the fact that RAW_CHECK doesn't call mmap(), and we'll be able to print an error message and kill a program. llvm-svn: 224034
* [Sanitizer] Fix report_path functionality:Alexey Samsonov2014-12-115-98/+103
| | | | | | | | | | | | | | | | | | | | | | | Summary: - Make sure mmap() is never called inside RawWrite function. - Wrap a bunch of standalone globals in a ReportFile object. - Make sure accesses to these globals are thread-safe. - Fix report_path functionality on Windows, where __sanitizer_set_report_path() would break program. I've started this yak shaving in order to make "CommonFlags::mmap_limit_mb" immutable. Currently we drop this flag to zero before printing an error message. Test Plan: regression test suite Reviewers: kcc, glider Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6595 llvm-svn: 224031
* [Tsan] Fix the signal_recursive.cc test to pass on systems with high loadsViktor Kutuzov2014-12-112-13/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D6504 llvm-svn: 224030
* tsan: fix Go buildDmitry Vyukov2014-12-111-2/+1
| | | | | | GetRSS is used in Go build. llvm-svn: 224023
* tsan: don't subtract one from fake PCsDmitry Vyukov2014-12-113-6/+7
| | | | | | | These are fake and not actual PCs, more like function IDs. Pass them to external symbolizer untouched. llvm-svn: 224022
* Fix check-asan on Windows by putting lib/clang/... onto PATH (PR21880)Timur Iskhodzhanov2014-12-111-5/+10
| | | | llvm-svn: 224018
* Update ASan/Win test expectations broken by r223508Timur Iskhodzhanov2014-12-103-3/+3
| | | | llvm-svn: 223932
* [sanitizer] Disable compile-time checks for __kernel_old_uid_t size on aarch64.Evgeniy Stepanov2014-12-101-0/+4
| | | | | | Should fix PR21476. llvm-svn: 223925
* builtins: cleanup constant data section selectionSaleem Abdulrasool2014-12-108-58/+14
| | | | | | | | | | Each of the object formats use a different directive for selecting the constant section. Use a macro to avoid the duplication across a number of files. Also correct a small macro mismatch on the Windows case (HIDDEN_DIRECTIVE -> HIDDEN). Patch by Vadim Chugunov! llvm-svn: 223910
* [DD] Don't store the second copy of CommonFlags inside DDFlags.Alexey Samsonov2014-12-102-9/+5
| | | | llvm-svn: 223909
* [CMake] Make sure dd is built as a part of compiler-rt.Alexey Samsonov2014-12-102-23/+4
| | | | | | | Remove unused variables and definitions in CMake files for TSan and DD (deadlock detector). llvm-svn: 223908
OpenPOWER on IntegriCloud