Details
Description
The qt_ntfs_permission_lookup is a mere int, but read by code that may execute in another than the GUI thread. The documentation (https://doc.qt.io/qt-6/qfiledevice.html#Permission-enum) is silent on the matter and doesn't mention that the flag needs to be upped before any other thread may be started which may perform filesystem I/O using Qt API, which, in any case, is very hard to follow for a user as it's unclear which threads Qt may start on its own.
Going forward, we should replace this with a RAII class or a pair of functions, and unexport the variable. For older Qt versions, we should add a warning to the docs.
Attachments
Issue Links
- resulted from
-
QTBUG-103525 Finish migration to qsizetype [qtbase/src/corelib/io]
- Open
For Gerrit Dashboard: QTBUG-105804 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
453408,2 | [doc] Warn users about data races regarding qt_ntfs_permission_lookup | dev | qt/qtbase | Status: MERGED | +2 | 0 |
453586,3 | [doc] Warn users about data races regarding qt_ntfs_permission_lookup | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
453587,3 | [doc] Warn users about data races regarding qt_ntfs_permission_lookup | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |
453591,3 | [doc] Warn users about data races regarding qt_ntfs_permission_lookup | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
453592,3 | [doc] Warn users about data races regarding qt_ntfs_permission_lookup | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
454057,8 | Avoid potential data races caused by qt_ntfs_permission_lookup | dev | qt/qtbase | Status: MERGED | +2 | 0 |
455144,7 | Deprecate usage of qt_ntfs_permission_lookup | dev | qt/qtbase | Status: MERGED | +2 | 0 |
483546,1 | [doc] Warn users about data races regarding qt_ntfs_permission_lookup | tqtc/lts-5.15-vxworks | qt/tqtc-qtbase | Status: ABANDONED | 0 | 0 |