Details
Description
Due to the use of lazy initalization (QDirPrivate::initFileLists()), QDir is not re-entrant. E.g. two threads calling QDir::count() on two independent, but shared, copies of a QDir object will cause a data race.
Acceptance criteria:
- QDir is ported to QExplicitlySharedDataPointer (to get const-correctness)
- all internal lazy evaluation is protected from concurrent access
Attachments
Issue Links
- relates to
-
QTBUG-27000 The QDir::setCurrent() function is not re-entrant (as documented) under Windows, since the ::SetCurrentDirectory() method it uses without protection is not re-entrant (as documented in the Win32 API).
- Reported
-
QTBUG-43758 QFileInfo is not re-entrant
- Open
- resulted from
-
QTBUG-103525 Finish migration to qsizetype [qtbase/src/corelib/io]
- Open