Commit Graph

1182 Commits

Author SHA1 Message Date
Alexey Samsonov 480477c0e1 [ASan] use llvm-symbolizer for ASan lit-style tests on Mac
llvm-svn: 165391
2012-10-08 13:11:18 +00:00
Alexey Samsonov 0111f55eac llvm-symbolizer for Mac: add support for reading DWARF from separate object file in resource directory generated by dsymutil. Fix minor symbol table lookup issues.
llvm-svn: 165389
2012-10-08 10:17:44 +00:00
Dmitry Vyukov 19ba50a8b9 tsan: better message about found races for Go ThreadSanitizer
llvm-svn: 165376
2012-10-07 14:21:24 +00:00
Dmitry Vyukov 90c9cbfed4 tsan: cache pc's that cause suppressions (this way we do not need to symbolize the reports)
llvm-svn: 165317
2012-10-05 15:51:32 +00:00
Alexander Potapenko b4db79fc7d If !asan_inited, call internal versions of libc functions where available.
This is to remove unnecessary #if directives.

llvm-svn: 165307
2012-10-05 12:11:06 +00:00
Dmitry Vyukov 6d5bd599c2 tsan for Go: support mallocs before __tsan_init() (required to support cgo code)
llvm-svn: 165229
2012-10-04 13:54:49 +00:00
Alexander Potapenko d2f6b97417 Avoid calling __asan_init from memcpy(), memmove(), memset() during libSystem initialization.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=117.

llvm-svn: 165227
2012-10-04 13:41:28 +00:00
Alexey Samsonov 3197f8e6cb [ASan] don't build 64-bit runtime on 32-bit Linux platforms
llvm-svn: 165222
2012-10-04 12:22:33 +00:00
Dmitry Vyukov b96a7b5aa5 tsan: add atomic_fetch_sub() and atomic_signal_fence() functions
llvm-svn: 165218
2012-10-04 10:08:23 +00:00
Kostya Serebryany cb13fff13d [asan] properly report mmap failure
llvm-svn: 165214
2012-10-04 07:21:09 +00:00
Bill Wendling 836d53015e I'm getting these errors with r165159:
/Users/void/llvm/llvm-tot.src/projects/compiler-rt/lib/arm/eqdf2vfp.S:22:2: error: instruction requires: VFP2
 vmov d6, r0, r1
 ^
/Users/void/llvm/llvm-tot.src/projects/compiler-rt/lib/arm/eqdf2vfp.S:23:2: error: instruction requires: VFP2
 vmov d7, r2, r3
 ^
/Users/void/llvm/llvm-tot.src/projects/compiler-rt/lib/arm/eqdf2vfp.S:24:2: error: instruction requires: VFP2
 vcmp.f64 d6, d7
 ^
/Users/void/llvm/llvm-tot.src/projects/compiler-rt/lib/arm/eqdf2vfp.S:25:2: error: instruction requires: VFP2
 vmrs apsr_nzcv, fpscr
 ^

llvm-svn: 165191
2012-10-04 01:44:41 +00:00
Bob Wilson 1ff65860e4 Back out my temporary workaround for Apple buildbots.
--- Reverse-merging r164909 into '.':
U    make/platform/clang_darwin.mk

llvm-svn: 165159
2012-10-03 21:03:42 +00:00
Alexander Potapenko 0f0a50da56 Set ASAN_NEEDS_SEGV=0 on Android only.
llvm-svn: 165120
2012-10-03 15:09:17 +00:00
Dmitry Vyukov be6878365d tsan: prepare for migration to new memory_order enum values (ABI compatible)
llvm-svn: 165106
2012-10-03 13:00:13 +00:00
Alexey Samsonov c561ce0e01 Build ASan runtime on Linux for both x86_64 and i386, same as we do with full compiler_rt and libprofile
llvm-svn: 165096
2012-10-03 07:16:31 +00:00
Alexander Potapenko 77c0ac2336 Do not patch the instruction address when symbolizing the reports.
Instead, print the correct address at runtime.

llvm-svn: 165018
2012-10-02 15:42:24 +00:00
Alexey Samsonov 30c01f25f1 [Sanitizer] fix line width
llvm-svn: 165009
2012-10-02 14:09:20 +00:00
Alexey Samsonov 78c340d205 [ASan] Change __asan_set_on_error_callback to weak overridable __asan_on_error, so that ASan would call the latter even if it finds the error early (i.e. during module initialization)
llvm-svn: 165008
2012-10-02 14:06:39 +00:00
Evgeniy Stepanov 49e8576a09 [*San]: handle EINTR.
llvm-svn: 165006
2012-10-02 13:41:40 +00:00
Dmitry Vyukov 56faa551b9 tsan: fix mac build
llvm-svn: 165004
2012-10-02 12:58:14 +00:00
Alexey Samsonov 298e237d7e [ASan] Add extern C for __asan_symbolize on Windows
llvm-svn: 165003
2012-10-02 12:35:42 +00:00
Alexey Samsonov e29c6731aa [Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization.
llvm-svn: 165000
2012-10-02 12:11:17 +00:00
Dmitry Vyukov a2c1c7a78e tsan: wait for pending reports before exit
llvm-svn: 164999
2012-10-02 12:07:16 +00:00
Dmitry Vyukov 27d5b37c38 tsan: output tid's in reports
llvm-svn: 164998
2012-10-02 11:52:05 +00:00
Dmitry Vyukov 0c40a5600c tsan: run output tests in parallel
llvm-svn: 164997
2012-10-02 11:51:40 +00:00
Bob Wilson dda435bcef Temporarily comment out some new arm variants to try to fix buildbots.
llvm-svn: 164909
2012-09-30 05:34:28 +00:00
Bob Wilson a4cefbdc87 Add compiler-rt support for Swift.
llvm-svn: 164903
2012-09-29 23:37:01 +00:00
Bob Wilson 0e039bee0d Add support for iOS6.
llvm-svn: 164902
2012-09-29 23:25:48 +00:00
Alexey Samsonov c3f61d8eec [ASan] Fix unit test headers. Add an option to change substitute asan_test_config.h file
llvm-svn: 164821
2012-09-28 12:24:23 +00:00
Alexey Samsonov 2d9899b2ce [ASan] use llvm-symbolizer (in offline mode) in ASan output tests on Linux
llvm-svn: 164819
2012-09-28 11:05:41 +00:00
Evgeniy Stepanov 9792396a06 [asan] Change defaults for Android target.
This way building without -DASAN_* in CFLAGS produces working binaries.

llvm-svn: 164816
2012-09-28 10:07:53 +00:00
Evgeniy Stepanov cb9cf0f907 Add a missing const qualifier.
llvm-svn: 164773
2012-09-27 13:21:08 +00:00
Evgeniy Stepanov f7f616ba66 Quick fix data/bss detection in TSan.
The old way breaks when a module's bss is adjacent to the [heap] vm area.
Both ways are not very reliable, though.

llvm-svn: 164772
2012-09-27 13:20:40 +00:00
Alexey Samsonov b6879ce94c [TSan] move replacement for new/delete back into tsan_interceptors
llvm-svn: 164764
2012-09-27 09:50:19 +00:00
Alexander Potapenko 3f6a5c1b2d Fixed a number of gpylint warnings, added binary names filtering (useful for Chrome), minor fixes.
llvm-svn: 164695
2012-09-26 13:16:42 +00:00
Alexander Potapenko 59cc8776c4 Encapsulate the main loop into a class to allow reusing it.
llvm-svn: 164694
2012-09-26 12:12:41 +00:00
Alexander Potapenko fa2a964540 Set --use-symbol-table=true as Alexey has already resolved the FIXME.
llvm-svn: 164693
2012-09-26 11:36:14 +00:00
Alexey Samsonov 789d4b2cd0 [TSan] fork external symbolizer before starting internal threads
llvm-svn: 164600
2012-09-25 12:35:47 +00:00
Alexey Samsonov 351d486df0 [TSan] one more attempt to fix sleep_sync test: call sleep in the spawned thread so that sleep-synchronization will be detected even if child thread is started late.
llvm-svn: 164488
2012-09-24 13:35:46 +00:00
Alexey Samsonov 313014694f [TSan] Provide replacements for operators new/delete instead of declaring extern C functions with weirdly mangled names (same strategy is used in ASan).
llvm-svn: 164487
2012-09-24 13:19:47 +00:00
Alexey Samsonov a555b3faf4 [ASan] Apply some ASan-relevant pieces of patch by Ruben Van Boxem. In the same time, remove ASan from CMake build on Windows after conversation with Timur. We don't want to support building ASan on Windows until it is in a working state.
llvm-svn: 164486
2012-09-24 11:43:40 +00:00
Alexey Samsonov 0659f72f7b [TSan] increase sleep time in test to ensure correct event ordering
llvm-svn: 164483
2012-09-24 08:57:41 +00:00
Michael J. Spencer c774095d44 [CMake][tsan] Compile .S files for tsan as C instead of CXX.
Using CXX breaks if you add -stdlib=libc++ to CMAKE_CXX_FLAGS.

llvm-svn: 164422
2012-09-21 22:39:39 +00:00
Alexey Samsonov 9e769a8d59 [Sanitizer] llvm-symbolizer: enable accessing symbol table (libObject is fixed in r164365) and replace string with std::string
llvm-svn: 164367
2012-09-21 10:54:14 +00:00
Eric Christopher 8539af7bbb Both OpenBSD and Bitrig need to include machine/endian.h to get the
_BYTE_ORDER define.

Patch by David Hill.

llvm-svn: 164286
2012-09-20 06:19:20 +00:00
Alexey Samsonov bc0b3f43d1 [ASan] Include ASan into CMake build only on Linux, Mac and Windows
llvm-svn: 164224
2012-09-19 14:15:30 +00:00
Alexey Samsonov 1fba97d22d [TSan] Add tsan to cmake build of compiler-rt only on Linux
llvm-svn: 164217
2012-09-19 13:11:13 +00:00
Alexey Samsonov ea2fb08545 [ASan] make asan_symbolize script work if there is no llvm-symbolizer available
llvm-svn: 164214
2012-09-19 11:43:41 +00:00
Alexey Samsonov 52565d5491 [ASan] fix offline python symbolizer script to use llvm-symbolizer if possible
llvm-svn: 164209
2012-09-19 08:49:53 +00:00
Alexey Samsonov 11b9e97cd9 [ASan] cleanup: fix headers and lint warnings
llvm-svn: 164205
2012-09-19 07:07:46 +00:00