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

Segmentation fault using QDate::fromString in multiple threads

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.12.0, 5.12.1
    • Core: Date/Time
    • None
    • 188eea0eb47c499f70a60f573948d529089d93b1

    Description

      Hi,

      Disclaimer: This is my first issue here. Please let me know if anything is missing.

      I've noticed that since version 5.12.0 one of my applications keeps crashing on macOS.
      After some digging, I found that it was due to QDate::fromString.
      I could reproduce this issue on linux with the help of ASan.

      In my application I get a "double free" error. Using the minimal example attached I always get a segmentation fault.

      Attached is main.cpp containing a sample program which parses strings using QDate::fromString in parallel. For the crash messages see the attached "error.txt"

       

       

      My application on the other hand crashes with following message (I wasn't able to reproduce this warning using a minimal example, yet):

      ==9913==ERROR: AddressSanitizer: attempting double-free on 0x60200005e9d0 in thread T19 (Thread (pooled)):
      {{ #0 0x7f2a3d6d8640 in operator delete(void*) (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xf0640)}}
      {{ #1 0x7f2a39c712d4 in QDateTimeParser::~QDateTimeParser() tools/qdatetimeparser.cpp:64}}
      {{ #2 0x7f2a39c11411 in QDate::fromString(QString const&, QString const&) tools/qdatetime.cpp:1344}}

      Any help is appreciated.

       

      Regards,

      Andre

       

       

      Attachments

        1. error.txt
          3 kB
        2. main.cpp
          0.7 kB
        3. project.pro
          0.1 kB

        Issue Links

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

          Activity

            People

              Eddy Edward Welbourne
              bugwelle Andre M
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes