My multithread program crash. I have .core file. I load it and thread apply all backtrace and get the following output for thread that crashed:
Thread 1 (Thread 0x8567800 (runnable)):
#0 GG::serialize (this=0x847c180, outbin=@0xbf2f7c30)
at basic_string.h:269
Ok, crash while serializing, but reported that its occur at STL basic_string.h:269.
But how to get actual line of crash at serialize() function?
If the crash is reproducible, the easiest thing to do is to recompile the faulty code with inlining disabled (in
g++, this is-fno-inlineand-fno-default-inline).If you have to analyze the core you have, try to find what method in
stringwas being invoked, and find the corresponding call in yourserializefunction.Sometimes, there is no other way to find the problem other than to disassemble your function and walk through it a bit to find which parts of the assembly code correspond to your source code. Then, to figure out the values of the local variables, you have to do
info registers, and track what values were moved into what register.