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

QDate/QTime/QDateTime use QLocale::system(), which makes them non-reentrant

    XMLWordPrintable

    Details

    • Commits:
      ba19363529f4c099c6831c26d3acf98fa0c5f702

      Description

      Some methods of QDate/QTime/QDateTime - most notably the toString methods - are internally using QLocale::system(). QLocale::system() calls the static systemData() method, which in turn can modify global state (in QLocalPrivate::updateSystemPrivate()). This produces race conditions, when e.g. the toString functions are called simultaneously from multiple threads (even on different QDate instances) and caused various random crashes in my project.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              thiago Thiago Macieira
              Reporter:
              rh Robert Habrich
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes