public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/6522] New: abort should not be marked noreturn
@ 2008-05-15  9:13 dak at gnu dot org
  2008-05-28 12:56 ` [Bug libc/6522] " dak at gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dak at gnu dot org @ 2008-05-15  9:13 UTC (permalink / raw)
  To: glibc-bugs

the principal raison d'etre of abort is to die with a core dump
(typically on failed assertions).  I am not the only person who spent
days of useless post-mortem debugging (or debugging with a breakpoint on
abort) because of gcc's optimization of -fcross-jumping, which means
that gcc recycles a single abort call (with inconsistent stack state)
all across a function.

That means that the core dump has _both_ incoherent and unexpected stack
state, as well as pointing to a completely wrong position in the source
file.

The principal purpose of the noreturn attribute is to allow for
inconsistent stack state and call recycling.  So its effects, if any,
are directly in conflict with the purpose of abort, an unorderly exit
with the main purpose to facilitate debugging.

While technically abort _does_ not return, telling the compiler so is
giving it leave to eradicate its call history.  And that is not useful
at all when debugging.  Since the presence of -g should not alter the
code, abort should not be marked noreturn.

-- 
           Summary: abort should not be marked noreturn
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: dak at gnu dot org
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6522

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-06-17 13:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-15  9:13 [Bug libc/6522] New: abort should not be marked noreturn dak at gnu dot org
2008-05-28 12:56 ` [Bug libc/6522] " dak at gnu dot org
2008-06-12 15:21 ` madcoder at debian dot org
2008-06-13  6:20 ` drepper at redhat dot com
2008-06-13  8:45 ` dak at gnu dot org
2008-06-13 14:28 ` drepper at redhat dot com
2008-06-16 19:39 ` bmark at us dot ibm dot com
2008-06-17  9:20 ` dak at gnu dot org
2008-06-17 11:41 ` schwab at suse dot de
2008-06-17 11:55 ` dak at gnu dot org
2008-06-17 13:38 ` joseph at codesourcery dot com
2008-06-17 13:44 ` dak at gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).