•By default stack size is 1Mb (compiler
dependent), however this limit can be changed by linker /STACK option
•If stack grows beyond the limit than stack
overflow exception occurs (exception
code C00000FD)
•Caused by:
•
•unlimited
recursion
•
•int func()
•{
– func();
– return 0;
•}
•
•very big local
variables
•
•int func()
•{
– int array[1000000] = { 1 };
– printf("%d",
array[1000000-1]); // use array to
prevent the compiler to optimize it away
•}