Why does the linux kernel generate a segfault on stack overflow? This can make debugging very awkward when alloca in c or fortran creation of temporary arrays overflows. Sur
Simply use Valgrind. It will point out all your memory allocation mistakes with excruciating preciseness.