Out of interest, is it possible to set up GDB on Linux as a Just In Time (JIT) debugger?
(Note that here JIT refers to the debugger, not to what it's debugging.)
My experience with this kind of problem is with Windows -- those problematic cases where the bug never, ever occurs when running the app under the debugger, due to memory alignment differences or whatever. So I run the repro scenario as normal but with the JIT debugger configured. Then, when the app crashes, the debugger is automatically launched and attached to the process so I can see what's happened (hopefully!)
PS A quick Google later...
If these threads read like I think they do, this means you have to compile a signal handler into you app to achieve the same effect. Is that true? Or is there a more generic way to trigger a debugger to launch and attach to a process when it crashes on Linux?
Waiting with a crash for a debugger?
Re: Just-in-time debugging on Linux - msg#00069
Also, how to set up WinDbg on Windows for post mortem (aka JIT) debugging, so you know what I'm talking about?
Enabling Postmortem Debugging