forked from OSchip/llvm-project
[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. llvm-svn: 360298
This commit is contained in:
parent
44dd05c31b
commit
fad8fb8032
|
@ -54,7 +54,7 @@ static llvm::Optional<Serializer> g_serializer;
|
||||||
static llvm::Optional<TestingRegistry> g_registry;
|
static llvm::Optional<TestingRegistry> g_registry;
|
||||||
|
|
||||||
#define LLDB_GET_INSTRUMENTATION_DATA() \
|
#define LLDB_GET_INSTRUMENTATION_DATA() \
|
||||||
InstrumentationData(*g_serializer, *g_registry)
|
g_serializer ? InstrumentationData(*g_serializer, *g_registry) : InstrumentationData()
|
||||||
|
|
||||||
class InstrumentedFoo {
|
class InstrumentedFoo {
|
||||||
public:
|
public:
|
||||||
|
@ -109,6 +109,8 @@ static std::vector<InstrumentedFoo *> g_foos;
|
||||||
static std::vector<InstrumentedBar *> g_bars;
|
static std::vector<InstrumentedBar *> g_bars;
|
||||||
|
|
||||||
void ClearObjects() {
|
void ClearObjects() {
|
||||||
|
g_registry.reset();
|
||||||
|
g_serializer.reset();
|
||||||
g_foos.clear();
|
g_foos.clear();
|
||||||
g_bars.clear();
|
g_bars.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue