summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2012-07-24 17:42:51 -0700
committerandroid code review <noreply-gerritcodereview@google.com>2012-07-24 17:42:51 -0700
commitc27103d84c124d40f3f4cff46d7cfa74342e0585 (patch)
tree66df44b3f0e149f6e236a11b53e25166ad50c89e
parentc98e2365cdd0c2330711118b689171df143f6399 (diff)
parent00a66a6fe84b13751b86d3e18dc7617e4d1dd0b4 (diff)
downloadbionic-c27103d84c124d40f3f4cff46d7cfa74342e0585.zip
bionic-c27103d84c124d40f3f4cff46d7cfa74342e0585.tar.gz
bionic-c27103d84c124d40f3f4cff46d7cfa74342e0585.tar.bz2
Merge "[MIPS] Use an aligned address to provoke SIGSEGV in abort()"
-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);