From 648c0f66850375e518e00840c58496586f1bf595 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 18 Jan 2014 09:58:48 -0800 Subject: [PATCH] Avoid an infinite loop on bad stack walk. If the address is wrong, it'll re-trigger debug mode, which will re-walk the stack, which will continue ad infinitum. --- Core/MIPS/MIPSStackWalk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/MIPS/MIPSStackWalk.cpp b/Core/MIPS/MIPSStackWalk.cpp index f520461e37..5cac3df7c8 100644 --- a/Core/MIPS/MIPSStackWalk.cpp +++ b/Core/MIPS/MIPSStackWalk.cpp @@ -102,7 +102,7 @@ namespace MIPSStackWalk { frame.entry = pc; frame.stackSize = -_IMM16; - if (ra_offset != -1) { + if (ra_offset != -1 && Memory::IsValidAddress(frame.sp + ra_offset)) { ra = Memory::Read_U32(frame.sp + ra_offset); } return true;