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

Valgrind reveals memory management problem in QThreadPool autotest

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.3.0 Alpha
    • 5.0.0
    • Core: Threads
    • None

      In qtbase/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp, the setMaxThreadCountStartsAndStopsThreads() test function ends with a commented-out delete statement, which was added as part of a seemingly unrelated commit.

      Running valgrind confirms that the object that would have been deleted is leaked. If the delete is reinstated, valgrind instead complains multiple times that deleted memory is being accessed by the QSemaphore destructor, which is called twice from the WaitingTask destructor.

      Rather than commenting out the delete statement, this test should be corrected to address the problems revealed by valgrind when the delete statement is executed.

        For Gerrit Dashboard: QTBUG-22673
        # Subject Branch Project Status CR V

            dfaure David Faure (Private)
            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes