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
For Gerrit Dashboard: QTBUG-105753 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
438147,3 | Port QDir's implementation to use Q_D() and d_func() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
438148,1 | Port QDir to QExplicitlySharedDataPointer | dev | qt/qtbase | Status: ABANDONED | -1 | 0 |
441105,2 | Port QDir's implementation to use Q_D() and d_func() | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |
449056,9 | Make const functions in QDir re-entrant by protecting mutable variables | dev | qt/qtbase | Status: MERGED | +2 | 0 |
453699,3 | QDir: Refactor separate cache clearing functions into a single function | dev | qt/qtbase | Status: MERGED | +2 | 0 |