title: Why stack overflow causes segmentation fault instead of stack overflow in Linux?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2685413/what-is-the-difference-between-a-segmentation-fault-and-a-stack-overflow">What is the difference between a segmentation fault and a stack overflow?</a>  </p>
  </blockquote>
  
  
  
  <p>I was just wondering, why stack overflow results in segmentation fault instead of stack overflow.</p>
  
  <p>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?</p>
  
  <pre><code>int foo()
  {
    return foo();
  }
  </code></pre>
  
  <p>This small code should cause stack overflow but rather it causes segmentation fault in Linux.</p>