It's sound like the backtrace is corrupted a little. I can use valgrind instead gdb but i'm pretty sure than the non-reentrency problem will diseapear because valgrind slowdown application.