Handle stack overflow/underflow in VM.