How can a stack underflow happen in C++?

后端 未结 4 1517
半阙折子戏
半阙折子戏 2020-12-25 15:06

What is a simple example in C++ that causes a stack underflow in the case of invoking and returning from method calls?

I am familiar with the calling convention, i.e

4条回答
  •  孤独总比滥情好
    2020-12-25 15:57

    Normally this would be taken care of by the compiler. In reality, the only way I can think of that you could accidentally cause a stack underflow would be by calling a method implemented with one calling convention as if it was using another calling convention.

提交回复
热议问题