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

The qt_ntfs_permission_lookup mechanism is prone to data races

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.6.0
    • 6.2.5, 6.3.1, 6.4.0 Beta2
    • Core: I/O
    • None
    • 8
    • 696ad54e5 (dev), 9e8dcaa1e (6.4), b220b0a0a (6.5), d4078e9c6 (tqtc/lts-5.15), 172ff9d33 (tqtc/lts-6.2), 84f0596c0 (dev), fd70555b3 (dev)
    • Foundation Sprint 73, Foundation Sprint 74, Foundation Sprint 75

      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.

        For Gerrit Dashboard: QTBUG-105804
        # Subject Branch Project Status CR V

            mate Máté Barany
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: