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

[REG 6.9.0 -> 6.9.1] Memory leaks on QPainter::drawText() in static QGuiApplication

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P1: Critical P1: Critical
    • None
    • 6.8.4, 6.9.1, 6.11
    • Core: Threads
    • None
    • Ubuntu 24.04 LTS
      clang 18.1.3

      1. Have a Qt build with ASAN.
        I used clang 18.1.3 to build the current dev branch with switches including -static -sanitize address, see attached config.opt.
      2. Use that to build the attached demo project:
        #include <QGuiApplication>
        #include <QImage>
        #include <QPainter>
        
        int main(int argc, char *argv[]) {
            static QGuiApplication qga(argc, argv);
            QImage image(377, 233, QImage::Format_RGB32);
            QPainter painter(&image);
            painter.drawText(0,0,"Qt");
            return 0;
        }
        
      3. Run the project.
        ASAN reports memory leaks, see attached logs.

        1. 691.log
          337 kB
        2. CMakeLists.txt
          0.3 kB
        3. config.opt
          0.2 kB
        4. currentDev.log
          338 kB
        5. firstBad.log
          338 kB
        6. main.cpp
          0.3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes