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

[REG 6.2.3 -> 6.3.0] QGuiApplication leaks memory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.3.0 RC
    • 6.3.0 Beta2, 6.4.0
    • QPA: X11/XCB
    • None
    • Ubuntu 20.04 LTS
      clang 10.0.0
    • 404c5dc49f (qt/qtbase/dev) 404c5dc49f (qt/tqtc-qtbase/dev) 0b0520f233 (qt/qtbase/6.3) 0b0520f233 (qt/tqtc-qtbase/6.3) 0b0520f233 (qt/tqtc-qtbase/6.3.0)

    Description

      1. Configure qtbase with "-sanitize address" and build it.
      2. Build the attached project.
        qt-cmake /tmp/report/ && cmake --build .
        

        It only contains a minimal QGuiApplication:

        int main(int argc, char *argv[]) {
            QGuiApplication qga(argc, argv);
            return 0;
        }
        
      3. Run the resulting binary:
        ./report
        

        ASAN will report a memory leak:

        qtrob@rob-desktop:/tmp/minimize$ ./report
        
        =================================================================
        ==96478==ERROR: LeakSanitizer: detected memory leaks
        
        Direct leak of 60 byte(s) in 1 object(s) allocated from:
            #0 0x4b446d in malloc (/tmp/minimize/report+0x4b446d)
            #1 0x7fafcd81e0c5  (/usr/lib/x86_64-linux-gnu/libxcb.so.1+0xe0c5)
        
        SUMMARY: AddressSanitizer: 60 byte(s) leaked in 1 allocation(s).
        

      Qt 6.2.3 does not leak memory in this situation.

      Attachments

        1. CMakeLists.txt
          0.3 kB
        2. main.cpp
          0.1 kB

        Issue Links

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

          Activity

            People

              liaqi Liang Qi
              rlohning Robert Löhning
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes