How to detect possible / potential stack overflow problems in a c / c++ program?

前端 未结 9 1882
滥情空心
滥情空心 2020-12-04 21:55

Is there a standard way to see how much stack space your app has and what the highest watermark for stack usage is during a run?

Also in the dreaded case of actual o

9条回答
  •  广开言路
    2020-12-04 22:31

    On Linux, the Gnu libsigsegv library includes the function stackoverflow_install_handler, which can detect (and in some cases help you recover from) stack overflow.

提交回复
热议问题