This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [BZ #10631] Clarify malloc error diagnostics to avoidconfusion


On Wed, Sep 19, 2012 at 02:18:44PM +0200, Marek Polacek wrote:
> On Tue, Sep 18, 2012 at 03:14:13PM -0400, Carlos O'Donell wrote:
> > Old string example:
> > *** glibc detected *** ./a.out: free(): invalid next size (fast): 0x084ed538 ***
> > 
> > New string example:
> > *** glibc has detected an error in ./a.out: free(): invalid next size (fast): 0x084ed538 ***
> > 
> > It now says:
> > * Who detected the error? glibc detected the error.
> > * What had the error? The application had the error.
> > 
> > We should also quote the application name and error message e.g.
> > 
> > *** glibc has detected an error in [./a.out], the error is: [free(): invalid next size (fast)]: 0x084ed538 ***
> 
> Uh, I don't like this very much.  Why not just 
> *** error in `./a.out': free(): invalid next size (fast): 0x084ed538 ***
> 
> I'd be happy also with just:
> *** in ./a.out: free(): invalid next size (fast): 0x084ed538 ***
> 
> I really don't need anything else to be in this diagnostics.
> I find unnecessary verbosity and characters like [ ] rather
> distracting.

I think the original intent of mentioning glibc in the error message
was to make it clear that users/developers who encounter the error
should not go searching through their application's source trying to
find the code generating the message (and get frustrated when they
can't find it). I'm not sure if this is a good justification, and the
current message is horribly misleading; most users reading it
interpret it as saying that an error/bug named glibc was detected,
which while amusing, should probably be fixed...

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]