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

destroy_current_thread_data Segmentation fault

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.9.0
    • Core: Threads
    • None
    • Windows

    Description

      I'm seeing crashes with Qt 6.9.0 using mingw-w64 12.0.0 and gcc 14.2.0 with pthreads.
      It seems like destroy_current_thread_data is called with null from the Cleanup dtor when currentThreadData is null because the null check in set_thread_data is for data, not currentThreadData: https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/thread/qthread_win.cpp?h=6.9.0#n83

      [Thread 19624.0x11648 exited with code 0]
      Thread 24 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 19624.0x39bc]
      destroy_current_thread_data (p=0x0) at ../qtbase-everywhere-src-6.9.0/src/corelib/thread/qthread_win.cpp:55
      warning: 55     ../qtbase-everywhere-src-6.9.0/src/corelib/thread/qthread_win.cpp: No such file or directory
      (gdb) bt
      #0  destroy_current_thread_data (p=0x0) at ../qtbase-everywhere-src-6.9.0/src/corelib/thread/qthread_win.cpp:55
      #1  0x00007ff8b002cdf4 in Cleanup::~Cleanup (this=<optimized out>, __in_chrg=<optimized out>) at ../qtbase-everywhere-src-6.9.0/src/corelib/thread/qthread_win.cpp:85
      #2  0x00007ff943f30029 in ?? () from C:\Program Files\Strawberry Music Player Debug\libstdc++-6.dll
      #3  0x00007ff966934ac7 in ?? () from C:\Program Files\Strawberry Music Player Debug\libwinpthread-1.dll
      #4  0x00007ff966934d32 in ?? () from C:\Program Files\Strawberry Music Player Debug\libwinpthread-1.dll
      #5  0x00007ff9821e9a1d in ntdll!RtlActivateActivationContextUnsafeFast () from C:\Windows\SYSTEM32\ntdll.dll
      #6  0x00007ff9821e9aff in ntdll!RtlActivateActivationContextUnsafeFast () from C:\Windows\SYSTEM32\ntdll.dll
      #7  0x00007ff9821e75a3 in ntdll!LdrShutdownThread () from C:\Windows\SYSTEM32\ntdll.dll
      #8  0x00007ff98221ec6e in ntdll!RtlExitUserThread () from C:\Windows\SYSTEM32\ntdll.dll
      #9  0x00007ff981e3737d in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll
      #10 0x00007ff98221cc91 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
      #11 0x0000000000000000 in ?? ()
      

       

      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
              jonaski Jonas Kvinge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes