Some validation events may attempt to access the avalanche processor in the validationinterface thread after the processor is already destructed.
Caught by ubsan on CI:
/work/src/avalanche/processor.cpp:1169:33: runtime error: member access within address 0x5578e54c0b70 which does not point to an object of type 'avalanche::Processor' 0x5578e54c0b70: note: object has invalid vptr 00 00 00 00 c0 54 8e 57 05 00 00 00 42 a2 51 9f 1c 0b d9 dd c0 3a 28 e5 78 55 00 00 90 97 4a e5 ^~~~~~~~~~~~~~~~~~~~~~~ invalid vptr #0 0x5578ab6be598 in avalanche::Processor::updatedBlockTip()::$_0::operator()() const /work/src/avalanche/processor.cpp:1169:33 0x5578ab6be598 in avalanche::Processor::updatedBlockTip() /work/src/avalanche/processor.cpp:1206:29 ... SUMMARY: UndefinedBehaviorSanitizer: dynamic-type-mismatch /work/src/avalanche/processor.cpp:1169:33 in
Note that this is rare failure, it is the first time I see it although the problem exists since D16270 made the avalanche processor local to this unit test.
The other two tests (in validationinterface_tests.cpp) that manage a unique pointer to an avalanche processor already call SyncWithValidationInterfaceQueue