[Lldb-commits] [lldb] 74c8891 - Revert "[lldb] Fix TSan report on Linux (#179115)"
Aiden Grossman via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 9 10:50:27 PST 2026
Author: Aiden Grossman
Date: 2026-02-09T18:50:17Z
New Revision: 74c8891c9afe4bd836ab385f4489b1ede5c28a0e
URL: https://github.com/llvm/llvm-project/commit/74c8891c9afe4bd836ab385f4489b1ede5c28a0e
DIFF: https://github.com/llvm/llvm-project/commit/74c8891c9afe4bd836ab385f4489b1ede5c28a0e.diff
LOG: Revert "[lldb] Fix TSan report on Linux (#179115)"
This reverts commit cc7292056683f592c33055bb6456d509201654ec.
This patch causes two tests to unexpectedly pass:
1. lldb-api.functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
2. lldb-api.functionalities/tsan/global_location/TestTsanGlobalLocation.py
Reverting to fix premerge. Not fixing forward so someone who is familiar
with LLDB can take a look and make sure those tests now should pass.
Added:
Modified:
lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
lldb/test/API/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
lldb/test/API/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
Removed:
################################################################################
diff --git a/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp b/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
index fddf7daf880b0..04dd825519d35 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
@@ -88,20 +88,8 @@ extern "C"
// TODO: dlsym won't work on Windows.
void *dlsym(void* handle, const char* symbol);
int (*ptr__tsan_get_report_loc_object_type)(void *report, unsigned long idx, const char **object_type);
-)"
-// clang-format off
-#if defined(__linux__)
-R"(
- void *const RTLD_DEFAULT = (void *)0;
- }
-)";
-#else
-R"(
- void *const RTLD_DEFAULT = (void *)-2;
- }
+}
)";
-#endif
-// clang-format on
const char *thread_sanitizer_retrieve_report_data_command = R"(
@@ -173,7 +161,7 @@ struct {
} unique_tids[REPORT_ARRAY_SIZE];
} t = {0};
-ptr__tsan_get_report_loc_object_type = (typeof(ptr__tsan_get_report_loc_object_type))(void *)dlsym(RTLD_DEFAULT, "__tsan_get_report_loc_object_type");
+ptr__tsan_get_report_loc_object_type = (typeof(ptr__tsan_get_report_loc_object_type))(void *)dlsym((void*)-2 /*RTLD_DEFAULT*/, "__tsan_get_report_loc_object_type");
t.report = __tsan_get_current_report();
__tsan_get_report_data(t.report, &t.description, &t.report_count, &t.stack_count, &t.mop_count, &t.loc_count, &t.mutex_count, &t.thread_count, &t.unique_tid_count, t.sleep_trace, REPORT_TRACE_SIZE);
diff --git a/lldb/test/API/functionalities/tsan/thread_leak/TestTsanThreadLeak.py b/lldb/test/API/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
index fe995935ea4ef..2f5cceb7873c7 100644
--- a/lldb/test/API/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
+++ b/lldb/test/API/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
@@ -9,6 +9,10 @@
class TsanThreadLeakTestCase(TestBase):
+ @expectedFailureAll(
+ oslist=["linux"],
+ bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)",
+ )
@expectedFailureNetBSD
@skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
@skipIfRemote
diff --git a/lldb/test/API/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py b/lldb/test/API/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
index 68e9a064793bb..8fc1ae64c267e 100644
--- a/lldb/test/API/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
+++ b/lldb/test/API/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
@@ -10,6 +10,10 @@
class TsanThreadNumbersTestCase(TestBase):
+ @expectedFailureAll(
+ oslist=["linux"],
+ bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)",
+ )
@expectedFailureNetBSD
@skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
@skipIfRemote
More information about the lldb-commits
mailing list