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

Valgrind reveals memory management problem in QThreadPool autotest

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Activity

          People

            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

            Dates

              Created:
              Updated:
              Resolved: