Merging calls to `abort'
Jeffrey A Law
law@redhat.com
Tue Mar 15 01:32:00 GMT 2005
On Mon, 2005-03-14 at 16:17 -0800, Joe Buck wrote:
> On Mon, Mar 14, 2005 at 06:44:16PM -0500, Richard Stallman wrote:
> > After some 20 years of developing popular free software, I have
> > somewhat of an idea what users are likely to do.
>
> Many of us have developed software for a similar period of time,
> and yet feel differently.
Right.
> Agreed. However, if this is a frequently reported bug, then the
> developer might well know, as soon as he sees the error from the second
> user, that it is the same bug, while if there is only an abort there
> is less information.
Right. Through the years I've found file and line number information
provided by a fancy abort have been enough to identify the more common
internal failures in releases and even from time to time internal
failures during development.
> If the developer does not answer the bug report
> promptly, the user might still find information about the crash with
> a web search, because a search for
>
> tool: fatal internal error in frobnicate.c, frob_all_elements, line 372
>
> is likely to find something if it exists, while a search for
>
> abort - core dumped
>
> is less likely to find something useful.
Absolutely.
I also think that the message itself is more comforting than just a
plain abort. ie, if we look at the range of failures some are more
reassuring/friendly than others. On one end we have naked segmentation
faults. On the other we might have diagnostics which indicate that
a particular feature is unimplemented. In between we have a naked
abort and an abort with a potentially useful message indicating
file/line information and possibly the cause of the abort.
> Now, I wouldn't object to hacking GCC to avoid cross-jumping calls to
> abort. It's just that I don't think that the common GNU use of abort
> serves the users.
Agreed. And as someone suggested, rather than treating abort
specially within GCC, I think we'd be better off with a function
attribute which prevented cross jumping to any function with
the attribute set.
Jeff
More information about the Gcc
mailing list