summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/tests/rtl
Commit message (Collapse)AuthorAgeFilesLines
* Remove NOLINTs from compiler-rtVitaly Buka2019-09-112-2/+3
| | | | llvm-svn: 371687
* Update compiler-rt cpplint.pyVitaly Buka2019-09-111-9/+8
| | | | | | https://github.com/cpplint/cpplint/commit/adb3500107f409ac5491188ae652ac3f4d03d9d3 llvm-svn: 371675
* compiler-rt: Rename .cc file in lib/tsan/tests/{rtl,unit} to .cppNico Weber2019-08-019-17/+21
| | | | | | Like r367463, but for tsan/tests/{rtl,unit}. llvm-svn: 367566
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1910-40/+30
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Add NetBSD improvements in sanitizersKamil Rytarowski2017-10-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Changes: * Add initial msan stub support. * Handle NetBSD specific pthread_setname_np(3). * NetBSD supports __attribute__((tls_model("initial-exec"))), define it in SANITIZER_TLS_INITIAL_EXEC_ATTRIBUTE. * Add ReExec() specific bits for NetBSD. * Simplify code and add syscall64 and syscall_ptr for !NetBSD. * Correct bunch of syscall wrappers for NetBSD. * Disable test/tsan/map32bit on NetBSD as not applicable. * Port test/tsan/strerror_r to a POSIX-compliant OSes. * Disable __libc_stack_end on NetBSD. * Disable ReadNullSepFileToArray() on NetBSD. * Define struct_ElfW_Phdr_sz, detected missing symbol by msan. * Change type of __sanitizer_FILE from void to char. This helps to reuse this type as an array. Long term it will be properly implemented along with SANITIZER_HAS_STRUCT_FILE setting to 1. * Add initial NetBSD support in lib/tsan/go/buildgo.sh. * Correct referencing stdout and stderr in tsan_interceptors.cc on NetBSD. * Document NetBSD x86_64 specific virtual memory layout in tsan_platform.h. * Port tests/rtl/tsan_test_util_posix.cc to NetBSD. * Enable NetBSD tests in test/msan/lit.cfg. * Enable NetBSD tests in test/tsan/lit.cfg. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, eugenis, kcc, dvyukov Reviewed By: dvyukov Subscribers: #sanitizers, llvm-commits, kubamracek Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D39124 llvm-svn: 316591
* [powerpc] deactivate flakey tests on powerpc64leBill Seurer2017-05-011-2/+3
| | | | | | | | | | | | | | | | | | | | These test cases occassionally fail when run on powerpc64le: ignore_lib1.cc ignore_lib5.cc TestCases/Posix/current_allocated_bytes.cc rtl/TsanRtlTest/Posix.ThreadLocalAccesses TestCases/Posix/coverage-fork-direct.cc The failures cause false problem reports to be sent to developers whose code had nothing to do with the failures. Reactivate them when the real problems are fixed. This could also be related to the same problems as with the tests ThreadedOneSizeMallocStressTest, ThreadedMallocStressTest, ManyThreadsTest, and several others that do not run reliably on powerpc. llvm-svn: 301798
* [tsan] Fix string to bool conversion warnings in tsan testsVitaly Buka2016-12-271-3/+3
| | | | llvm-svn: 290568
* [tsan] Call pthread interceptors directly in TSan RTL unit testsKuba Brecka2016-11-153-79/+114
| | | | | | | | On Darwin, we're running the TSan unit tests without interceptors. To make sure TSan observes all the pthread events (thread creating, thread join, condvar signal, etc.) in tsan_posix.cc, we should call the pthread interceptors directly, as we already do in tsan_test_util_posix.cc. This fixes some flaky failures on Darwin bots. Differential Revision: https://reviews.llvm.org/D26639 llvm-svn: 287026
* [sanitizer] On OS X, verify that interceptors work and abort if not, take 2Kuba Brecka2016-03-171-0/+6
| | | | | | | | | | On OS X 10.11+, we have "automatic interceptors", so we don't need to use DYLD_INSERT_LIBRARIES when launching instrumented programs. However, non-instrumented programs that load TSan late (e.g. via dlopen) are currently broken, as TSan will still try to initialize, but the program will crash/hang at random places (because the interceptors don't work). This patch adds an explicit check that interceptors are working, and if not, it aborts and prints out an error message suggesting to explicitly use DYLD_INSERT_LIBRARIES. TSan unit tests run with a statically linked runtime, where interceptors don't work. To avoid aborting the process in this case, the patch replaces `DisableReexec()` with a weak `ReexecDisabled()` function which is defined to return true in unit tests. Differential Revision: http://reviews.llvm.org/D18212 llvm-svn: 263695
* [tsan] Fix detached threads in unit tests on OS XKuba Brecka2015-11-211-2/+5
| | | | | | | | We need to call the intercepted version of pthread_detach. Secondly, PTHREAD_CREATE_JOINABLE and PTHREAD_CREATE_DETACHED are not 0 and 1 on OS X, so we need to properly pass these constants and not just a bool. Differential Revision: http://reviews.llvm.org/D14837 llvm-svn: 253775
* [tsan] Make tsan_test_util_posix.cc call pthread interceptors on OS XKuba Brecka2015-11-211-16/+45
| | | | | | | | The tsan_test_util_posix.cc implementation of mutexes call pthread APIs directly, which on OS X don't end up calling the intercepted versions and we miss the synchronization. This patch changes the unit tests to directly call the intercepted versions. This fixes several test failures on OS X. Differential Revision: http://reviews.llvm.org/D14835 llvm-svn: 253774
* [tsan] Replace new/delete with a local variable in ThreadSpecificDtors unit testKuba Brecka2015-11-191-8/+7
| | | | | | | | On OS X, this unit test (ThreadSpecificDtors) fails, because the new and delete operators actually call the overridden operators, which end up using TLVs and crash. Since C++'s new and delete is not important in this test, let's just replace them with a local variable. This fixes the test on OS X. Differential Revision: http://reviews.llvm.org/D14826 llvm-svn: 253583
* [tsan] Fix a typo in tsan_test_util.hKuba Brecka2015-11-131-1/+1
| | | | | | | | There is a typo in tsan_test_util.h, it shouldn't be `APPLE`, but `__APPLE__`. Differential Revision: http://reviews.llvm.org/D14647 llvm-svn: 253078
* [tsan] Rename tsan_test_util_linux.cc to tsan_test_util_posix.ccKuba Brecka2015-11-112-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D14575 llvm-svn: 252741
* [tsan] Add TSan unit test support for OS XKuba Brecka2015-11-114-13/+49
| | | | | | | | This patch enables building and running TSan unit tests on OS X. Differential Revision: http://reviews.llvm.org/D14546 llvm-svn: 252731
* [tsan] Enable tsan for aarch64Adhemerval Zanella2015-08-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* tsan: remove TSAN_SHADOW_COUNTDmitry Vyukov2015-01-191-4/+0
| | | | | | | | | TSAN_SHADOW_COUNT is defined to 4 in all environments. Other values of TSAN_SHADOW_COUNT were never tested and were broken by recent changes to shadow mapping. Remove it as there is no reason to fix nor maintain it. llvm-svn: 226466
* Support building tsan_test_util_linux.cc on FreeBSDViktor Kutuzov2014-09-061-3/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D5210 llvm-svn: 217309
* Fix typosAlp Toker2014-05-151-1/+1
| | | | llvm-svn: 208841
* [Sanitizer] Use different MemoryMappingLayout::DumpListOfModules on Linux ↵Alexey Samsonov2013-12-251-0/+3
| | | | | | | | and Mac. Make a unit test added in r198004 more robust. llvm-svn: 198012
* [TSan] Use Clang to compile and link TSan unit tests with TSan runtimeAlexey Samsonov2013-09-111-5/+9
| | | | llvm-svn: 190503
* [Sanitizer] update style checker script and fix namespace style warningsAlexey Samsonov2013-01-301-1/+1
| | | | llvm-svn: 173910
* tsan: exclude flaky testDmitry Vyukov2012-12-101-0/+4
| | | | llvm-svn: 169729
* [TSan] s/uintptr_t/intptr_t in TSan test and enforce stack size limit in one ↵Alexey Samsonov2012-09-181-1/+1
| | | | | | of TSan output tests that somewhy fails otherwise llvm-svn: 164116
* [TSan] fix a typo in test dependencies. Silence few remaining pedantic gcc ↵Alexey Samsonov2012-09-182-3/+9
| | | | | | warnings in TSan tests. llvm-svn: 164115
* [TSan] move: rtl_tests->tests/rtl unit_tests->tests/unit to make a single ↵Alexey Samsonov2012-09-1710-0/+1492
root for gtest-based tests. Support running these tests from lit via check-tsan command. llvm-svn: 164022
OpenPOWER on IntegriCloud