summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2014-02-27[sanitizer] Fix iOS build.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202374 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27tsan: fix internal deadlock detector for external deadlock detectorDmitry Vyukov
we must go deeper! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202365 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27[sanitizer] Sizes and layouts for sanitizers on FreeBSD.Evgeniy Stepanov
Patch by Viktor Kutuzov. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202364 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27[asan] Install asan_device_setup to bin/ when targetting Android.Evgeniy Stepanov
asan_device_setup is a utility that prepares a device to run code built with ASan. Essentially, it installs ASan runtime library into the system. For this reason, it has to be at a predictable relative path from the runtime library itself. We also plan to distribute this utility, packaged with runtime library and maybe llvm-symbolizer, to the users. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202362 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27[asan] Don't disable SEGV handler on Android by default.Evgeniy Stepanov
This is done mostly for consistency, because this setting is normally overridden in cmake. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202359 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26Undef helper macros after using them.Joerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202298 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26Reapply r201910. MSVC gets __func__ defined explicitly, even though itJoerg Sonnenberger
can't build anything here. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202297 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26Support 'q' length modifier in scanf/printf interceptorsAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202268 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26[asan] remove UB (comparison of two unrelated pointers) from a testKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202266 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26[asan] Fix printing of long reports to logcat on Android.Evgeniy Stepanov
__android_log_write has an implicit message length limit. Print one line at a time. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202250 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26[sanitizer] Add a flag to enable/disable report colorization.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202249 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26[asan] asan_device_setup: fix a typo in usage textEvgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202246 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26[asan] Remove .sh extension from asan_device_setup.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202245 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26Revert r201783 until all FreeBSD fixes are submitted.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202244 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26Remove 'tctx->name' from a logical statement since it is a pointer and alwaysRichard Trieu
is converted to a true value. Detected by Clang's improved -Wbool-conversion git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202223 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25[sanitizer] minimal support for recursive locks indeadlock detectorKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202153 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25Update sanitizers' bash scripts.Alexey Samsonov
* Fix bash scripts to work on FreeBSD (patch by Viktor Kutuzov) * Update locations of lit tests in check_lint script. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202145 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25[ASan] Don't set rpath when building ASan runtime libraries.Alexander Potapenko
This should fix the issues with `make check-asan` on OS X. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202144 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25[sanitizer] support pthread_rwlock_rd* in deadlock detectorKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202132 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25[sanitizer] partially support pthread_rwlock_* (no rd* form yet)Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202128 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25[asan] Fix for size_t in Asan's new and delete operators on x64 FreeBSD in ↵Kostya Serebryany
32-bit mode, only for FreeBSD <= 9.2; patch by Viktor Kutuzov git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202124 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25Enable UBSan on FreeBSD. Patch by Viktor Kutuzov.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202122 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25[sanitizer] add support for try_lock in deadlock detectorKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202120 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25[sanitizer] fix epoch handling in deadlock detector (before the fix, we ↵Kostya Serebryany
could have had edges from locks in the previous epoch to locks in the current epoch) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202118 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-24[asan] simplify the code that compute the shadow offset; get rid of two ↵Kostya Serebryany
internal flags that allowed to override it. The tests pass, but still this change might break asan on some platform not covered by tests. If you see this, please submit a fix with a test. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202033 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-24tsan: fix SIGRTMAX handlingDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202022 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-24AdjustStackSizeLinux() is used in Lsan, Tsan and Msan non-Linux-specific ↵Kostya Serebryany
code so it seems it should have more generic name and moved to a common scope. Renamed to AdjustStackSize. Patch by Viktor Kutuzov. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202011 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-24[sanitizer] Interception macros for sanitizers on FreeBSD; patch by Viktor ↵Kostya Serebryany
Kutuzov git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202009 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-24tsan: fix compiler warningDmitry Vyukov
error: address of array 'tctx->name' will always evaluate to 'true' git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202008 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-22Revert "Replace __FUNCTION__ with __func__, the latter being standard ↵Reid Kleckner
C99/C++11." This reverts commit r201910. While __func__ may be standard in C++11, it was only recently added to MSVC in 2013 CTP, and LLVM supports MSVC 2012. __FUNCTION__ may not be standard, but it's *very* portable. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201916 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-21Replace __FUNCTION__ with __func__, the latter being standard C99/C++11.Joerg Sonnenberger
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201910 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-21Introduce CRT_HAS_128BIT, currently for all __LP64__ platforms.Joerg Sonnenberger
Use it to enable the various functions for TI mode. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201909 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-21[tsan] add coarse-grained lock around the DeadlockDetector. We can do better ↵Kostya Serebryany
than that, but that's a start. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201861 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20Add an environment variable to override the default profile output file.Bob Wilson
Also rename the default output file from "pgo-data" to "default.profdata". The ".profdata" suffix is consistent with the name of the new llvm-profdata tool. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201808 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20[FreeBSD] Enable building a few runtime libraries on FreeBSD.Alexey Samsonov
Patch by Viktor Kutuzov! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201783 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20Move config for sanitizer_common tests under test/ for consistencyAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201779 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20[CMake] break dependency between unit tests and runtimes in standalone buildAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201778 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20[asan] Changes to asm instrumentation must be done through the generator script.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201766 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20[asan] Do all calls to __asan_report_* through PLT.Evgeniy Stepanov
This matters when runtime is built as a shared library. Even though calling code is itself part of the same library, these symbols are public and can (theoretically) be interposed. It might be better to declare hidden aliases for asan_report_* and call them directly, but (a) they are (noreturn), so performance does not matter, and (b) it may be potentially less portable. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201764 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[tsan] when printing a mutex, also print its address. Properly print the ↵Kostya Serebryany
deadlock report. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201675 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[asan] A different way of detectinb stack overflow.Evgeniy Stepanov
Instead of checking stack limits that are not well defined for the main thread, we rely on siginfo::si_code and distance from SP. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201673 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[CMake] Introduce COMPILER_RT_INCLUDE_TESTS optionAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201666 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[asan] Improve stack overflow detection.Evgeniy Stepanov
There are more cases when those manifest as an access below SP. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201664 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[asan] Disable asm instrumentation and tests on Mac.Evgeniy Stepanov
Move asm tests to their own file. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201653 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[asan] Fix build on ARM.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201652 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[asan] Added assembly functions for x86/amd64 asan.Evgeniy Stepanov
These are runtime support functions for inline assembly instrumentation. This is a re-submit of r201402. Patch by Yuri Gorshenin. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201650 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[CMake] Rudimentary support for standalone CompilerRT build system.Alexey Samsonov
This change allows to build compiler-rt libraries separately from LLVM/Clang (path to LLVM build directory should be specified at configure time). Running tests is not yet supported. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201647 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[ASan/Win] Add a couple more DLL thunksTimur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201580 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[sanitizer] when reporting a deadlock also report the lock cycleKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201576 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Rename several variablesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201575 91177308-0d34-0410-b5e6-96231b3b80d8