2

I have this simple qt-program like:

int main(int argc, char *argv[]) {
  ::QApplication app(argc, argv);

  ::QWidget wgt;
  wgt.show();

  return app.exec();
}

When I run program with Address Sinitizer, it showed me this:

==13118==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x519388 in operator new(unsigned long) (/home/andrej/Public/example/qt_ex/build/example+0x519388)
    #1 0x7fc0812f9af6 in QAccessible::queryAccessibleInterface(QObject*) /build/qt510base-g_oCIy/qt510base-5.10.1/src/gui/accessible/qaccessible.cpp:720
    #2 0x61300000003f  (<unknown module>)

Indirect leak of 8478 byte(s) in 10 object(s) allocated from:
    #0 0x4e1d60 in realloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1d60)
    #1 0x7fc0746597fc  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2d7fc)

Indirect leak of 808 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc07465960c in _dbus_mem_pool_alloc (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2d60c)

Indirect leak of 528 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc07463b75d  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0xf75d)

Indirect leak of 480 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc074638c37  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0xcc37)

Indirect leak of 464 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc07465577f  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2977f)

Indirect leak of 448 byte(s) in 8 object(s) allocated from:
    #0 0x4e18f8 in __interceptor_malloc (/home/andrej/Public/example/qt_ex/build/example+0x4e18f8)
    #1 0x7fc0746404bd in _dbus_credentials_new (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x144bd)

Indirect leak of 280 byte(s) in 7 object(s) allocated from:
    #0 0x4e18f8 in __interceptor_malloc (/home/andrej/Public/example/qt_ex/build/example+0x4e18f8)
    #1 0x7fc07465f761  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x33761)

Indirect leak of 264 byte(s) in 3 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc07464e5da  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x225da)

Indirect leak of 224 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc07465678b in _dbus_hash_table_new (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2a78b)

Indirect leak of 192 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc07464b70f in _dbus_message_loader_new (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x1f70f)

Indirect leak of 192 byte(s) in 4 object(s) allocated from:
    #0 0x4e18f8 in __interceptor_malloc (/home/andrej/Public/example/qt_ex/build/example+0x4e18f8)
    #1 0x7fc07465f881  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x33881)

Indirect leak of 160 byte(s) in 4 object(s) allocated from:
    #0 0x4e18f8 in __interceptor_malloc (/home/andrej/Public/example/qt_ex/build/example+0x4e18f8)
    #1 0x7fc07465f6fa  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x336fa)

Indirect leak of 128 byte(s) in 2 object(s) allocated from:
    #0 0x4e1d60 in realloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1d60)
    #1 0x7fc07464b8a1 in _dbus_message_loader_get_unix_fds (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x1f8a1)
    #2 0x814dc4b6fdfc79ff  (<unknown module>)

Indirect leak of 128 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc07464cf47  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x20f47)

Indirect leak of 96 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc07463b728  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0xf728)

Indirect leak of 96 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc07463b717  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0xf717)

Indirect leak of 80 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc0746594b3 in _dbus_mem_pool_new (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2d4b3)

Indirect leak of 80 byte(s) in 4 object(s) allocated from:
    #0 0x4e18f8 in __interceptor_malloc (/home/andrej/Public/example/qt_ex/build/example+0x4e18f8)
    #1 0x7fc07465752e in _dbus_strdup (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2b52e)

Indirect leak of 70 byte(s) in 2 object(s) allocated from:
    #0 0x4e18f8 in __interceptor_malloc (/home/andrej/Public/example/qt_ex/build/example+0x4e18f8)
    #1 0x7fc074659d09 in _dbus_string_copy_data (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2dd09)
    #2 0x814dc4b6fdfc79ff  (<unknown module>)

Indirect leak of 64 byte(s) in 2 object(s) allocated from:
    #0 0x4e1d60 in realloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1d60)
    #1 0x7fc0746565e4  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2a5e4)

Indirect leak of 64 byte(s) in 8 object(s) allocated from:
    #0 0x4e18f8 in __interceptor_malloc (/home/andrej/Public/example/qt_ex/build/example+0x4e18f8)
    #1 0x7fc074659a43  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x2da43)

Indirect leak of 48 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc07464d362  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0x21362)

Indirect leak of 48 byte(s) in 2 object(s) allocated from:
    #0 0x4e1b10 in calloc (/home/andrej/Public/example/qt_ex/build/example+0x4e1b10)
    #1 0x7fc074639779  (/lib/x86_64-linux-gnu/libdbus-1.so.3+0xd779)

Indirect leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x519388 in operator new(unsigned long) (/home/andrej/Public/example/qt_ex/build/example+0x519388)
    #1 0x7fc080dd9f75 in QtSharedPointer::ExternalRefCountData::getAndRef(QObject const*) /build/qt510base-g_oCIy/qt510base-5.10.1/src/corelib/tools/qsharedpointer.cpp:1452

Indirect leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x519388 in operator new(unsigned long) (/home/andrej/Public/example/qt_ex/build/example+0x519388)
    #1 0x7fc0812ffeb1 in QAccessibleObject::QAccessibleObject(QObject*) /build/qt510base-g_oCIy/qt510base-5.10.1/src/gui/accessible/qaccessibleobject.cpp:80
    #2 0x61300000003f  (<unknown module>)

SUMMARY: AddressSanitizer: 13468 byte(s) leaked in 81 allocation(s).

Is this a problem? How I can cleanup output from this messages?

I read somewhere it isn't a memory leaks, but to difficult search real memory leaks, when you have this messages.

ks1322
  • 33,961
  • 14
  • 109
  • 164

0 Answers0