infinite abort() in a backrace of a c++ program core dump

后端 未结 2 1354
余生分开走
余生分开走 2021-02-20 12:24

I have a strange problem that I can\'t solve. Please help!

The program is a multithreaded c++ application that runs on ARM Linux machine. Recently I began testing it for

2条回答
  •  春和景丽
    2021-02-20 13:25

    My guess for the "infinite' aborts is that either abort() causes a loop (e.g. abort -> signal handler -> abort -> ...) or that gdb can't correctly interpret the frames on the stack.

    In either case I would suggest manually checking out the stack of the problematic thread. If abort causes a loop, you should see a pattern or at least the return address of abort repeating every so often. Perhaps you can then more easily find the root of the problem by manually skipping large parts of the (repeating) stack.

    Otherwise, you should find that there is no repeating pattern and hopefully the return address of the failing function somewhere on the stack. In the worst case such addresses are overwritten due to a buffer overflow or such, but perhaps then you can still get lucky and recognise what it is overwritten with.

提交回复
热议问题