What is the difference between a segmentation fault and a stack overflow?

Posted by AruniRC on Stack Overflow See other posts from Stack Overflow or by AruniRC
Published on 2010-04-21T18:08:05Z Indexed on 2010/04/21 18:13 UTC
Read the original article Hit count: 447

For example when we call say, a recursive function, the successive calls are stored in the stack. However, due to an error if it goes on infinitely the error is 'Segmentation fault' (as seen on GCC).

Shouldn't it have been 'stack-overflow'? What then is the basic difference between the two?

Btw, an explanation would be more helpful than wikipedia links (gone through that, but no answer to specific query).

© Stack Overflow or respective owner

Related posts about segmentation-fault

Related posts about stackoverflow