[Lldb-commits] [lldb] f369d51 - [lldb] avoid assert in threadsanitizer tests on linux

Luboš Luňák via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 3 12:18:45 PDT 2020


Author: Luboš Luňák
Date: 2020-09-03T21:18:17+02:00
New Revision: f369d51896e1c0f61df253b116c42771479549df

URL: https://github.com/llvm/llvm-project/commit/f369d51896e1c0f61df253b116c42771479549df
DIFF: https://github.com/llvm/llvm-project/commit/f369d51896e1c0f61df253b116c42771479549df.diff

LOG: [lldb] avoid assert in threadsanitizer tests on linux

The tests are unsupported on linux, but they assert in
Thread::GetStopDescriptionRaw() because of empty stop reason
description. And it is empty because
InstrumentationRuntimeTSan::NotifyBreakpointHit() fails
to get report from InstrumentationRuntimeTSan::RetrieveReportData(),
which is possibly(?) the reason why this is unsupported on linux.
Add a dummy stop reason description for this case, which changes
the test result from failing to unsupported.

Added: 
    

Modified: 
    lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp b/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
index a2954f556b10..68e732538158 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
@@ -855,6 +855,8 @@ bool InstrumentationRuntimeTSan::NotifyBreakpointHit(
         });
     report->GetAsDictionary()->AddBooleanItem("all_addresses_are_same",
                                               all_addresses_are_same);
+  } else {
+    stop_reason_description = "unknown ThreadSanitizer stop reason";
   }
 
   // Make sure this is the right process


        


More information about the lldb-commits mailing list