summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/tsan
Commit message (Collapse)AuthorAgeFilesLines
...
* [tsan] workaround for a crash in deadlock detector, bug ↵Kostya Serebryany2015-09-011-0/+14
| | | | | | https://github.com/google/sanitizers/issues/594 llvm-svn: 246592
* [compiler-rt] [tsan] Enable TSan for AArch64/42-bit VMAAdhemerval Zanella2015-08-285-4/+25
| | | | | | | | | | | This patch adds support for tsan on aarch64-linux with 42-bit VMA (current default config for 64K pagesize kernels). The support is enabled by defining the SANITIZER_AARCH64_VMA to 42 at build time for both clang/llvm and compiler-rt. The default VMA is 39 bits. It also enabled tsan for previous supported VMA (39). llvm-svn: 246330
* [tsan] Enable tsan for aarch64Adhemerval Zanella2015-08-0511-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enabled TSAN for aarch64 with 39-bit VMA layout. As defined by tsan_platform.h the layout used is: 0000 4000 00 - 0200 0000 00: main binary 2000 0000 00 - 4000 0000 00: shadow memory 4000 0000 00 - 5000 0000 00: metainfo 5000 0000 00 - 6000 0000 00: - 6000 0000 00 - 6200 0000 00: traces 6200 0000 00 - 7d00 0000 00: - 7d00 0000 00 - 7e00 0000 00: heap 7e00 0000 00 - 7fff ffff ff: modules and main thread stack Which gives it about 8GB for main binary, 4GB for heap and 8GB for modules and main thread stack. Most of tests are passing, with the exception of: * ignore_lib0, ignore_lib1, ignore_lib3 due a kernel limitation for no support to make mmap page non-executable. * longjmp tests due missing specialized assembly routines. These tests are xfail for now. The only tsan issue still showing is: rtl/TsanRtlTest/Posix.ThreadLocalAccesses Which still required further investigation. The test is disable for aarch64 for now. llvm-svn: 244055
* [asan,tsan,msan] move the memcmp interceptor from asan/tsan to ↵Kostya Serebryany2015-07-291-0/+42
| | | | | | sanitizer_common. This may potentially lead to more reports from msan as it now sees the reads inside memcmp. To disable, use the flag intercept_memcmp=0. Likewise, it may potentially cause new races to appear due to more strict memcmp checking (flag strict_memcmp=1) llvm-svn: 243595
* [TSan] Fix dl_iterate_phdr callback for the case when info->dlpi_name is ↵Alexey Samsonov2015-07-101-0/+2
| | | | | | overwritten by user. llvm-svn: 241876
* tsan: fix handling of condition variable destructionDmitry Vyukov2015-06-301-0/+53
| | | | | | | | | | | | POSIX states that "It shall be safe to destroy an initialized condition variable upon which no threads are currently blocked", and later clarifies "A condition variable can be destroyed immediately after all the threads that are blocked on it are awakened) (in examples section). Tsan reported such destruction as a data race. Fixes https://llvm.org/bugs/show_bug.cgi?id=23616 Reviewed in http://reviews.llvm.org/D10693 llvm-svn: 241082
* tsan: implement suppressions for top frame onlyDmitry Vyukov2015-06-292-0/+61
| | | | | | | | | | The new suppression type is called "race_top" and is matched only against top frame in report stacks. This is required for situations when we want to suppress a race in a "thread pool" or "event loop" implementation. If we simply use "race:ThreadPool::Execute" suppression, that can suppress everything in the program. Reviewed in http://reviews.llvm.org/D10686 llvm-svn: 240949
* tsan: fix flaky testDmitry Vyukov2015-06-291-4/+24
| | | | | | See the comment for explanation. llvm-svn: 240943
* tsan: fix handling of dup2 Dmitry Vyukov2015-06-252-0/+73
| | | | | | | | | | | | Previously tsan modelled dup2(oldfd, newfd) as write on newfd. We hit several cases where the write lead to false positives: 1. Some software dups a closed pipe in place of a socket before closing the socket (to prevent races actually). 2. Some daemons dup /dev/null in place of stdin/stdout. On the other hand we have not seen cases when write here catches real bugs. So model dup2 as read on newfd instead. llvm-svn: 240687
* tsan: fix false positive between dlopen and dl_iterate_phdrDmitry Vyukov2015-06-241-0/+54
| | | | | | | | | We see false reports between dlopen and dl_iterate_phdr. This happens because tsan does not see dynamic linker internal synchronization. Unpoison module names in dl_iterate_phdr callback. llvm-svn: 240576
* tsan: don't print external PCs in reportsDmitry Vyukov2015-06-242-0/+46
| | | | | | They are meaningless. llvm-svn: 240539
* tsan: fix unbounded memory consumption for large mallocsDmitry Vyukov2015-06-241-0/+28
| | | | | | | This happens only in corner cases, but we observed this on a real app. See the test for description of the exact scenario that lead to unbounded memory consumption. llvm-svn: 240535
* [tsan] Disable a flaky test.Evgeniy Stepanov2015-06-041-0/+2
| | | | llvm-svn: 239063
* [tsan] deflakify one more tsan testKostya Serebryany2015-05-141-0/+4
| | | | llvm-svn: 237387
* [TSan][MIPS] XFAIL long jump tests for MIPS64Sagar Thakur2015-05-085-0/+19
| | | | | | | | | | Mark longjmp tests as XFAIL because longjmp assembly for mips is not yet implemented. Reviewers: dsanders, dvyukov, samsonov Subscribers: llvm-commits, mohit.bhakkad, jaydeep Differential Revision: http://reviews.llvm.org/D9526 llvm-svn: 236847
* tsan: add memory access functions that accept pcDmitry Vyukov2015-05-052-0/+39
| | | | | | This is required for Java support, as real PCs don't work for Java. llvm-svn: 236484
* tsan: add another test for setuidDmitry Vyukov2015-04-291-0/+21
| | | | llvm-svn: 236130
* tsan: fix a bug memory access handlingDmitry Vyukov2015-04-281-0/+40
| | | | | | | | | | We incorrectly replaced shadow slots when the new value is not stronger than the old one. The bug can lead to false negatives. The bug was detected by Go race test suite: https://github.com/golang/go/issues/10589 llvm-svn: 236008
* [TSan] Prepare TSan tests for splitting tsan_cxx library.Alexey Samsonov2015-04-274-4/+4
| | | | llvm-svn: 235927
* tsan: support setuid callDmitry Vyukov2015-04-231-0/+26
| | | | | | | Currently the call hangs because the background thread does not handle SIGSETXID signal. llvm-svn: 235581
* tsan: deflake a testDmitry Vyukov2015-04-201-0/+3
| | | | llvm-svn: 235294
* tsan: fix handling of pthread_detachDmitry Vyukov2015-04-201-0/+28
| | | | | | | | | | Fixes https://llvm.org/bugs/show_bug.cgi?id=23235 If pthread_create is followed by pthread_detach, the new thread may not acquire synchronize with the parent thread. llvm-svn: 235293
* tsan: fix parsing of second_deadlock_stack flagDmitry Vyukov2015-04-141-1/+1
| | | | | | | It was broken during flag parsing refactoring. Enable test for the flag. llvm-svn: 234878
* [sanitizer][MIPS] Fix warnings on MIPSDmitry Vyukov2015-04-101-1/+3
| | | | | | | | | | | | Fixed: - stack frame size warning. - msse3 flag unused warning. - GoTsanRuntimeCheck dependency warning reported by cmake. Change by Sagar Thakur Reviewed in http://reviews.llvm.org/D8963 llvm-svn: 234579
* tsan: handle async signals while blocked in pthread_cond_waitDmitry Vyukov2015-04-082-1/+57
| | | | | | Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=91 llvm-svn: 234394
* [Tsan] Fix the mmap_large.cc test to build on FreeBSDViktor Kutuzov2015-03-231-0/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D8545 llvm-svn: 233001
* [Tsan] Fix test.h to work on FreeBSDViktor Kutuzov2015-03-131-2/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D8303 llvm-svn: 232167
* tsan: fix a bug in MetaMap::ResetRangeDmitry Vyukov2015-03-121-0/+47
| | | | | | | The bug was uncovered by NegativeTests.MmapTest from data-race-test suite, so port it as well. llvm-svn: 232032
* tsan: fix crash during __tsan_java_moveDmitry Vyukov2015-03-121-0/+28
| | | | | | | | Munmap interceptor did not reset meta shadow for the range, and __tsan_java_move crashed because it encountered non-zero meta shadow for the destination. llvm-svn: 232029
* Revert r229678 "tsan: fix signal handling during stop-the-world"Hans Wennborg2015-02-281-39/+0
| | | | | | | This was causing Chromium's browser_tests to flakily segfault during leak check. llvm-svn: 230874
* [TSan][MIPS64] Fix few more test cases for MIPS64Mohit K. Bhakkad2015-02-206-9/+25
| | | | | | | | | | | | Patch by Sagar Thakur Reviewers: dvyukov, samsonov, kcc. Subscribers: dsanders, mohit.bhakkad, Anand.Takale, llvm-commits. Differential Revision: http://reviews.llvm.org/D7290 llvm-svn: 230002
* tsan: fix PTRACE_ATTACH handling during stop-the-worldDmitry Vyukov2015-02-191-4/+0
| | | | | | | | | | | | | | | | | | | If the thread receives a signal concurrently with PTRACE_ATTACH, we can get notification about the signal before notification about stop. In such case we need to forward the signal to the thread, otherwise the signal will be missed (as we do PTRACE_DETACH with arg=0) and any logic relying on signals will break. After forwarding we need to continue to wait for stopping, because the thread is not stopped yet. We do ignore delivery of SIGSTOP, because we want to make stop-the-world as invisible as possible. http://reviews.llvm.org/D7723 --This line, and those below, will be ignored-- M lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc M test/tsan/signal_segv_handler.cc llvm-svn: 229832
* tsan: fix signal handling during stop-the-worldDmitry Vyukov2015-02-181-0/+43
| | | | | | | | | | Long story short: stop-the-world briefly resets SIGSEGV handler to SIG_DFL. This breaks programs that handle and continue after SIGSEGV (namely JVM). See the test and comments for details. http://reviews.llvm.org/D7722 llvm-svn: 229678
* [TSan] Add Go runtime sanity check to CMake build.Alexey Samsonov2015-02-021-0/+1
| | | | llvm-svn: 227852
* tsan: properly instrument unaligned accessesDmitry Vyukov2015-01-272-17/+18
| | | | | | | | | | | If a memory access is unaligned, emit __tsan_unaligned_read/write callbacks instead of __tsan_read/write. Required to change semantics of __tsan_unaligned_read/write to not do the user memory. But since they were unused (other than through __sanitizer_unaligned_load/store) this is fine. Fixes long standing issue 17: https://code.google.com/p/thread-sanitizer/issues/detail?id=17 llvm-svn: 227230
* tsan: add test for ANNOTATE_HAPPENS_BEFORE/AFTER annotationsDmitry Vyukov2015-01-271-0/+57
| | | | llvm-svn: 227190
* Fix up test cases to account for improved column fidelity provided by clangDavid Blaikie2015-01-252-2/+2
| | | | llvm-svn: 227033
* tsan: remove sleeps from testsDmitry Vyukov2015-01-2196-425/+476
| | | | | | | | Even sleep(1) lead to episodical flakes on some machines. Use an invisible by tsan barrier to enforce required execution order instead. This makes the tests deterministic and faster. llvm-svn: 226659
* Reapply debug info changes now that more precise column information is ↵David Blaikie2015-01-142-2/+2
| | | | | | available. llvm-svn: 225959
* Revert "Reapply debug info changes now that more precise column information ↵David Blaikie2015-01-092-2/+2
| | | | | | | | | | is available." While the clang patch is reverted pending investigation/fixes. This reverts commit r225001. llvm-svn: 225560
* Reapply debug info changes now that more precise column information is ↵David Blaikie2014-12-302-2/+2
| | | | | | | | | available. (recommitting as the Clang patch is back in with the latest fix - hopefully it sticks) llvm-svn: 225001
* Revert "Reapply debug info changes now that r224385 has been recommitted to ↵David Blaikie2014-12-292-2/+2
| | | | | | | | | | | clang (in r224941)" Asserting when building compiler-rt when using a gcc host compiler. Reverting while I investigate. This reverts commit r224942. llvm-svn: 224969
* Reapply debug info changes now that r224385 has been recommitted to clang ↵David Blaikie2014-12-292-2/+2
| | | | | | (in r224941) llvm-svn: 224942
* tsan: reset stack0 in the first partition of thread traceDmitry Vyukov2014-12-221-0/+49
| | | | | | | stack0/mset0 contained bogus values from the previous thread that used the same id llvm-svn: 224702
* tsan: add acquire/release functions to java interfaceDmitry Vyukov2014-12-222-0/+45
| | | | | | they are required to handle synchronization on volatile/final fields llvm-svn: 224697
* tsan: add an additional test for signal handlersDmitry Vyukov2014-12-181-0/+52
| | | | | | | the test passes now, but signal handling during thread creation and shutdown is tricky llvm-svn: 224532
* tsan: fix data races between signal handler and sigactionDmitry Vyukov2014-12-181-0/+74
| | | | | | | signal handler reads sa_sigaction when a concurrent sigaction call can modify it as the result in could try to call SIG_DFL or a partially overwritten function pointer llvm-svn: 224530
* Fix suppressions file usageFilipe Cabecinhas2014-12-189-12/+12
| | | | | | | | | | | | | | | | | | Summary: Always quote suppressions files given to *_OPTIONS. This will make it not break when given full Windows paths (otherwise, parsing would stop after the drive's letter + ':'). Also fix one or two cases where the suppression files' extensions were not *.supp. Reviewers: samsonov, kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6680 llvm-svn: 224529
* tsan: fix failing CHECK In deadlock detectorDmitry Vyukov2014-12-181-31/+2
| | | | | | and re-enable the test llvm-svn: 224518
* tsan: disable the test even harderDmitry Vyukov2014-12-181-9/+36
| | | | | | | | | | | | | | | | currently it fails in cmake build with weird errors: /tmp/real_deadlock_detector_stress_test-68a5ae.o: In function `__clang_call_terminate': /ssd/src/llvm/projects/compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc:(.text.__clang_call_terminate[__clang_call_terminate]+0x12): undefined reference to `__cxa_begin_catch' /ssd/src/llvm/projects/compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc:(.text.__clang_call_terminate[__clang_call_terminate]+0x17): undefined reference to `std::terminate()' /tmp/real_deadlock_detector_stress_test-68a5ae.o: In function `std::vector<int, std::allocator<int> >::_M_check_len(unsigned long, char const*) const': /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_vector.h:1339: undefined reference to `std::__throw_length_error(char const*)' /tmp/real_deadlock_detector_stress_test-68a5ae.o: In function `__gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*)': /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()' /tmp/real_deadlock_detector_stress_test-68a5ae.o:(.eh_frame+0x63): undefined reference to `__gxx_personality_v0' clang-3.5: error: linker command failed with exit code 1 (use -v to see invocation) llvm-svn: 224511
OpenPOWER on IntegriCloud