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 9/19/2012 8:18 AM, 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 ***

Marek, you are not a normal user, you're an expert that doesn't like verbosity and
already knows this is a glibc error :-)

Does it actually matter what you or I *like*?

What do our users need to see?

> I'd be happy also with just:
> *** in ./a.out: free(): invalid next size (fast): 0x084ed538 ***

That's just as terse as the original and doesn't help our users, it's not even clear
that this an error :-(

> I really don't need anything else to be in this diagnostics.
> I find unnecessary verbosity and characters like [ ] rather
> distracting.

That's right, *you* don't need anything, but that's because you're
an expert.

The point of [] is to be distracting and isolate the strings from
the full message.

You raise a good point about the error message being overly terse.

What about this?
~~~
*** Error `free(): invalid next size (fast)' in `./a.out' at 0x084ed538 ***
~~~

This reorders the display into a meaningful sentence.

Cheers,
Carlos.
-- 
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell@mentor.com
carlos@codesourcery.com
+1 (613) 963 1026


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