Originally reported #18907 (comment)
This happens when trying to load a wallet with corrupt logs. It can be reproduced running the wallet_db.py test from #18907@c6a2c26
. From https://travis-ci.org/github/bitcoin/bitcoin/jobs/689013660#L4659:
0==2504==ERROR: LeakSanitizer: detected memory leaks
1Direct leak of 65840 byte(s) in 2 object(s) allocated from:
2 [#0](/bitcoin-bitcoin/0/) 0x55b144d4adb3 in __interceptor_malloc (/home/travis/build/bitcoin/bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/bitcoind+0x1c75db3)
3 [#1](/bitcoin-bitcoin/1/) 0x7f0207036cc4 in __os_malloc (/usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so+0x162cc4)
4 [#2](/bitcoin-bitcoin/2/) 0x19f3b1afb25218ff (<unknown module>)
5SUMMARY: AddressSanitizer: 65840 byte(s) leaked in 2 allocation(s).
The leak is known to happen at commits 274b9909f64aa617eb322850b799bc38c04f5f0c (initial commit) and e78c6820232865f21777bfeefadac0a1aea1fde2 (attempted fix) from #18907
This is probaby not a very severe issue, but it’d be good to track down the leak, fix it, and add the wallet_db test to have some test coverage for log recovery. All of this can be done independently of #18907, before or after it is merged.