JJulian Lettner[TSan][Darwin] Deflake test
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[tsan] Don't report bugs from interceptors called from libignored modules This patch make sure we don't report deadlocks and other bug types when we're inside an interceptor that was called from a noninstrumented module (when ignore_noninstrumented_modules=1 is set). Adding a testcase that shows that deadlock detection still works on Darwin (to make sure we're not silencing too many reports). Differential Revision: https://reviews.llvm.org/D31449 llvm-svn: 300998 | 9 年前 | |
tsan: disable instrumentation in runtime callbacks in tests All runtime callbacks must be non-instrumented with the new tsan runtime (it's now more picky with respect to recursion into runtime). Disable instrumentation in Darwin tests as we do in all other tests now. Differential Revision: https://reviews.llvm.org/D114348 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan][Darwin] Deflake test The asserted order of THREAD_DESTROY and end of main() is not guaranteed: 7: Hello from pthread 8: THREAD_TERMINATE 0x7e8000104000, self: 0x7e8000104000, name: child thread 9: Done. 10: THREAD_DESTROY 0x7e8000104000, self: 0x7e8000104000, name: child thread Resulting in: error: CHECK: expected string not found in input // CHECK: Done. Remove checking for "Done." (end of main()) to deflake this test. Alternatively, we could use CHECK-DAG. rdar://94036145 | 4 年前 | |
[TSan][Darwin] Add integration tests for dyld interposition Add integration tests for dyld interposition: DYLD_LIBRARY_PATH and DYLD_INSERT_LIBRARIES. DYLD_INSERT_LIBRARIES is also relevant for TSan thread finalization/destruction sequence in the presence of additional pthread introspection hooks (libBacktraceRecording.dylib for Xcode 'Queue Debugging' feature). rdar://78739125 Differential Revision: https://reviews.llvm.org/D109332 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: disable instrumentation in runtime callbacks in tests All runtime callbacks must be non-instrumented with the new tsan runtime (it's now more picky with respect to recursion into runtime). Disable instrumentation in Darwin tests as we do in all other tests now. Differential Revision: https://reviews.llvm.org/D114348 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan][libdispatch] Port gcd-sync-block-copy.mm to C++ Summary: Apparently, it makes a difference on where a block lives depending on if it's passed "inline" versus assigned and then passed via a variable. Both tests in this commit now give a signal, if Block_copy is used in dispatch_sync. Since these tests use different mechanisms (Objective-C retain versus C++ copy constructor) as proxies to observe if the block was copied, we should keep both of them. Commit, that first avoided the unnecessary copy: faef7d034a9ec6cb757137adce8e8670ec6c2d7b Subscribers: kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D60639 llvm-svn: 358469 | 7 年前 | |
[TSan] Remove ignore_interceptors_accesses flag Summary: It has been superseded by the ignore_noninstrumented_modules flag and is no longer needed. Also simplify a test that checks that mmap_interceptor respects ignore annotations (thr->ignore_reads_and_writes ). Relevant: https://reviews.llvm.org/rL269855 <rdar://problem/46263073> Remove obsolete Apple-specific suppression option Reviewers: dcoughlin, kubamracek, dvyukov, delcypher Reviewed By: dvyukov Subscribers: jfb, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55075 llvm-svn: 350883 | 7 年前 | |
[tsan] Enable ignore_noninstrumented_modules=1 on Darwin by default TSan recently got the "ignore_noninstrumented_modules" flag, which disables tracking of read and writes that come from noninstrumented modules (via interceptors). This is a way of suppressing false positives coming from system libraries and other noninstrumented code. This patch turns this on by default on Darwin, where it's supposed to replace the previous solution, "ignore_interceptors_accesses", which disables tracking in *all* interceptors. The new approach should re-enable TSan's ability to find races via interceptors on Darwin. Differential Revision: https://reviews.llvm.org/D29041 llvm-svn: 292981 | 9 年前 | |
[tsan] Enable ignore_noninstrumented_modules=1 on Darwin by default TSan recently got the "ignore_noninstrumented_modules" flag, which disables tracking of read and writes that come from noninstrumented modules (via interceptors). This is a way of suppressing false positives coming from system libraries and other noninstrumented code. This patch turns this on by default on Darwin, where it's supposed to replace the previous solution, "ignore_interceptors_accesses", which disables tracking in *all* interceptors. The new approach should re-enable TSan's ability to find races via interceptors on Darwin. Differential Revision: https://reviews.llvm.org/D29041 llvm-svn: 292981 | 9 年前 | |
[tsan] Enable ignore_noninstrumented_modules=1 on Darwin by default TSan recently got the "ignore_noninstrumented_modules" flag, which disables tracking of read and writes that come from noninstrumented modules (via interceptors). This is a way of suppressing false positives coming from system libraries and other noninstrumented code. This patch turns this on by default on Darwin, where it's supposed to replace the previous solution, "ignore_interceptors_accesses", which disables tracking in *all* interceptors. The new approach should re-enable TSan's ability to find races via interceptors on Darwin. Differential Revision: https://reviews.llvm.org/D29041 llvm-svn: 292981 | 9 年前 | |
[compiler-rt] Fix issue with compiler-rt tests mixing <atomic> and <stdatomic.h> Since D97044, libc++ implements <stdatomic.h>, which is not compatible with the <atomic> header in C++03 mode. To fix the tests, avoid using <stdatomic.h> at all, since it is not strictly required. rdar://92867529 Differential Revision: https://reviews.llvm.org/D125118 | 4 年前 | |
[tsan] Enable ignore_noninstrumented_modules=1 on Darwin by default TSan recently got the "ignore_noninstrumented_modules" flag, which disables tracking of read and writes that come from noninstrumented modules (via interceptors). This is a way of suppressing false positives coming from system libraries and other noninstrumented code. This patch turns this on by default on Darwin, where it's supposed to replace the previous solution, "ignore_interceptors_accesses", which disables tracking in *all* interceptors. The new approach should re-enable TSan's ability to find races via interceptors on Darwin. Differential Revision: https://reviews.llvm.org/D29041 llvm-svn: 292981 | 9 年前 | |
[compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* These lit configuration files are really Python source code. Using the .py file extension helps editors and tools use the correct language mode. LLVM and Clang already use this convention for lit configuration, this change simply applies it to all of compiler-rt. Reviewers: vitalybuka, dberris Differential Revision: https://reviews.llvm.org/D63658 llvm-svn: 364591 | 6 年前 | |
[TSan][Darwin] Mark test UNSUPPORTED for iOS simulator | 4 年前 | |
[TSan] Don't instrument code that is executed from __tsan_on_report() See also: https://reviews.llvm.org/D111157 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan][Darwin] Make malloc_size interceptor more robust Previously we would crash in the TSan runtime if the user program passes a pointer to malloc_size() that doesn't point into app memory. In these cases, malloc_size() should return 0. For ASan, we fixed a similar issue here: https://reviews.llvm.org/D15008 Radar-Id: rdar://problem/86213149 Differential Revision: https://reviews.llvm.org/D115947 | 4 年前 | |
[Darwin] Fix symbolization for recent simulator runtimes. Summary: Due to sandbox restrictions in the recent versions of the simulator runtime the atos program is no longer able to access the task port of a parent process without additional help. This patch fixes this by registering a task port for the parent process before spawning atos and also tells atos to look for this by setting a special environment variable. This patch is based on an Apple internal fix (rdar://problem/43693565) that unfortunately contained a bug (rdar://problem/58789439) because it used setenv() to set the special environment variable. This is not safe because in certain circumstances this can trigger a call to realloc() which can fail during symbolization leading to deadlock. A test case is included that captures this problem. The approach used to set the necessary environment variable is as follows: 1. Calling putenv() early during process init (but late enough that malloc/realloc works) to set a dummy value for the environment variable. 2. Just before atos is spawned the storage for the environment variable is modified to contain the correct PID. A flaw with this approach is that if the application messes with the atos environment variable (i.e. unsets it or changes it) between the time its set and the time we need it then symbolization will fail. We will ignore this issue for now but a DCHECK() is included in the patch that documents this assumption but doesn't check it at runtime to avoid calling getenv(). The issue reported in rdar://problem/58789439 manifested as a deadlock during symbolization in the following situation: 1. Before TSan detects an issue something outside of the runtime calls setenv() that sets a new environment variable that wasn't previously set. This triggers a call to malloc() to allocate a new environment array. This uses TSan's normal user-facing allocator. LibC stores this pointer for future use later. 2. TSan detects an issue and tries to launch the symbolizer. When we are in the symbolizer we switch to a different (internal allocator) and then we call setenv() to set a new environment variable. When this happen setenv() sees that it needs to make the environment array larger and calls realloc() on the existing enviroment array because it remembers that it previously allocated memory for it. Calling realloc() fails here because it is being called on a pointer its never seen before. The included test case closely reproduces the originally reported problem but it doesn't replicate the ((kBlockMagic)) == ((((u64*)addr)[0]) assertion failure exactly. This is due to the way TSan's normal allocator allocates the environment array the first time it is allocated. In the test program addr[0] accesses an inaccessible page and raises SIGBUS. If TSan's SIGBUS signal handler is active, the signal is caught and symbolication is attempted again which results in deadlock. In the originally reported problem the pointer is successfully derefenced but then the assert fails due to the provided pointer not coming from the active allocator. When the assert fails TSan tries to symbolicate the stacktrace while already being in the middle of symbolication which results in deadlock. rdar://problem/58789439 Reviewers: kubamracek, yln Subscribers: jfb, #sanitizers, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D78179 | 6 年前 | |
[TSan][Darwin] Remove unnecessary lit substitution We don't test on very old versions of Apple platforms anymore. The following lit substitution concerning the minimum deployment target for ARC support can be removed. %darwin_min_target_with_full_runtime_arc_support -> 10.11 Differential Revision: https://reviews.llvm.org/D85803 | 5 年前 | |
[tsan] Enable ignore_noninstrumented_modules=1 on Darwin by default TSan recently got the "ignore_noninstrumented_modules" flag, which disables tracking of read and writes that come from noninstrumented modules (via interceptors). This is a way of suppressing false positives coming from system libraries and other noninstrumented code. This patch turns this on by default on Darwin, where it's supposed to replace the previous solution, "ignore_interceptors_accesses", which disables tracking in *all* interceptors. The new approach should re-enable TSan's ability to find races via interceptors on Darwin. Differential Revision: https://reviews.llvm.org/D29041 llvm-svn: 292981 | 9 年前 | |
[tsan] Fix Darwin tests (missing FileCheck's) A little embarrassing, but we're missing the call to FileCheck in several Darwin tests. Let's fix this. Differential Revision: http://reviews.llvm.org/D18503 llvm-svn: 265658 | 10 年前 | |
[tsan] Enable ignore_noninstrumented_modules=1 on Darwin by default TSan recently got the "ignore_noninstrumented_modules" flag, which disables tracking of read and writes that come from noninstrumented modules (via interceptors). This is a way of suppressing false positives coming from system libraries and other noninstrumented code. This patch turns this on by default on Darwin, where it's supposed to replace the previous solution, "ignore_interceptors_accesses", which disables tracking in *all* interceptors. The new approach should re-enable TSan's ability to find races via interceptors on Darwin. Differential Revision: https://reviews.llvm.org/D29041 llvm-svn: 292981 | 9 年前 | |
[TSan] Ensure test uses tagged pointer This is a test-only failure. The test wrongly assumes that this gets us a tagged pointer: NSObject* num1 = @7; assert(isTaggedPtr(num1)); However, on newer deployment targets that have “const data support” we get a “normal” pointer to constant object. Radar-Id: rdar://problem/83217293 | 4 年前 | |
[TSan][Darwin] Remove unnecessary lit substitution We don't test on very old versions of Apple platforms anymore. The following lit substitution concerning the minimum deployment target for ARC support can be removed. %darwin_min_target_with_full_runtime_arc_support -> 10.11 Differential Revision: https://reviews.llvm.org/D85803 | 5 年前 | |
[TSan][Darwin] Remove unnecessary lit substitution We don't test on very old versions of Apple platforms anymore. The following lit substitution concerning the minimum deployment target for ARC support can be removed. %darwin_min_target_with_full_runtime_arc_support -> 10.11 Differential Revision: https://reviews.llvm.org/D85803 | 5 年前 | |
[TSan][Darwin] Remove unnecessary lit substitution We don't test on very old versions of Apple platforms anymore. The following lit substitution concerning the minimum deployment target for ARC support can be removed. %darwin_min_target_with_full_runtime_arc_support -> 10.11 Differential Revision: https://reviews.llvm.org/D85803 | 5 年前 | |
[TSan][Darwin] Remove unnecessary lit substitution We don't test on very old versions of Apple platforms anymore. The following lit substitution concerning the minimum deployment target for ARC support can be removed. %darwin_min_target_with_full_runtime_arc_support -> 10.11 Differential Revision: https://reviews.llvm.org/D85803 | 5 年前 | |
[TSan][Darwin] Enable test on non-macOS platforms After removing the unnecessary -mmacosx-version-min=10.12 compiler flag this test can run on all platforms. I confirmed that this test is green for iOS, iOS simulator, and watchOS simulator. Differential Revision: https://reviews.llvm.org/D85952 | 5 年前 | |
test: Use %clangxx in objc++ test files These test in this change are objc++, but are built using %clang, not %clangxx. The reason this works is the driver has been adding -lc++ for sanitizer enabled builds. By making these tests use %clangxx, they no longer depend on the driver linking to c++. Doing so will allow us to prevent overlinking of libc++ for applications. llvm-svn: 274989 | 9 年前 | |
[tsan] Fix the behavior of OSAtomicTestAndClear The system implementation of OSAtomicTestAndClear returns the original bit, but the TSan interceptor has a bug which always returns zero from the function. This patch fixes this and adds a test. Differential Revision: https://reviews.llvm.org/D23061 llvm-svn: 277461 | 9 年前 | |
test: Use %clangxx in objc++ test files These test in this change are objc++, but are built using %clang, not %clangxx. The reason this works is the driver has been adding -lc++ for sanitizer enabled builds. By making these tests use %clangxx, they no longer depend on the driver linking to c++. Doing so will allow us to prevent overlinking of libc++ for applications. llvm-svn: 274989 | 9 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[tsan] Fixup for 1260a155: Move variadic-open.cpp test into Darwin/ directory | 5 年前 | |
[tsan] Properly describe GCD worker threads in reports When dealing with GCD worker threads, TSan currently prints weird things like "created by thread T-1" and "[failed to restore the stack]" in reports. This patch avoids that and instead prints "Thread T3 (...) is a GCD worker thread". Differential Revision: https://reviews.llvm.org/D29103 llvm-svn: 293882 | 9 年前 | |
[tsan] Add support for running TSan tests on iOS simulator and devices Differential Revision: https://reviews.llvm.org/D35157 llvm-svn: 307537 | 8 年前 | |
Revert "Follow-up to r331378. Update tests to allow to use C atomics in C++." It reverts commit r331484 because it caused test failures ThreadSanitizer-x86_64 :: Darwin/gcd-groups-destructor.mm ThreadSanitizer-x86_64 :: Darwin/libcxx-shared-ptr-stress.mm ThreadSanitizer-x86_64 :: Darwin/xpc-race.mm Foundation.h transitively includes <atomic>, so we have a case of benign mixing <stdatomic.h> and <atomic>. llvm-svn: 331491 | 8 年前 | |
[tsan] Add support for running TSan tests on iOS simulator and devices Differential Revision: https://reviews.llvm.org/D35157 llvm-svn: 307537 | 8 年前 |