diff --git a/Makefile b/Makefile index 7d0e7275a..bcd8c77d7 100644 --- a/Makefile +++ b/Makefile @@ -61,8 +61,8 @@ endif ifdef COMPILE_WITH_TSAN DISABLE_JEMALLOC=1 EXEC_LDFLAGS += -fsanitize=thread -pie - PLATFORM_CCFLAGS += -fsanitize=thread -fPIC - PLATFORM_CXXFLAGS += -fsanitize=thread -fPIC + PLATFORM_CCFLAGS += -fsanitize=thread -fPIC -DROCKSDB_TSAN_RUN + PLATFORM_CXXFLAGS += -fsanitize=thread -fPIC -DROCKSDB_TSAN_RUN endif ifndef DISABLE_JEMALLOC diff --git a/db/db_test.cc b/db/db_test.cc index 535b800a9..067f2869d 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -3036,6 +3036,9 @@ TEST(DBTest, RecoverDuringMemtableCompaction) { } while (ChangeOptions()); } +// false positive TSAN report on shared_ptr -- +// https://groups.google.com/forum/#!topic/thread-sanitizer/vz_s-t226Vg +#ifndef ROCKSDB_TSAN_RUN TEST(DBTest, FlushSchedule) { Options options = CurrentOptions(); options.disable_auto_compactions = true; @@ -3073,6 +3076,7 @@ TEST(DBTest, FlushSchedule) { ASSERT_LE(pikachu_tables, static_cast(10)); ASSERT_GT(pikachu_tables, static_cast(0)); } +#endif // enabled only if not TSAN run TEST(DBTest, MinorCompactionsHappen) { do {