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

QThreadPool::waitForDone is not thread safe

    XMLWordPrintable

Details

    Description

      When calling QThreadPool::waitForDone, calling QThreadPool::start on a different thread can lead to crashes.

      QThreadPoolPrivate::reset() unlocks the QThreadPoolPrivate mutex while deleting threads. As QThreadPoolPrivate::tryStart uses QThreadPoolPrivate::expiredThreads and QThreadPoolPrivate::waitingThreads to select a thread to start the runnable on, the selected Thread might have been deleted in the meantime.

      Attachments

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

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            madwinterin Marcus Tillmanns (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change