c++ - Time when the Heap snapshot is taken when dumping Core -
Text after "
We have a POSIX mutli-threaded C ++ program running on Linux 2.6.32, the core in one of the threads - Dump. + 208>: lwz r0,8 (r9) ; With compiled gdb-7.2 corss, we see that the faulty instruction is here
0x11491178 & lt-core file analysis of pre & and registers at frame show:
(gdb) info reg r0 0x0 0 รข ?? | R9 0xdeaddead +3735 9 36685 Which makes sense, in terms of r9 process / thread, an invalid address value (actually we write in the hyper-clear pattern). It is confusing that r9 is filled in such a way
0x1149116c & lt; GDB gives me the following information about data: + 196> lwz r9,0 (r4) and r4 value (first and only) function parameter "data": $ 6 = (TextProcessorIF *) 0x4b3fe858 (gdb) P * Data $ 7 = {_vptr.TextProcessorIF = 0x128b5390} (gdb) info icon 0x128b5390 for text processor Vetel & Lt; Unsigned minor & gt; In section + 8 Rodata which are all correct in this context, then there is a value of 0x128b5390 instead of the r9 pattern "0xdeaddead" which is written when the memory is free'd and given back to the stack needed.
Then, why register r9 included scrubbed value when there is a legal object in the memory. My theory is that the core has a snapshot of memory, as the process dies, which is much below the actual accident. After SIGSEGV is picked up, this location of Hep Memory can still be used by other threads because they log the data until the time process is over. Therefore, it is possible that the memory written by the data has been allocated again and used / used in it, the memory snapshot was placed in the core and protected. My question is this:
a) Is my theory correct? B) Am I right to believe that at the time the signal is being raised (signal is being raised), the heap memory snapshot is not taken in the last moments of this process? C) The address / location that causes a SIGSEGV can still be used (by other threads)?
Thank you!
Do you use the signal handler for SIGSEGV ? Are they asynchronous and re-entering? View
Comments
Post a Comment