There are certain conditions that can cause stack overflows on an x86 Linux system:
struct my_big_object[HUGE_NUMBER]
Several compilers, for example Open Watcom C/C++, support stackavail() function that lets you do exactly that