Commit graph

11 commits

Author SHA1 Message Date
Elliott Hughes
52d6233296 Report errors to the log, not just stderr.
In particular this affects assert(3) and __cxa_pure_virtual, both of
which have managed to confuse people this week by apparently aborting
without reason. (Because stderr goes nowhere, normally.)

Bug: 6852995
Bug: 6840813
Change-Id: I7f5d17d5ddda439e217b7932096702dc013b9142
2012-07-27 17:43:38 -07:00
Chris Dearman
00a66a6fe8 [MIPS] Use an aligned address to provoke SIGSEGV in abort()
Change-Id: I269c9ccc07058773fb0f9d70673673157ab38f6a
2012-07-24 17:42:06 -07:00
Ben Cheng
017f438534 Implement the "abort" stub in assembly for ARM.
So that we can always get the full stack trace regardless of gcc's handling
of the "noreturn" attribute associated with abort().

BUG:6455193
Change-Id: Id264a5167e7cabbf11515fbc48f5469c527e34d4
2012-05-08 13:43:12 -07:00
Jim Huang
9d16a79b18 Hide the symbol of helper function __libc_android_abort
Ideally __libc_android_abort would be static, but it could not be
because gcc would not allow calling a static function from an asm
statement.  Instead, using GCC visibility is work around.

Change-Id: Ifff6b9957ca3f0fc03c75c3e42582a48d43cefa2
2010-09-27 22:20:59 +08:00
Andy McFadden
5f32207a3d Wrap ARM abort() to improve stack trace.
The code generated for Thumb and Thumb2 targets has different handling
for abort().  Because abort() is "noreturn", it doesn't need to preserve
the callee-save registers.  The Thumb2 version trashes LR and makes it
impossible to figure out who called abort().

This inserts a trivial stub function; net effect is stack traces are
reasonable after an abort().

For bug 2191452.
2009-10-15 16:29:22 -07:00
Mathias Agopian
e36502673d fix [2170898] abort() doesn't print a stack tarce
the issue here is that abort() can be called from anywhere, in particular
from malloc or free. When we try to use the debug_log functions, these
can end up calling into some code (like malloc/free) that called abort()
in the first place and end up in an infinite recursion loop.
2009-10-06 16:02:12 -07:00
The Android Open Source Project
1dc9e472e1 auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
The Android Open Source Project
1767f908af auto import from //depot/cupcake/@135843 2009-03-03 18:28:13 -08:00
The Android Open Source Project
7d9dcdc82a auto import from //branches/cupcake/...@132569 2009-02-20 07:38:28 -08:00
The Android Open Source Project
d37527501c auto import from //branches/cupcake/...@127101 2009-01-20 14:03:55 -08:00
The Android Open Source Project
a27d2baa0c Initial Contribution 2008-10-21 07:00:00 -07:00