Bug 10631

Summary: clarify malloc error message to avoid confusion
Product: glibc Reporter: Kees Cook <kees>
Component: libcAssignee: Dmitry V. Levin <ldv>
Status: RESOLVED FIXED    
Severity: normal CC: glibc-bugs
Priority: P2 Flags: fweimer: security-
Version: 2.11   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: replaces "glibc detected" with "malloc error"
more detailed sentence to replace just "glibc detected"

Description Kees Cook 2009-09-11 20:08:59 UTC
The current malloc error message template is "*** glibc detected *** [argv0]:
[error]: [addr] ***".  Due to the second "***", the whole message is frequently
parsed as two statements, leading to confusion for some people. The phrase
"glibc detected" is misleading, since it was not glibc that was detected but
rather the error itself.  glibc did the detecting.  ("[I have] detected glibc"
vs "glibc detected [an error]".)

I would suggest one of:
 - dropping the middle ***'s
 - changing the "glibc detected" string to "malloc error"
 - dropping the middle ***'s and changing the "glibc detected" string to "glibc
has detected"
Comment 1 Kees Cook 2009-09-11 20:09:27 UTC
Created attachment 4189 [details]
replaces "glibc detected" with "malloc error"
Comment 2 Ulrich Drepper 2009-09-11 23:12:06 UTC
Nonsense, the message is clear.
Comment 3 Petr Baudis 2009-09-13 08:51:11 UTC
Can you please reconsider? I'm getting quite a few false bugrepors against glibc
about "glibc bug" with this message; people are indeed getting confused by
thinking this is some kind of internal error, IMHO. Changing to "malloc error"
would help a lot.
Comment 4 Jakub Jelinek 2009-09-13 10:12:30 UTC
malloc error would be far more confusing, people would think this is an error in
the malloc implementation.
Comment 5 Kees Cook 2009-09-13 16:04:09 UTC
Created attachment 4194 [details]
more detailed sentence to replace just "glibc detected"

In this case, how about this patch, which leaves no run for misunderstanding:
*** glibc has detected an error in %s: %s: 0x%s ***
Comment 6 Ulrich Drepper 2009-09-13 18:14:26 UTC
Perhaps you should educate your users.  There is no problem.
Comment 7 Kees Cook 2009-09-14 02:33:04 UTC
Well, some people will make it as far as opening bugs against glibc:
http://sourceware.org/bugzilla/show_bug.cgi?id=1483

I agree that education would be helpful -- making it clear in the error message
itself that the problem is not with glibc.  I think it would keep bugs like the
above URL out of the tracker here, or in distro bug trackers.
Comment 8 Dmitry V. Levin 2012-09-17 22:14:21 UTC
(In reply to comment #7)
> Well, some people will make it as far as opening bugs against glibc:
> http://sourceware.org/bugzilla/show_bug.cgi?id=1483
> 
> I agree that education would be helpful -- making it clear in the error message
> itself that the problem is not with glibc.  I think it would keep bugs like the
> above URL out of the tracker here, or in distro bug trackers.

I agree.