Possible Duplicate:
What is the difference between a segmentation fault and a stack overflow?
I was just wondering, why stack overflow results in segmentation fault instead of stack overflow.
Is it because the boundary of stack limit is crossed which causes SIGSEGV? Why we don't encounter stack overflow in Linux, and rather a segmentation fault?
int foo()
{
return foo();
}
This small code should cause stack overflow but rather it causes segmentation fault in Linux.