diff options
-rw-r--r-- | core/stack.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/stack.c b/core/stack.c index 3b92a14..17a4ca4 100644 --- a/core/stack.c +++ b/core/stack.c @@ -112,9 +112,14 @@ void backtrace(void) __print_backtrace(mfspr(SPR_PIR), bt_buf, ents, NULL, NULL, true); } -void __noreturn __nomcount __stack_chk_fail(void); -void __noreturn __nomcount __stack_chk_fail(void) +void __nomcount __stack_chk_fail(void); +void __nomcount __stack_chk_fail(void) { + static bool failed_once; + + if (failed_once) + return; + failed_once = true; prlog(PR_EMERG, "Stack corruption detected !\n"); abort(); } |