GDB corrupted stack frame - How to debug?

后端 未结 5 667
天涯浪人
天涯浪人 2020-12-07 06:44

I have the following stack trace. Is it possible to make out anything useful from this for debugging?

Program received signal SIGSEGV, Segmentation fault.
0x         


        
5条回答
  •  没有蜡笔的小新
    2020-12-07 07:42

    If it's a stack overwrite, the values may well correspond to something recognisable from the program.

    For example, I just found myself looking at the stack

    (gdb) bt
    #0  0x0000000000000000 in ?? ()
    #1  0x000000000000342d in ?? ()
    #2  0x0000000000000000 in ?? ()
    

    and 0x342d is 13357, which turned out to be a node-id when I grepped the application logs for it. That immediately helped narrow down candidate sites where the stack overwrite might have occurred.

提交回复
热议问题