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

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

    XMLWordPrintable

Details

    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              thiago Thiago Macieira
              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