Is it possible to predict a stack overflow in C on Linux?

前端 未结 12 1543
遇见更好的自我
遇见更好的自我 2021-01-13 14:44

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
12条回答
  •  星月不相逢
    2021-01-13 15:22

    Several compilers, for example Open Watcom C/C++, support stackavail() function that lets you do exactly that

提交回复
热议问题