gui icon indicating copy to clipboard operation
gui copied to clipboard

Memory leak in AddressBookTests

Open Sjors opened this issue 2 years ago • 3 comments
trafficstars

On Ubuntu 22.10 master (e1bf5470f919cf212703466411968916db8ae61f) using depends:

./configure --enable-suppress-external-warnings --enable-debug --with-sanitizers=address,undefined --disable-asm
********* Start testing of AddressBookTests *********
Config: Using QtTest library 5.15.5, Qt 5.15.5 (x86_64-little_endian-lp64 static debug build; by GCC 12.2.0), ubuntu 22.10
PASS   : AddressBookTests::initTestCase()
QWARN  : AddressBookTests::addressBookTests() This plugin does not support propagateSizeHints()
QWARN  : AddressBookTests::addressBookTests() This plugin does not support propagateSizeHints()
QDEBUG : AddressBookTests::addressBookTests() "NotifyAddressBookChanged: bcrt1qg9fv77eltn0vzs0jrxc5qks0009szpfn3m67f8 io - new A isMine=0 purpose=send status=0"
QDEBUG : AddressBookTests::addressBookTests() "NotifyAddressBookChanged: bcrt1q98nu3luk5pvz404ylecg3kks3q0n8h0je5x6z3 io - new B isMine=0 purpose=send status=0"
PASS   : AddressBookTests::addressBookTests()
PASS   : AddressBookTests::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 572ms
********* Finished testing of AddressBookTests *********

All tests passed.

~InitExecutor : Stopping thread
~InitExecutor : Stopped thread

=================================================================
==134373==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 552 byte(s) in 3 object(s) allocated from:
    #0 0x7f9cb72bf2d7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x7f9c9d925286  (<unknown module>)

Direct leak of 520 byte(s) in 13 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d936527  (<unknown module>)

Direct leak of 184 byte(s) in 1 object(s) allocated from:
    #0 0x7f9cb72bf2d7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x7f9c9d925286  (<unknown module>)
    #2 0x140000000b  (<unknown module>)

Direct leak of 184 byte(s) in 1 object(s) allocated from:
    #0 0x7f9cb72bf2d7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x7f9c9d925286  (<unknown module>)
    #2 0x2a00000021  (<unknown module>)

Direct leak of 176 byte(s) in 2 object(s) allocated from:
    #0 0x7f9cb72c0488 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x55fd2bce2fae in QLayoutPrivate::createWidgetItem(QLayout const*, QWidget*) kernel/qlayout.cpp:200

Direct leak of 96 byte(s) in 3 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d932bf2  (<unknown module>)

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d93a48c  (<unknown module>)

Indirect leak of 4193 byte(s) in 7 object(s) allocated from:
    #0 0x7f9cb72be720 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:85
    #1 0x7f9c9d932cd4  (<unknown module>)

Indirect leak of 120 byte(s) in 3 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d933a37  (<unknown module>)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d93a48c  (<unknown module>)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d92ac1a  (<unknown module>)

SUMMARY: AddressSanitizer: 6097 byte(s) leaked in 36 allocation(s).
FAIL qt/test/test_bitcoin-qt (exit status: 1)

Sjors avatar Feb 01 '23 14:02 Sjors

cc @achow101

Sjors avatar Feb 01 '23 14:02 Sjors

Based on that output, it seems like an issue in Qt itself?

achow101 avatar Feb 01 '23 17:02 achow101

... using depends

FWIW, all our CI tasks, which uses --with-sanitizers=address, do not use depends.

hebasto avatar Feb 02 '23 15:02 hebasto