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.