You should try this before running GDB

ulimit -c unlimited

It might increase the size of stack....