I’m having a heck of a time finding an answer to this because of “Stack Overflow”‘s site name. Everything online references stackoverflow.com and whatever words I search on instead! wah!
My question is:
- Does a stack overflow error (say from infinite recursion) cause a core dump?
- Is the core dump useful if it does generate one, or would GDB see it as jibberish?
It does assuming you’ve got your dump setup for it. And yes, it’s very useful, because at the very least it can tell you just where the stack overflowed.
Of course, sometimes the dump unrolls the stack as
for a very large number of
foos, but then you add breakpoints or print statements to see what was happening just before the stack dump.