Reputation: 733
I have an application, in C++ over running linux, which on exit gets abort signal. Before I go after the code to hunt down the problem, I need to know what could be the cases in which I shall get an abort signal from kernel. This could give me proper direction to debug.
Please mention each and every potential scenario in which an application could get an abort signal.
@ specifics of execution scenario are,
TIA
Upvotes: 6
Views: 12293
Reputation: 1
The cause for aborted is in general an assertion failure
for example
(gdb) bt
#0 0x00000035fbc30265 in raise () from /lib64/libc.so.6
#1 0x00000035fbc31d10 in abort () from /lib64/libc.so.6
#2 0x00000035fbc296e6 in __assert_fail () from /lib64/libc.so.6
Upvotes: 0
Reputation: 15144
I would try running under valgrind. There could be a memory error even before the abort and valgrind could notice that and tell you. If this is the case, you will find the error much easier than with a conventional debugger like gdb.
Upvotes: 1
Reputation: 7132
When the application crashes, the debugger will give you the line, let you inspect thread, variables...
Other solution:
Root cause can be multiple : reading outside of your memory space, division by 0, dereferencing invalid pointer...
Upvotes: 3