From e5b7613b78d22ef8f85b898aab7d23a06079b4e2 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 8 Sep 2025 13:57:32 -0700 Subject: [PATCH] [ntcore] Change ntcore_test to just exit on tsan error (#8220) In shutdown situations, calling FAIL() can deadlock in tsan. --- ntcore/src/test/native/cpp/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ntcore/src/test/native/cpp/main.cpp b/ntcore/src/test/native/cpp/main.cpp index d0202f2c1b..a0813aacb8 100644 --- a/ntcore/src/test/native/cpp/main.cpp +++ b/ntcore/src/test/native/cpp/main.cpp @@ -30,6 +30,7 @@ void __asan_on_error(void) { FAIL() << "Encountered an address sanitizer error"; } void __tsan_on_report(void) { - FAIL() << "Encountered a thread sanitizer error"; + std::puts("Encountered a thread sanitizer error"); + std::_Exit(EXIT_FAILURE); } } // extern "C"