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

QDomText::splitText leaks memory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.6.3, 6.7.0 RC
    • 4.6.2, 4.8.5, 5.3.1
    • XML: DOM
    • None
    • I've tested on RHEL6/Qt 4.6.2 and OS X/Qt 4.8.5 and OS X/Qt 5.3.1.
    • macOS
    • de0230467 (dev), 975fc3da7 (6.7), 4efc8dd8d (6.6)

      Using QDomText::splitText causes memory to be leaked each time it's called.

      Valgrind-Massif shows the memory being allocated under QDomText::splitText, in QString::mid and QString::fromLatin1_helper, amongst other places.

      Building and running the attached will cause the memory used by the process to increase linearly over time as it runs.

        1. leak.pro
          0.1 kB
        2. main.cc
          0.5 kB
        3. no-leak.cc
          0.8 kB
        4. single-allocation.cc
          0.4 kB
        5. valgrind.txt
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            lluad Steve Atkins
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There is 1 open Gerrit change