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

QLockFile of size 0

    XMLWordPrintable

    Details

    • Commits:
      dd06d036616b3f3de852ea51989d9b4944417c1c

      Description

      It seems to be possible to create a lockfile of size 0 which is not deleted in the constructor:

      In QLockFilePrivate::tryLock_sys() qt_safe_open can succeed and the subsequent can qt_write_loop can fail. As a result t->isLocked will stay at 'false' (that's correct), but the 'unlock' in the destructor will return early without removing the empty file.

      I believe in addition to the "error = QLockFile::UnknownError; // partition full" line there should be QFile::remove(d->fileName) or similar to clean up.

        Attachments

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

          Activity

            People

            Assignee:
            dfaure David Faure (Private)
            Reporter:
            hjk hjk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes