我在應用程序中獲得了核心轉儲,並且當我嘗試分析它時,似乎它已經損壞了堆棧。任何人都可以幫助我解決問題的根源嗎?GDB核心轉儲有損壞的堆棧,顯示「堆棧幀無法訪問地址0x12處的內存」
Program terminated with signal 11, Segmentation fault.
#0 0x40173f54 in nanosleep() from /lib/libc.so.6
(gdb) bt
#0 0x40173f54 in nanosleep() from /lib/libc.so.6
#1 0x401b2a1c in __libc_enable_asynccancel() from /lib/libc.so.6
#2 0x0000cdb8 in ??()
Cannot access memory at address 0x12
(gdb) info frame
Stack level 0, frame at 0xbeaedbc0:
pc = 0x40173f54 in nanosleep; saved pc 0x401b2a1c
called by frame at 0xbeaedbd8
Arglist at 0xbeaedbc0, args:
Locals at 0xbeaedbc0, Previous frame's sp is 0xbeaedbc0
(gdb) info frame 1
Stack frame at 0xbeaedbd8:
pc = 0x401b2a1c in __libc_enable_asynccancel; saved pc 0xcdb8
called by frame at Cannot access memory at address 0x12
(gdb) info frame 2
Stack frame at Cannot access memory at address 0x12