From 00a66a6fe84b13751b86d3e18dc7617e4d1dd0b4 Mon Sep 17 00:00:00 2001 From: Chris Dearman Date: Tue, 10 Jul 2012 11:46:55 -0700 Subject: [PATCH] [MIPS] Use an aligned address to provoke SIGSEGV in abort() Change-Id: I269c9ccc07058773fb0f9d70673673157ab38f6a --- libc/unistd/abort.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libc/unistd/abort.c b/libc/unistd/abort.c index a3f8c5423..58d620d2f 100644 --- a/libc/unistd/abort.c +++ b/libc/unistd/abort.c @@ -79,7 +79,12 @@ abort(void) /* temporary, for bug hunting */ /* seg fault seems to produce better debuggerd results than SIGABRT */ +#ifdef __mips__ + /* An access that will generate SIGSEGV rather than SIGBUS. */ + *((char*)0xdeadc0c0) = 39; +#else *((char*)0xdeadbaad) = 39; +#endif /* -- */ (void)kill(getpid(), SIGABRT);