From 18ec502cfe3e1aa544c8f1e12530a9c951f80321 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Tue, 18 Oct 2016 02:35:21 +0300 Subject: [PATCH] Fine tuning the stack-overflow tester detection --- Tester/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tester/main.c b/Tester/main.c index ad5633ad..65a12b6d 100755 --- a/Tester/main.c +++ b/Tester/main.c @@ -82,7 +82,7 @@ static void vblank(GB_gameboy_t *gb) /* Detect common crashes and stop the test early */ if (frames < test_length - 1) { - if (gb->backtrace_size >= 0x300) { + if (gb->backtrace_size >= 0x200 || (gb->registers[GB_REGISTER_SP] >= 0xfe00 && gb->registers[GB_REGISTER_SP] < 0xff80)) { GB_log(gb, "A stack overflow has probably occurred.\n"); frames = test_length - 1; }