diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2013-12-24 12:55:56 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2013-12-24 12:55:56 +0000 |
commit | e8fdc0e6518be815c8459742b785df48fff78987 (patch) | |
tree | 0cbb13fbff74decd554477d84b109bb77ffa7eaf /lib/tsan/tests | |
parent | fc58259822a98d07ad7c61d26310b29e133f1f35 (diff) |
tsan: remove in_rtl counter
This is intended to address the following problem.
Episodically we see CHECK-failures when recursive interceptors call back into user code. Effectively we are not "in_rtl" at this point, but it's very complicated and fragile to properly maintain in_rtl property. Instead get rid of it. It was used mostly for sanity CHECKs, which basically never uncover real problems.
Instead introduce ignore_interceptors flag, which is used in very few narrow places to disable recursive interceptors (e.g. during runtime initialization).
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/tests')
-rw-r--r-- | lib/tsan/tests/unit/tsan_clock_test.cc | 5 | ||||
-rw-r--r-- | lib/tsan/tests/unit/tsan_flags_test.cc | 5 | ||||
-rw-r--r-- | lib/tsan/tests/unit/tsan_mman_test.cc | 5 | ||||
-rw-r--r-- | lib/tsan/tests/unit/tsan_stack_test.cc | 3 | ||||
-rw-r--r-- | lib/tsan/tests/unit/tsan_sync_test.cc | 1 | ||||
-rw-r--r-- | lib/tsan/tests/unit/tsan_vector_test.cc | 2 |
6 files changed, 0 insertions, 21 deletions
diff --git a/lib/tsan/tests/unit/tsan_clock_test.cc b/lib/tsan/tests/unit/tsan_clock_test.cc index fe886e10b..0349a778b 100644 --- a/lib/tsan/tests/unit/tsan_clock_test.cc +++ b/lib/tsan/tests/unit/tsan_clock_test.cc @@ -17,7 +17,6 @@ namespace __tsan { TEST(Clock, VectorBasic) { - ScopedInRtl in_rtl; ThreadClock clk; CHECK_EQ(clk.size(), 0); clk.tick(0); @@ -34,7 +33,6 @@ TEST(Clock, VectorBasic) { } TEST(Clock, ChunkedBasic) { - ScopedInRtl in_rtl; ThreadClock vector; SyncClock chunked; CHECK_EQ(vector.size(), 0); @@ -51,7 +49,6 @@ TEST(Clock, ChunkedBasic) { } TEST(Clock, AcquireRelease) { - ScopedInRtl in_rtl; ThreadClock vector1; vector1.tick(100); SyncClock chunked; @@ -67,7 +64,6 @@ TEST(Clock, AcquireRelease) { } TEST(Clock, ManyThreads) { - ScopedInRtl in_rtl; SyncClock chunked; for (int i = 0; i < 100; i++) { ThreadClock vector; @@ -85,7 +81,6 @@ TEST(Clock, ManyThreads) { } TEST(Clock, DifferentSizes) { - ScopedInRtl in_rtl; { ThreadClock vector1; vector1.tick(10); diff --git a/lib/tsan/tests/unit/tsan_flags_test.cc b/lib/tsan/tests/unit/tsan_flags_test.cc index 2e0a7d1b7..f8c621e3b 100644 --- a/lib/tsan/tests/unit/tsan_flags_test.cc +++ b/lib/tsan/tests/unit/tsan_flags_test.cc @@ -18,7 +18,6 @@ namespace __tsan { TEST(Flags, Basic) { - ScopedInRtl in_rtl; // At least should not crash. Flags f; InitializeFlags(&f, 0); @@ -26,7 +25,6 @@ TEST(Flags, Basic) { } TEST(Flags, DefaultValues) { - ScopedInRtl in_rtl; Flags f; f.enable_annotations = false; @@ -206,7 +204,6 @@ extern "C" const char *__tsan_default_options() { } TEST(Flags, ParseDefaultOptions) { - ScopedInRtl in_rtl; Flags f; test_default_options = options1; @@ -219,7 +216,6 @@ TEST(Flags, ParseDefaultOptions) { } TEST(Flags, ParseEnvOptions) { - ScopedInRtl in_rtl; Flags f; InitializeFlags(&f, options1); @@ -230,7 +226,6 @@ TEST(Flags, ParseEnvOptions) { } TEST(Flags, ParsePriority) { - ScopedInRtl in_rtl; Flags f; test_default_options = options2; diff --git a/lib/tsan/tests/unit/tsan_mman_test.cc b/lib/tsan/tests/unit/tsan_mman_test.cc index e1ad7ac51..5e39bea8c 100644 --- a/lib/tsan/tests/unit/tsan_mman_test.cc +++ b/lib/tsan/tests/unit/tsan_mman_test.cc @@ -28,7 +28,6 @@ uptr __tsan_get_allocated_size(void *p); namespace __tsan { TEST(Mman, Internal) { - ScopedInRtl in_rtl; char *p = (char*)internal_alloc(MBlockScopedBuf, 10); EXPECT_NE(p, (char*)0); char *p2 = (char*)internal_alloc(MBlockScopedBuf, 20); @@ -45,7 +44,6 @@ TEST(Mman, Internal) { } TEST(Mman, User) { - ScopedInRtl in_rtl; ThreadState *thr = cur_thread(); uptr pc = 0; char *p = (char*)user_alloc(thr, pc, 10); @@ -72,7 +70,6 @@ TEST(Mman, User) { } TEST(Mman, UserRealloc) { - ScopedInRtl in_rtl; ThreadState *thr = cur_thread(); uptr pc = 0; { @@ -118,7 +115,6 @@ TEST(Mman, UserRealloc) { } TEST(Mman, UsableSize) { - ScopedInRtl in_rtl; ThreadState *thr = cur_thread(); uptr pc = 0; char *p = (char*)user_alloc(thr, pc, 10); @@ -131,7 +127,6 @@ TEST(Mman, UsableSize) { } TEST(Mman, Stats) { - ScopedInRtl in_rtl; ThreadState *thr = cur_thread(); uptr alloc0 = __tsan_get_current_allocated_bytes(); diff --git a/lib/tsan/tests/unit/tsan_stack_test.cc b/lib/tsan/tests/unit/tsan_stack_test.cc index 9aa296762..c1dc2fde5 100644 --- a/lib/tsan/tests/unit/tsan_stack_test.cc +++ b/lib/tsan/tests/unit/tsan_stack_test.cc @@ -46,13 +46,11 @@ static void TestStackTrace(StackTrace *trace) { } TEST(StackTrace, Basic) { - ScopedInRtl in_rtl; StackTrace trace; TestStackTrace(&trace); } TEST(StackTrace, StaticBasic) { - ScopedInRtl in_rtl; uptr buf[10]; StackTrace trace1(buf, 10); TestStackTrace(&trace1); @@ -61,7 +59,6 @@ TEST(StackTrace, StaticBasic) { } TEST(StackTrace, StaticTrim) { - ScopedInRtl in_rtl; uptr buf[2]; StackTrace trace(buf, 2); diff --git a/lib/tsan/tests/unit/tsan_sync_test.cc b/lib/tsan/tests/unit/tsan_sync_test.cc index dddf0b290..1cfcf99ee 100644 --- a/lib/tsan/tests/unit/tsan_sync_test.cc +++ b/lib/tsan/tests/unit/tsan_sync_test.cc @@ -25,7 +25,6 @@ TEST(Sync, Table) { const uintptr_t kIters = 512*1024; const uintptr_t kRange = 10000; - ScopedInRtl in_rtl; ThreadState *thr = cur_thread(); uptr pc = 0; diff --git a/lib/tsan/tests/unit/tsan_vector_test.cc b/lib/tsan/tests/unit/tsan_vector_test.cc index cfef6e528..c54ac1ee6 100644 --- a/lib/tsan/tests/unit/tsan_vector_test.cc +++ b/lib/tsan/tests/unit/tsan_vector_test.cc @@ -17,7 +17,6 @@ namespace __tsan { TEST(Vector, Basic) { - ScopedInRtl in_rtl; Vector<int> v(MBlockScopedBuf); EXPECT_EQ(v.Size(), (uptr)0); v.PushBack(42); @@ -30,7 +29,6 @@ TEST(Vector, Basic) { } TEST(Vector, Stride) { - ScopedInRtl in_rtl; Vector<int> v(MBlockScopedBuf); for (int i = 0; i < 1000; i++) { v.PushBack(i); |