[Lldb-commits] [lldb] r360298 - [Reproducers] Fix reproducer unittest

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed May 8 15:59:35 PDT 2019

Author: jdevlieghere
Date: Wed May  8 15:59:35 2019
New Revision: 360298

URL: http://llvm.org/viewvc/llvm-project?rev=360298&view=rev
[Reproducers] Fix reproducer unittest

I think the recent change to flush the SB API recording uncovered a real
issue on the Windows bot. Although I couldn't make much sense of the
error message "unknown file: error: SEH exception with code 0x3221225477
thrown in the test body.", it prompted me to look at the test. In the
unit test we were recording during replay, which is obviously not
correct. I think we didn't see this issue before because we flushed once
after the recording was done. This patch unsets the recording  logic
during the replay part of the test.

Hopefully this fixed the Windows bot.


Modified: lldb/trunk/unittests/Utility/ReproducerInstrumentationTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ReproducerInstrumentationTest.cpp?rev=360298&r1=360297&r2=360298&view=diff
--- lldb/trunk/unittests/Utility/ReproducerInstrumentationTest.cpp (original)
+++ lldb/trunk/unittests/Utility/ReproducerInstrumentationTest.cpp Wed May  8 15:59:35 2019
@@ -54,7 +54,7 @@ static llvm::Optional<Serializer> g_seri
 static llvm::Optional<TestingRegistry> g_registry;
 #define LLDB_GET_INSTRUMENTATION_DATA()                                        \
-  InstrumentationData(*g_serializer, *g_registry)
+  g_serializer ? InstrumentationData(*g_serializer, *g_registry) : InstrumentationData()
 class InstrumentedFoo {
@@ -109,6 +109,8 @@ static std::vector<InstrumentedFoo *> g_
 static std::vector<InstrumentedBar *> g_bars;
 void ClearObjects() {
+  g_registry.reset();
+  g_serializer.reset();

More information about the lldb-commits mailing list