summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-01-27[CMake] Set llvm_tools_dir to LLVM_TOOLS_BINARY_DIR instead of LLVM_TOOLS_DIRAlexey Samsonov
In this way, it should work for both in-LLVM and standalone compiler-rt build. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258991 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27[cfi] Disable vtable diagnostics when no cxxabi.Evgeniy Stepanov
This should fix the build on Mac 10.8 and earlier. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27[sanitizers] using execv instead of execve with null env.Mike Aizatsky
Differential Revision: http://reviews.llvm.org/D16646 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258983 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27[cfi] Fix gcc build.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258977 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27[compiler-rt] list_union() is actually an intersect operation. Rename it.Daniel Sanders
Summary: Given: set(T1 a b c) set(T2 b c d) message("T1=${T1}") message("T2=${T2}") list_union(T3 T1 T2) message("T3=${T3}") cmake emitted: T1=a;b;c T2=b;c;d T3=b;c Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16580 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258916 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27Fix a bug in test case (both ir,fe instr were turned onXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258913 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27Sync up with master fileXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258890 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26[cfi] Exclude __cfi_slowpath_diag from the non-diag rtl.Evgeniy Stepanov
Calls to __cfi_slowpath_diag are only emitted when building with diagnostics, and linking the diag rtl. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26[cfi] Better handling of wild target address.Evgeniy Stepanov
This change enables diagnostics when the target address for a CFI check is out of bounds of any known library, or even not in the limits of the address space. This happens when casting pointers to uninitialized memory. Ubsan code does not yet handle some of these situations correctly, so it is still possible to see a segmentation fault instead of a proper diagnostic message once in a while. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258879 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26[sanitizers] execve & waitpid on mac.Mike Aizatsky
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258874 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26Remove autoconf support for building runtime libraries.Chris Bieneman
Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I am the punishment of God... If [autoconf] had not committed great sins, God would not have sent a punishment like me upon [it]." -Genghis Khan Reviewers: chandlerc, grosbach, bob.wilson, zaks.anna, kubabrecka, samsonov, echristo Subscribers: iains, llvm-commits Differential Revision: http://reviews.llvm.org/D16473 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258863 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26[cfi] Hide runtime implementation in a namespace.Evgeniy Stepanov
Move all internal stuff into namespace __cfi. Remove the double underscore prefix from anything that's now inside the namespace. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258859 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26[cfi] Support for dlopen and dlclose.Evgeniy Stepanov
Add dlopen/dlclose interceptors to update CFI shadow for loaded/unloaded libraries. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258857 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26[sanitizers] extracted process management functionsMike Aizatsky
Differential Revision: http://reviews.llvm.org/D16546 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258849 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25[cfi] Cross-DSO CFI diagnostic mode (compiler-rt part)Evgeniy Stepanov
* add __cfi_slowpath_diag with a 3rd parameter which is a pointer to the diagnostic info for the ubsan handlers. *__cfi_check gets a 3rd parameter as well. * unify vcall/cast/etc and icall diagnostic info format, and merge the handlers to have a single entry point (actually two points due to abort/noabort variants). * tests Note that this comes with a tiny overhead in the non-diag mode: cfi_slowpath must pass 0 as the 3rd argument to cfi_check. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258744 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25[powerpc] make test case as xfailBill Seurer
This test case which worked for a while is now failing again. I was unable to trace the change in status to any particular revision. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258739 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25[PGO] Add a test case covering IR based VP instrumentationXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25[PGO] Add test case covering clang FE based VP instrumentationXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25sync up InstrProfData.h -- typo fixXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258717 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25Revert "[sanitizers] extracted process management functions"Mike Aizatsky
This reverts commit e5b34d5a2bf4c882bc647dd26a8cea2adc76f63c. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258713 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25fixed clang-tidy configMike Aizatsky
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258711 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25[sanitizers] extracted process management functionsMike Aizatsky
Differential Revision: http://reviews.llvm.org/D16542 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258710 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25[asan] Don't use sysconf(_SC_PAGESIZE) on Android.Evgeniy Stepanov
This is broken in the current (post-MNC) master branch. Use EXEC_PAGESIZE instead, the same as on x86 Linux. This change fixes startup crashes in the existing tests on AOSP master. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258706 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22When building without DIA SDK, don't set suppressions.cpp failNico Weber
This test requires llvm-symbolizer to be able to convert a stack address into a function name. It is only able to do this if the DIA SDK was found at cmake time. Add a lit feature for this, and let the test depend on it. See also discussion in D15363. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258545 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21.clang-tidy for sanitizer package to override root llvm styleMike Aizatsky
Summary: sanitizer-common follows Google code style, override clang-tidy config. Differential Revision: http://reviews.llvm.org/D16373 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258449 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21Resubmit test case with more restrictionXinliang David Li
The original submittion triggered a BFD linker bug (2.24) on Aarch64 only. Before the build bot is upgraded to more recent linker, restrict the test to be executed only with gold linker. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258437 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21[MSan] Add a test case for r258339.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258413 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20[MSan] Clear parameters shadow before invoking malloc/free hooks.Alexey Samsonov
MSan runtime is not itself instrumented, so we need to explicitly clear shadow for function arguments before calling user-provided functions from runtime (e.g. we already do this for several interceptors). I'm still crafting a test case that would demonstrate this issue reliably, and will commit it later today. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20[asan] print an additional hint when reporting a container overflowKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20Revert "[coverage] Add a test case to cover coverage testing with comdat"Renato Golin
This reverts commit r258255 and r258274, as it was breaking the AArch64 bot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20[test] Add a short explanation to instrprof-comdat.hVedant Kumar
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258274 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20[coverage] Add a test case to cover coverage testing with comdatXinliang David Li
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19using const instead of constexpr: MSVC troublesMike Aizatsky
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258253 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19[sancov] NFC: simplifying DumpOffsets.Mike Aizatsky
Summary: Extracting GetRangeOffset function before report-on-dump functionality. Differential Revision: http://reviews.llvm.org/D16332 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258211 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19Fix another -Wexpansion-to-defined warning in compiler-rt.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258202 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19Fix -Wexpansion-to-defined warnings in compiler-rt.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258200 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19tsan: add back __tls_get_addr interceptorDmitry Vyukov
Removal of the interceptor broke libtsan interface in gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68824 Add back a simple interceptor. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258119 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-18[asan] Optionally print reproducer cmdline in ASan reports.Maxim Ostapenko
Differential Revision: http://reviews.llvm.org/D16070 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258037 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-17[tsan] Do nothing in ScopedInterceptor's destructor if thr is not inited.Yabin Cui
Summary: It is part of http://reviews.llvm.org/D15301, but missed when I committed that patch. Reviewers: kubabrecka, kcc, eugenis, llvm-commits, dvyukov Differential Revision: http://reviews.llvm.org/D16235 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@258021 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-16Fix stats.cpp test on 32-bit Windows.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257981 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-16Attempt to fix sanitizer-windows bot.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257978 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-16[LSan] Ignore all allocations made inside pthread_create.Alexey Samsonov
Thread stack/TLS may be stored by libpthread for future reuse after thread destruction, and the linked list it's stored in doesn't even hold valid pointers to the objects, the latter are calculated by obscure pointer arithmetic. With this change applied, LSan test suite passes with "use_ld_allocations" flag defaulted to "false". It still requires more testing to check if the default can be switched. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257975 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-16Introduce stats and stats_client libraries.Peter Collingbourne
This is part of a new statistics gathering feature for the sanitizers. See clang/docs/SanitizerStats.rst for further info and docs. Differential Revision: http://reviews.llvm.org/D16176 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257972 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15Re-disable suppressions.cpp on Windows.Nico Weber
See discussion in http://reviews.llvm.org/D15363 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15[tsan] Fix some tiny errors.Yabin Cui
Summary: 1. Fix spell error for sigaction. 2. Make line_length <= 80. Reviewers: llvm-commits, eugenis, kcc, dvyukov Subscribers: tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D16210 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257872 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15[tsan] Store the pointer to ThreadState in TLS slot on Android.Yabin Cui
Summary: 1. Android doesn't support __thread keyword. So allocate ThreadState dynamically and store its pointer in one TLS slot provided by Android. 2. On Android, intercepted functions can be called before ThreadState is initialized. So add test of thr_->is_inited in some places. 3. On Android, intercepted functions can be called after ThreadState is destroyed. So add a fake dead_thread_state to represent all destroyed ThreadStates. And that is also why we don't store the pointer to ThreadState in shadow memory of pthread_self(). Reviewers: kcc, eugenis, dvyukov Subscribers: kubabrecka, llvm-commits, tberghammer, danalbert, srhines Differential Revision: http://reviews.llvm.org/D15301 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257866 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15[tsan] Use internal_sigfillset to replace REAL(sigfillset).Yabin Cui
Summary: Android doesn't intercept sigfillset, so REAL(sigfillset) is null. And we can use internal_sigfillset() for all cases. Reviewers: kcc, eugenis, kubabrecka, dvyukov Subscribers: llvm-commits, tberghammer, danalbert Differential Revision: http://reviews.llvm.org/D15296 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257862 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15Unbreak Windows build.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257860 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15sanitizer_common: C++ify the IntrusiveList iterator interface.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257858 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14[LSan] Add "use_ld_allocations" flag to disable old way of DTLS handling.Alexey Samsonov
This flag allows to disable old way of determining dynamic TLS by filtering out allocations from dynamic linker. This will be eventually superseded by __tls_get_addr interceptor (see r257785), after we: 1) Test it in several supported environments 2) Deal with existing problems (currently we can't find a pointer to DTV which is calloc()-ed in pthread_create). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@257789 91177308-0d34-0410-b5e6-96231b3b80d8