I currently have a C ++ program that crashes from time to time. I run it in Dr. Memory, but when it does not crash, no obvious error messages are reported, and when this happens, drmemory does not report anything (it just ends). So I debugged it with the sent GDB in the corresponding MinGW package.
The program is compiled and linked to MinGW gcc 32bit (dwarf2 and sjlj produce similar results) under 64-bit Windows 7. The GDB debugger caught SIGSEGV , which caused the program to crash. I made a complete reverse line, but I do not know how to analyze it, because I did not do this before.
Here the debugger stopped when the program crashed:
Thread 539 (Thread 5904.0x11b4): #0 0x00000000 in ?? () No symbol table info available. #1 0x00433f1b in pthread_create_wrapper () No symbol table info available. #2 0x763d1287 in msvcrt!_itow_s () from C:\Windows\syswow64\msvcrt.dll No symbol table info available. #3 0x763d1328 in msvcrt!_endthreadex () from C:\Windows\syswow64\msvcrt.dll No symbol table info available. #4 0x74e5336a in KERNEL32!BaseThreadInitThunk () from C:\Windows\syswow64\kernel32.dll No symbol table info available. #5 0x77069f72 in ntdll!RtlInitializeExceptionChain () from C:\Windows\system32\ntdll.dll No symbol table info available. #6 0x77069f45 in ntdll!RtlInitializeExceptionChain () from C:\Windows\system32\ntdll.dll No symbol table info available. #7 0x00000000 in ?? () No symbol table info available.
I do not know if I should publish other parts of the return line; it is very long because the program is a Qt Gui multithreaded program.
I think #0 00000000 in ?? () #0 00000000 in ?? () is the place where the program crashed, because in other threads there always exists a new thread launched after ... -> msvcrt!_endthreadex () -> msvcrt!_itow_s () -> pthread_create_wrapper () .
I debugged this for several days ... it pushed me against the wall. Any help would be greatly appreciated!
PS Please let me know if I should post other parts of the return line. I do not know if the GDB point is stopped, these are point problems that arise in a multithreaded program.
c ++ debugging multithreading qt crash
Zizheng tai
source share