Commit Graph

1595 Commits

Author SHA1 Message Date
Dmitry Vyukov 42230ae216 tsan: add io_sync flag that controls amount of IO synchronization
llvm-svn: 170427
2012-12-18 12:20:55 +00:00
Dmitry Vyukov 9c7bcfea6f tsan: remove TSAN_OPTIONS from the script
The runtime skips atexit sleep if there are no threads now,
so it must be fast w/o it.
Allows to specify own TSAN_OPTIONS for the tests.

llvm-svn: 170426
2012-12-18 12:19:50 +00:00
Alexey Samsonov f37c45c20d [Sanitizer] Expose StackTrace::GetPreviousInstructionPc() to get PC of call instruction from return address
llvm-svn: 170424
2012-12-18 09:57:34 +00:00
Richard Smith 7e45562ad0 ubsan: Demangle class names, and be more informative when a reinterpret_cast
has got us to the wrong offset within an object.

llvm-svn: 170423
2012-12-18 09:30:21 +00:00
Kostya Serebryany bad01549b6 [asan] add some colors to asan output if printing to tty (following ubsan)
llvm-svn: 170418
2012-12-18 07:32:16 +00:00
Dmitry Vyukov 6d315cbcc3 tsan: describe "file descriptor" location
llvm-svn: 170417
2012-12-18 06:57:34 +00:00
Richard Smith cf56ebd52a ubsan: When diagnosing something wrong somewhere in memory, emit a note
pointing at the bad location and a snippet of nearby memory values. This is
strictly best-effort; reading these bytes to display the note could lead to a
seg fault, and that's explicitly OK.

llvm-svn: 170415
2012-12-18 06:30:32 +00:00
Richard Smith 54fc2370f9 Don't escape %s in printf usage message; it's not written by printf.
llvm-svn: 170413
2012-12-18 05:49:49 +00:00
Richard Smith 52987120f9 ubsan: if the frontend didn't provide us with a source location, try to work
one out from the return address. Currently, we can only resolve this address to
a file and line number if we have an external symbolizer.

llvm-svn: 170407
2012-12-18 04:23:18 +00:00
Richard Smith 37a913ae8f Rein ubsan's vptr sanitizer back a bit. Per core issue 453, binding a reference
to an object outside its lifetime does not have undefined behavior.

llvm-svn: 170388
2012-12-18 00:23:12 +00:00
Dmitry Vyukov 09b0dbfaf9 tsan: say what thread had created a thread in reports
llvm-svn: 170346
2012-12-17 16:28:15 +00:00
Kostya Serebryany d6aec5a8e0 [asan] asan_allocator2: implement malloc_usable_size and fix 32-bit
llvm-svn: 170339
2012-12-17 14:57:25 +00:00
Kostya Serebryany ec339f70d6 [asan] asan_allocator2: don't use TLS and fix calloc
llvm-svn: 170329
2012-12-17 13:43:47 +00:00
Kostya Serebryany 1aae0e67fa [asan] asan_alocator2: implement quarantine and Reallocate
llvm-svn: 170315
2012-12-17 09:06:25 +00:00
Kostya Serebryany 41ffe3db59 [asan] implement AsanChunkFifoList via IntrusiveList<AsanChunk>
llvm-svn: 170313
2012-12-17 07:54:29 +00:00
Kostya Serebryany c510015419 [asan] asan_alocator2: implement free() stacks and actually make malloc/free stacks work
llvm-svn: 170310
2012-12-17 06:31:53 +00:00
Kostya Serebryany c8208c5258 [sanitizer] fix a bug that has crept into the sanitizer allocator and caused SEGV on allocations between 1Mb and 2Mb, improve the test
llvm-svn: 170274
2012-12-15 18:36:23 +00:00
Dmitry Vyukov 38d0b60fb9 tsan: synchronize connect->accept calls
llvm-svn: 170235
2012-12-14 20:01:58 +00:00
Alexey Samsonov 6a68a9117b [Sanitizer] remove extra typename
llvm-svn: 170208
2012-12-14 15:37:35 +00:00
Dmitry Vyukov 5a3d15c126 tsan: add test for errno spoiling in signal handler
llvm-svn: 170207
2012-12-14 14:42:40 +00:00
Kostya Serebryany 673c052631 [sanitizer] add AllocatorLeakTest
llvm-svn: 170206
2012-12-14 14:20:29 +00:00
Dmitry Vyukov be6005a0d5 tsan: add test for malloc/free in signal handler
llvm-svn: 170205
2012-12-14 13:56:27 +00:00
Evgeniy Stepanov fb37510e96 Add MemorySanitizer.cpp to the lint script.
llvm-svn: 170204
2012-12-14 13:48:55 +00:00
Dmitry Vyukov 51b6e07deb tsan: fix lint warning
llvm-svn: 170202
2012-12-14 13:46:03 +00:00
Kostya Serebryany 025d64a1b9 [asan] more asan_allocator2 code: record the allocation stack trace, implement calloc/etc
llvm-svn: 170193
2012-12-14 13:16:19 +00:00
Dmitry Vyukov 5b375d84c0 tsan: fix build
llvm-svn: 170191
2012-12-14 12:24:11 +00:00
Kostya Serebryany 7dfb168eb8 [asan] more asan_allocator2 code: actually un/poison shadow on malloc/free
llvm-svn: 170190
2012-12-14 12:15:09 +00:00
Alexey Samsonov cd1e68ebb1 [Sanitizer] use INTERCEPT_FUNCTION(foo) instead of CHECK(INTERCEPT_FUNCTION(foo)) - this check may fail on Linux if user program defines its own version of library function foo
llvm-svn: 170189
2012-12-14 11:52:02 +00:00
Dmitry Vyukov 34aef74a4d tsan: disable allocator tests in debug build
llvm-svn: 170187
2012-12-14 10:17:22 +00:00
Dmitry Vyukov ed6d54368c tsan: comment out debug output in test
llvm-svn: 170186
2012-12-14 10:12:14 +00:00
Dmitry Vyukov 714accd917 tsan: add sanity test for Go runtime into presubmit test
llvm-svn: 170185
2012-12-14 10:10:57 +00:00
Dmitry Vyukov e0c37640f7 tsan: add socketpair() interceptor and test
llvm-svn: 170184
2012-12-14 09:57:42 +00:00
Dmitry Vyukov 12ae8897e6 tsan: fix compilation with -pedantic
llvm-svn: 170131
2012-12-13 15:26:04 +00:00
Kostya Serebryany bb69879d09 [asan] pop the internal stack frames in SlowUnwindStack, extend the test to check this
llvm-svn: 170124
2012-12-13 12:31:55 +00:00
Alexey Samsonov 506b97d61e [Sanitizer] disable lint check for line length in ASan output tests
llvm-svn: 170123
2012-12-13 12:09:47 +00:00
Kostya Serebryany 704c1cb23a [asan] extend overflow-in-qsort.cc to check both unwind kinds. One more test for SlowUnwind. Move both to Linux dir (no slow unwind on Mac)
llvm-svn: 170122
2012-12-13 11:47:49 +00:00
Alexey Samsonov 78ba6c1b37 [ASan] Allow leading underscore in function name to please output tests on Mac
llvm-svn: 170121
2012-12-13 11:11:28 +00:00
Alexey Samsonov 340de607a3 [ASan] don't print memory stats on CheckFailed
llvm-svn: 170120
2012-12-13 11:09:26 +00:00
Kostya Serebryany 060bfab568 [asan] fix win build
llvm-svn: 170119
2012-12-13 10:03:50 +00:00
Kostya Serebryany 6852bce2f2 [asan] fix mac build
llvm-svn: 170118
2012-12-13 10:01:20 +00:00
Kostya Serebryany baf583c443 [asan] add two asan flags: fast_unwind_on_fatal and fast_unwind_on_malloc to allow using the slow CFI-based unwinder
llvm-svn: 170117
2012-12-13 09:34:23 +00:00
Dmitry Vyukov 3533f76996 tsan: completely disable deadlock detector for Go
seems to cause some weird stack overflow

llvm-svn: 170116
2012-12-13 09:22:11 +00:00
Alexey Samsonov 5a26e1fbf2 [Sanitizer] Add new header - sanitizer_platform_interceptors.h, which should define whether or not given function should be intercepted on a given platform.
llvm-svn: 170115
2012-12-13 08:50:16 +00:00
Alexey Samsonov 447e2f2f19 [ASan] one more macro for 'read' interception
llvm-svn: 170114
2012-12-13 08:36:13 +00:00
Dmitry Vyukov 3e7ede230f tsan: support MapThreadTrace() on all platforms
llvm-svn: 170113
2012-12-13 08:14:02 +00:00
Alexey Samsonov 65c14f5314 [ASan] more macro for conditional interception of pread functions
llvm-svn: 170112
2012-12-13 08:10:23 +00:00
Kostya Serebryany ad81738822 [asan] add asan/lit_tests/overflow-in-qsort.cc (not fully working yet)
llvm-svn: 170111
2012-12-13 08:05:03 +00:00
Richard Smith 177f80376d ubsan unit tests for -fsanitize=bool and -fsanitize=enum.
llvm-svn: 170109
2012-12-13 07:12:20 +00:00
Richard Smith 32952215b6 ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads of
bit-patterns which are not valid values for enumerated or boolean types.
These checks are the ubsan analogue of !range metadata.

llvm-svn: 170107
2012-12-13 07:00:14 +00:00
Kostya Serebryany 07bb3925b0 [sanitizer] replace size_t with SIZE_T in interceptors (same for ssize_t, off_t and off64_t). This is done to avoid confusion and to make the code work with compilers that define size_t w/o any includes (MSVC)
llvm-svn: 170103
2012-12-13 06:31:40 +00:00
Kostya Serebryany a167087571 [asan] fix windows build
llvm-svn: 170101
2012-12-13 05:51:02 +00:00
Kostya Serebryany 9806628792 [sanitizer] introduce MmapFixedOrDie and use it in SizeClassAllocator64
llvm-svn: 170099
2012-12-13 05:36:00 +00:00
Kostya Serebryany eec22a628b [asan] fix the Android build (pread64 interceptor again)
llvm-svn: 170098
2012-12-13 05:27:08 +00:00
Kostya Serebryany 2ce42e0aef [sanitizer] change the way SizeClassAllocator64 allocated memory from the system: instead of one huge mmap(NORESERVE) it does one huge mprotect and then does small on-demand mmaps. This allows us to call OnMap callbacks which are required to poison newly allocated memory in asan
llvm-svn: 170097
2012-12-13 05:05:11 +00:00
Alexander Potapenko d27e4861bf [ASan] Fix test expectations for strcat/strncat.
llvm-svn: 169987
2012-12-12 16:10:46 +00:00
Kostya Serebryany e29883c10a [sanitizer] add OnMap/OnUmap callbacks to the allocator interface
llvm-svn: 169985
2012-12-12 14:32:18 +00:00
Kostya Serebryany c219f6c777 [tsan] fix cmake build
llvm-svn: 169982
2012-12-12 14:26:06 +00:00
Dmitry Vyukov 7d95323047 tsan: explain why pthread_cond_init() interceptor is commented out
llvm-svn: 169975
2012-12-12 13:11:44 +00:00
Alexander Potapenko dab1a61011 [ASan] Enhance OOB tests to check for access type (read or write).
llvm-svn: 169974
2012-12-12 12:59:47 +00:00
Dmitry Vyukov 9ba0f3d51c tsan: add comment to tsan_fd.h file
llvm-svn: 169973
2012-12-12 12:45:07 +00:00
Alexander Potapenko 602a09fa52 [ASan] Fixed a compiler warning.
llvm-svn: 169972
2012-12-12 12:32:57 +00:00
Dmitry Vyukov 9190a036d7 tsan: add missing files
llvm-svn: 169971
2012-12-12 12:27:00 +00:00
Dmitry Vyukov 60c14ce625 tsan: more precise handling of IO synchronization
llvm-svn: 169970
2012-12-12 11:59:30 +00:00
Alexander Potapenko ada2fbd2d4 [ASan] fix compilation on Mac.
llvm-svn: 169969
2012-12-12 11:52:26 +00:00
Kostya Serebryany 28a32c89e9 [asan] fix android build and lint
llvm-svn: 169968
2012-12-12 11:37:23 +00:00
Evgeniy Stepanov 4e772db66a [msan] Remove an extra semicolon.
llvm-svn: 169967
2012-12-12 10:50:48 +00:00
Kostya Serebryany 9a58d399c7 [asan] add sanitizer_common/sanitizer_common_interceptors.h with pread/pread64/read interceptors. Use it in asan. Add asan tests for pread/etc. Add FIXME to tsan/msan interceptors
llvm-svn: 169966
2012-12-12 09:54:35 +00:00
Kostya Serebryany 90a59fafc0 [asan] more code for asan_allocator2: basic Allocate/Deallocate code
llvm-svn: 169864
2012-12-11 14:41:31 +00:00
Evgeniy Stepanov 83f05bf960 Add MemorySanitizer runtime to check_lint.sh.
llvm-svn: 169861
2012-12-11 12:52:38 +00:00
Evgeniy Stepanov 375aec7476 [msan] Add a missing file from r169858.
llvm-svn: 169860
2012-12-11 12:44:43 +00:00
Evgeniy Stepanov c5033786ba [msan] MemorySanitizer runtime.
Initial commit of the MemorySanitizer runtime library.

llvm-svn: 169858
2012-12-11 12:27:27 +00:00
Timur Iskhodzhanov 4c97604415 ASan: fix lint problems introduced
llvm-svn: 169857
2012-12-11 12:24:41 +00:00
Timur Iskhodzhanov 9b1d42a2a9 Hopefully fix the Windows build (2)
llvm-svn: 169856
2012-12-11 12:23:00 +00:00
Timur Iskhodzhanov aacd3d79b1 Hopefully fix the Windows build by not including intrin.h
llvm-svn: 169855
2012-12-11 12:03:06 +00:00
Kostya Serebryany 5e2a7acdbe [asan] more sceleton code for asan_allocator2
llvm-svn: 169836
2012-12-11 09:02:36 +00:00
Kostya Serebryany 54af660d2c [asan] fix the Windows build
llvm-svn: 169828
2012-12-11 07:27:59 +00:00
Kostya Serebryany 3ba26fe553 [asan] make ThreadNamesTest more flexible
llvm-svn: 169822
2012-12-11 06:23:10 +00:00
Alexander Potapenko af5a108ea8 [ASan] Typo fix in memcpy() and memmove() interceptors: ASAN_WRITE_RANGE and ASAN_READ_RANGE were swapped.
This has been spotted by Anna Zaks (ganna@apple.com)

llvm-svn: 169736
2012-12-10 16:02:13 +00:00
Kostya Serebryany 13bdbe698e [asan] move FakeStack into a separate file
llvm-svn: 169734
2012-12-10 14:19:15 +00:00
Kostya Serebryany 14282a91d5 [asan] introduce asan_allocator2.cc, which will have the replacement for asan allocator (now, just a bit of boilerplate)
llvm-svn: 169733
2012-12-10 13:52:55 +00:00
Alexander Potapenko 1746f555ee Add a libsanitizer API __sanitizer_sandbox_on_notify(void* reserved), which should be used by
the client programs to notify the tools that sandboxing is about to be turned on.

llvm-svn: 169732
2012-12-10 13:10:40 +00:00
Dmitry Vyukov 1046031e1a tsan: exclude flaky test
llvm-svn: 169729
2012-12-10 09:16:17 +00:00
Alexey Samsonov f0e638c6df ASan: fix interface-symbols test on Mac by explicitly listing all weak functions
llvm-svn: 169660
2012-12-08 01:12:12 +00:00
Alexey Samsonov 5aa36def74 ASan: use new option -fsanitize-blacklist in output tests
llvm-svn: 169646
2012-12-07 22:21:21 +00:00
Alexey Samsonov a0e4706fe6 ASan: change the strategy we use for installing malloc/free/symbolization hooks on Linux: don't provide a default no-op implementations for hooks in runtime, and optionally call hooks if they are provided by the user. Don't force weak interface functions into runtime.
llvm-svn: 169641
2012-12-07 22:01:28 +00:00
David Blaikie a00d9caa8f Unbreak the C++98 build.
llvm-svn: 169636
2012-12-07 21:39:54 +00:00
Dmitry Vyukov 54b87409b4 tsan: even more fd interceptors + fixes
llvm-svn: 169628
2012-12-07 19:23:59 +00:00
Dmitry Vyukov 04580518ce tsan: more fd interceptors + bug fixes + tests
llvm-svn: 169621
2012-12-07 18:30:40 +00:00
Kostya Serebryany 40bac5b01f [asan] fix lint, remove debug prints
llvm-svn: 169620
2012-12-07 18:07:52 +00:00
Alexey Samsonov fa94fa52ad ASan: intercept prctl on Linux only
llvm-svn: 169616
2012-12-07 17:54:38 +00:00
Dmitry Vyukov 0ef99e2a48 tsan: fix pipe interceptors and add 2 tests
llvm-svn: 169607
2012-12-07 16:22:54 +00:00
Dmitry Vyukov 3a2046b3a6 tsan: fix lint warnings
llvm-svn: 169606
2012-12-07 16:20:06 +00:00
Dmitry Vyukov 4e7c0f95fb tsan: add pipe interceptors
llvm-svn: 169602
2012-12-07 15:32:56 +00:00
Kostya Serebryany e7108227ca [asan] intercept prctl(PR_SET_NAME) and set the thread name. Output the thread names (if non-empty) in asan reports
llvm-svn: 169601
2012-12-07 15:15:01 +00:00
Dmitry Vyukov 5f4ab30be0 tsan: refactoring is preparation to more precise fd synchronization handling
llvm-svn: 169600
2012-12-07 14:40:10 +00:00
Kostya Serebryany 35f9e5e87b [sanitizer] implement SanitizerSetThreadName/SanitizerGetThreadName. Just for linux so far (using prctl(PR_GET_NAME))
llvm-svn: 169598
2012-12-07 11:27:24 +00:00
Evgeniy Stepanov 5d2d761ad6 Switch to r83 of cpplint.
Ubuntu Precise compatibility.

llvm-svn: 169597
2012-12-07 11:00:14 +00:00
Kostya Serebryany 52a3b92abd [sanitizer] try not to use libc mem* functions in sanitizer_common tests (conflicts with our own interceptors)
llvm-svn: 169595
2012-12-07 10:13:10 +00:00
Kostya Serebryany 378f93e804 [sanitizer] fix the build on ancient gcc which has stricter rules about what can be put on TLS. Long term, we absolutely must build the run-times with the fresh target clang
llvm-svn: 169593
2012-12-07 09:40:17 +00:00
Dmitry Vyukov 5e700abc1c tsan: deflake output tests (by increasing sleeps)
llvm-svn: 169592
2012-12-07 09:24:57 +00:00
Alexey Samsonov a152d1b20d arcconfig for compiler-rt
llvm-svn: 169575
2012-12-07 02:11:47 +00:00
Kostya Serebryany 6986550c7d [sanitizer] POD-ify the allocator cache
llvm-svn: 169514
2012-12-06 16:22:04 +00:00
Dmitry Vyukov e3e0557f19 tsan: fix lint warning and make output tests more robust
llvm-svn: 169511
2012-12-06 15:42:54 +00:00
Kostya Serebryany 6d2d30f61d [asan/msan] one more test for 32-bit allocator + minor code simplification
llvm-svn: 169507
2012-12-06 14:39:41 +00:00
Kostya Serebryany c14ae88b08 [asan/msan] add BulkAllocate to the 32-bit allocator (and a test)
llvm-svn: 169506
2012-12-06 14:27:32 +00:00
Kostya Serebryany 0f67d01031 [asan/msan] refactor allocator's BulkAllocate (move to AllocatorFreeList)
llvm-svn: 169503
2012-12-06 13:34:11 +00:00
Dmitry Vyukov 6ee2cde066 tsan: add new file to cmake
llvm-svn: 169502
2012-12-06 13:32:49 +00:00
Dmitry Vyukov 72064188bc tsan: add some more functions for java filtering
llvm-svn: 169501
2012-12-06 13:20:37 +00:00
Kostya Serebryany 9f84eecc9e [asan/msan] add GetBlockBegin to the 32-bit allocator (+test)
llvm-svn: 169499
2012-12-06 13:13:58 +00:00
Kostya Serebryany 2731cb23b1 [asan/msan] one more test for 32-bit allocator
llvm-svn: 169497
2012-12-06 13:00:11 +00:00
Kostya Serebryany 2044135dca [asan/msan] new 32-bit allocator, basic functionality so far
llvm-svn: 169496
2012-12-06 12:49:28 +00:00
Dmitry Vyukov fd1ba2af7d tsan: add 'free' to java nonsense reports
llvm-svn: 169494
2012-12-06 12:42:53 +00:00
Dmitry Vyukov fd5ebcd1b0 tsan: add mutexsets to reports
With this change reports say what mutexes the threads hold around the racy memory accesses.

llvm-svn: 169493
2012-12-06 12:16:15 +00:00
Bill Wendling f9528843d2 Remove unused variable.
llvm-svn: 169485
2012-12-06 07:43:17 +00:00
Kostya Serebryany 1e3d387459 [tsan] add MmapAlignedOrDie
llvm-svn: 169474
2012-12-06 06:10:31 +00:00
Kostya Serebryany 86975ce3fb [asan] drop the extension from asan tests (as the extension may be different)
llvm-svn: 169392
2012-12-05 17:56:54 +00:00
Kostya Serebryany 1a6f4d4ba6 [asan] undo the debug printf
llvm-svn: 169381
2012-12-05 13:39:29 +00:00
Dmitry Vyukov d413d8cfa9 tsan: fix memory barriers in atomics
llvm-svn: 169379
2012-12-05 13:14:55 +00:00
Dmitry Vyukov c446aa039a tsan: provide own implementation of __cxa_guard_xxx functions
that way we allow static linking of libstdc++

llvm-svn: 169376
2012-12-05 12:10:22 +00:00
Dmitry Vyukov 6411bd9877 tsan: remove unnecesary include file
llvm-svn: 169370
2012-12-05 10:16:17 +00:00
Dmitry Vyukov dd95cd148b tsan: fix lint warnings
llvm-svn: 169369
2012-12-05 10:16:02 +00:00
Kostya Serebryany 571232b8cf [tsan] get rid of *allocator64* files, moving everything to *allocator* files. This will help with the 32-bit allocator implementation and testing
llvm-svn: 169368
2012-12-05 10:09:15 +00:00
Kostya Serebryany 0afbb325b6 [tsan] make the 64-bit allocator build (but not work) in 32-bit mode to simplify the code and test structure and allow further refactoring
llvm-svn: 169361
2012-12-05 07:11:47 +00:00
Alexander Potapenko 0a4e0f6d35 Fix a use-after-unmap bug in /proc/self/maps caching. The cached buffer was occasionally deleted in the MemoryMappingLayout destructor.
llvm-svn: 169335
2012-12-04 23:30:00 +00:00
Dmitry Vyukov 1b46993598 tsan: output thread names
llvm-svn: 169279
2012-12-04 15:46:05 +00:00
Kostya Serebryany 242b6305f0 [tsan] add a compile-time error for 64-bit-only support
llvm-svn: 169275
2012-12-04 15:13:30 +00:00
Dmitry Vyukov 4b82b2bb6e tsan: make atomic operations atomic again
llvm-svn: 169273
2012-12-04 14:50:10 +00:00
Kostya Serebryany 7436d95c9c [tsan] test the allocator with CompactSizeClassMap
llvm-svn: 169270
2012-12-04 14:39:51 +00:00
Kostya Serebryany f299288f55 [tsan] minor interface refactoring
llvm-svn: 169267
2012-12-04 14:15:17 +00:00
Dmitry Vyukov 4ef6b2bd03 tsan: fix nand operation
llvm-svn: 169266
2012-12-04 14:08:39 +00:00
Dmitry Vyukov 01ea653166 tsan: add __attribute__((visibility("default"))) to interface functions
llvm-svn: 169265
2012-12-04 14:01:21 +00:00
Kostya Serebryany 5e6f833bdd [tsan] refactor the allocator tests to allow testing other flavours of the allocator (add templates)
llvm-svn: 169264
2012-12-04 13:59:22 +00:00
Dmitry Vyukov 55b47cad33 tsan: fix trace handling when trace is reused between threads
llvm-svn: 169259
2012-12-04 12:19:53 +00:00
Kostya Serebryany 077f88045e [tsan] refactoring and comment changes in sanitizer_common/sanitizer_allocator{,64}.h. No functionality change
llvm-svn: 169234
2012-12-04 07:54:41 +00:00
Dmitry Vyukov 0d677279f6 tsan: better error message if we fail to intercept some function
currently the message is SIGSEGV

llvm-svn: 169231
2012-12-04 07:28:25 +00:00
Dmitry Vyukov d229abe49a tsan: check if PWD env var is absent
On some programs I see:
failed to open suppressions file '<null>/testing/tsan/v2/tsan.supp'

llvm-svn: 169230
2012-12-04 07:27:32 +00:00
Alexander Potapenko 0dcd6d9468 [ASan] Do not build the interceptors that use ObjC blocks if the compiler does not support blocks.
Need to define MISSING_BLOCKS_SUPPORT in this case at buildtime.

Patch by Jack Howarth <howarth@bromo.med.uc.edu>
 

llvm-svn: 169206
2012-12-04 02:41:47 +00:00
Alexey Samsonov 45b6edbd1d ASan: add new interface functions - __asan_(un)poison_stack_memory. Calls to these functions are inserted by the instrumentation pass in use-after-scope mode
llvm-svn: 169201
2012-12-04 01:38:15 +00:00
Alexander Potapenko e2b6d08459 Use a struct to hold the /proc/self/maps buffer on Linux.
llvm-svn: 169155
2012-12-03 21:21:22 +00:00
Kostya Serebryany 214b715061 [asan] two more bits for __sparc__
llvm-svn: 169141
2012-12-03 18:39:21 +00:00
Kostya Serebryany 485f7b4a70 [tsan] add CompactSizeClassMap as an alternative (more compact) size class map. Not used yet.
llvm-svn: 169128
2012-12-03 15:00:33 +00:00
Kostya Serebryany dab61684ef [tsan] remove unused InternalAllocBlock as part of larger refactoring
llvm-svn: 169123
2012-12-03 11:57:01 +00:00
Dmitry Vyukov e982a1d368 tsan: describe global vars (module+offset for now)
llvm-svn: 169122
2012-12-03 11:45:34 +00:00
Kostya Serebryany a960b2c6da [asan] EXPECT_EQ => ASSERT_EQ around pthread_create/pthread_join calls
llvm-svn: 169121
2012-12-03 11:37:03 +00:00
Kostya Serebryany d5aafcf618 [asan] in asan tests, check all return values of pthread_create/pthread_join. Also add the ASAN_AVOID_EXPENSIVE_TESTS macro to guard the test that creates too many threads
llvm-svn: 169118
2012-12-03 09:43:56 +00:00
Will Dietz 2c36c71f5b [ubsan] Refactor handlers to have separate entry points for aborting.
If user specifies aborting after a recoverable failed check is
appropriate, frontend should emit call to the _abort variant.

Test this behavior with newly added -fsanitize-recover flag.

llvm-svn: 169113
2012-12-02 19:47:29 +00:00
Will Dietz b28179be10 [ubsan] Replace "fatal error" with "runtime error".
llvm-svn: 169112
2012-12-02 18:43:33 +00:00
Alexander Potapenko 7811425843 Add caching to the MemoryMappingLayout class on Linux. This is necessary for the cases when a sandbox prevents ASan from reading the mappings
from /proc/self/maps.
The mappings are currently being cached on each access to /proc/self/maps. In the future we'll need to add an API that allows the client to notify ASan about the sandbox.

llvm-svn: 169076
2012-12-01 02:39:45 +00:00
Dmitry Vyukov e993dac233 tsan: fix int overflow and several instances where tid is used with ignore
llvm-svn: 169029
2012-11-30 20:02:11 +00:00
Dmitry Vyukov d05418eac6 tsan: suppress weird race reports when JVM is embed into the process
llvm-svn: 169019
2012-11-30 17:45:53 +00:00