This line:
0 ConnmanTestMsg& connman = *static_cast<ConnmanTestMsg*>(g_setup->m_node.connman.get());
in src/test/fuzz/process_message.cpp:37, is constructing a reference to a ConnmanTestMsg, which actually refers to an object of type Connman. Even though ConnmanTestMsg inherits from Connman, and adds no fields, I am pretty sure this is undefined behavior.
It isn’t detected by the sanitizer because they’re not polymorphic types for which runtime type information is tracked, but if you make Connman::~Connman()
virtual
, it does get detected:
0test/fuzz/util.cpp:265:23: runtime error: member call on address 0x619000034380 which does not point to an object of type 'ConnmanTestMsg'
10x619000034380: note: object is of type 'CConnman'
2 00 00 00 00 90 8e a0 29 19 56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00
3 ^~~~~~~~~~~~~~~~~~~~~~~
4 vptr for 'CConnman'
I don’t know how to quickly solve this myself, as I’m unfamiliar with this part of the code, so I’m opening an issue to discuss it.