summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Dearman <chris@mips.com>2012-07-10 11:46:55 -0700
committerElliott Hughes <enh@google.com>2012-07-24 17:42:06 -0700
commit00a66a6fe84b13751b86d3e18dc7617e4d1dd0b4 (patch)
tree66df44b3f0e149f6e236a11b53e25166ad50c89e
parentc98e2365cdd0c2330711118b689171df143f6399 (diff)
downloadbionic-00a66a6fe84b13751b86d3e18dc7617e4d1dd0b4.zip
bionic-00a66a6fe84b13751b86d3e18dc7617e4d1dd0b4.tar.gz
bionic-00a66a6fe84b13751b86d3e18dc7617e4d1dd0b4.tar.bz2
[MIPS] Use an aligned address to provoke SIGSEGV in abort()
Change-Id: I269c9ccc07058773fb0f9d70673673157ab38f6a
-rw-r--r--libc/unistd/abort.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/unistd/abort.c b/libc/unistd/abort.c
index a3f8c54..58d620d 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);