There are certain conditions that can cause stack overflows on an x86 Linux system:
struct my_big_object[HUGE_NUMBER]
on the stack. Walking throu
alloca() is going to return NULL on failure, I believe the behavior of alloca(0) is undefined and platform variant. If you check for that prior to do_something(), you should never be hit with a SEGV.
I have a couple of questions:
The question is interesting but raises an eyebrow. It raises the needle on my square-peg-round-hole-o-meter.