nano-node
nano-node copied to clipboard
UBSan error for ledger walker
Running ASan (Google Address Sanitizer) on core_test build got the following report:
/ws/nano-node/nano/node/ledger_walker.cpp:76:59: runtime error: reference binding to misaligned address 0x7fbb71c92064 for type 'const nano::block_hash', which requires 8 byte alignment
0x7fbb71c92064: note: pointer points here
00 00 00 00 04 27 0d 7f 11 c4 b2 b4 72 f2 85 4c 5a 59 f2 a7 e8 42 26 ce 9e d7 99 de 75 74 4b d7
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /ws/nano-node/nano/node/ledger_walker.cpp:76:59 in
It is probably related to the lookup function on line 69 (DiskHash):
auto const * block_hash = walked_blocks_order.lookup (std::to_string (walked_block_order_index).c_str ());
OS: Ubuntu 20.04