Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-127479

Memory leaks reported by ASAN on Wayland

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.2
    • QPA: Wayland
    • None
    • Archlinux (up-to-date)
      KDE Wayland 6.1.3
      GCC 14.1.1
    • Linux/Wayland

    Description

      Hello,

      I am working on my open source application and started enabling ASAN in my debug/dev builds and it reports these leaks that are related to Qt

      Direct leak of 96 byte(s) in 1 object(s) allocated from:
          #0 0x751dda2fd1aa in calloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:77
          #1 0x751dd2d0821d  (/usr/lib/qt6/plugins/platforms/../../../libwayland-client.so.0+0x721d) (BuildId: 34398f92678b3073349ec46e8a10900e41832ec1)
          #2 0x751dd2d083d4 in wl_proxy_marshal_array_flags (/usr/lib/qt6/plugins/platforms/../../../libwayland-client.so.0+0x73d4) (BuildId: 34398f92678b3073349ec46e8a10900e41832ec1)
          #3 0x751dd2d092fa in wl_proxy_marshal_flags (/usr/lib/qt6/plugins/platforms/../../../libwayland-client.so.0+0x82fa) (BuildId: 34398f92678b3073349ec46e8a10900e41832ec1)
          #4 0x751dd2b7b29c in QtWaylandClient::QWaylandDisplay::setupConnection() (/usr/lib/qt6/plugins/platforms/../../../libQt6WaylandClient.so.6+0x6729c) (BuildId: 8d31ca4a1446b9902bb074fbbf6ae10606866218)
          #5 0x751dd2b7b6f0 in QtWaylandClient::QWaylandDisplay::QWaylandDisplay(QtWaylandClient::QWaylandIntegration*) (/usr/lib/qt6/plugins/platforms/../../../libQt6WaylandClient.so.6+0x676f0) (BuildId: 8d31ca4a1446b9902bb074fbbf6ae10606866218)
          #6 0x751dd2b9a875 in QtWaylandClient::QWaylandIntegration::QWaylandIntegration() (/usr/lib/qt6/plugins/platforms/../../../libQt6WaylandClient.so.6+0x86875) (BuildId: 8d31ca4a1446b9902bb074fbbf6ae10606866218)
          #7 0x751dda9dc143  (/usr/lib/qt6/plugins/platforms/libqwayland-generic.so+0x2143) (BuildId: 35eec6a9af728032506786f30f6b501987f09a8e)
          #8 0x751dd93799cf in QGuiApplicationPrivate::createPlatformIntegration() (/usr/lib/libQt6Gui.so.6+0x1799cf) (BuildId: 81a43cc721bcc385702243a8633e254eabe94699)
          #9 0x751dd937b037 in QGuiApplicationPrivate::createEventDispatcher() (/usr/lib/libQt6Gui.so.6+0x17b037) (BuildId: 81a43cc721bcc385702243a8633e254eabe94699)
          #10 0x751dd9d48c64 in QCoreApplicationPrivate::init() (/usr/lib/libQt6Core.so.6+0x148c64) (BuildId: 1718c65386c2a1e24435e03dbe44b6a7e27f5544)
          #11 0x751dd937b0cd in QGuiApplicationPrivate::init() (/usr/lib/libQt6Gui.so.6+0x17b0cd) (BuildId: 81a43cc721bcc385702243a8633e254eabe94699)
          #12 0x751dd9373cdc in QGuiApplication::QGuiApplication(int&, char**, int) (/usr/lib/libQt6Gui.so.6+0x173cdc) (BuildId: 81a43cc721bcc385702243a8633e254eabe94699)
          #13 0x55c95e11b2e7 in main ../src/main.cpp:33
          #14 0x751dd6e34e07  (/usr/lib/libc.so.6+0x25e07) (BuildId: 3de7fd3e8d993406afdcb908e63b88f2f4effea9)
          #15 0x751dd6e34ecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) (BuildId: 3de7fd3e8d993406afdcb908e63b88f2f4effea9)
          #16 0x55c95e11aa24 in _start (/home/adilou/Documents/Gethings/ZeGrapher/build-zg-debug/src/ZeGrapher+0xf55a24) (BuildId: 05ff6a7f336bd633fe1a4fc271fcf897923e66ac)
      

      I searched around in the bug tracker and all the memory leak issues are closed, seemingly everything is fixed.

      How to reproduce

      I can reproduce it on kwin-wayland 6.1.3 with this simple snippet

      #include <QQuickView>
      
      int main(int argc, char *argv[])
      {
        QGuiApplication a(argc, argv);  
        QQuickView view;
        view.show();  
        return a.exec();
      } 
      

       
      And compiling it with asan=address,undefined

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            adelks Adel Kara Slimane
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes