abort() missing return-address => useless core file
Grant Edwards
grant.b.edwards at gmail.com
Sun Nov 20 20:13:17 UTC 2011
On 2011-11-17, Mike Frysinger <vapier at gentoo.org> wrote:
>>> Removing the __noreturn__ attribute from abort's declaration seems
>>> like a pretty good idea if it makes core files usable. It's not like
>>> adding one instruction and taking up one word of stack space is really
>>> worth the sacrifice in the case of abort(). Premature optimization
>>> rears it's ugly head once again... ;)
FWIW, I removed the __noreturn__ attribute from the abort()
declaration in stdlib.h, and corefiles are now usable for obtaining a
backtrace.
>> I would say the same thing about **ALL** noreturn functions, even
>> exit. For instance if exit crashes (e.g. closing stdio files or
>> running atexit handlers) you probably want to be able to see where it
>> was called from...
>
> putting that under a debug knob might be fine, but by default,
> noreturn makes a lot more sense (bloating the code just for
> debugging? yikes).
After removing __noreturn__ from abort() my complete
kernel+rootfs+apps uImage size (compressed) increased from 7373224
bytes to 7373412 bytes. That's a change of 188 bytes out of 7.3
million, or 0.0025%.
Not really a lot of "bloat", but it's apparently a moot point now: I
filed a bug requesting that the __noreturn__ attribute be removed from
abourt() so that it produces backtraceable core files, but the bug has
been declared "invalid".
--
Grant Edwards grant.b.edwards Yow! Someone in DAYTON,
at Ohio is selling USED
gmail.com CARPETS to a SERBO-CROATIAN
More information about the uClibc
mailing list