Bug 10631 - clarify malloc error message to avoid confusion
Summary: clarify malloc error message to avoid confusion
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.11
: P2 normal
Target Milestone: ---
Assignee: Dmitry V. Levin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-11 20:08 UTC by Kees Cook
Modified: 2014-07-01 06:53 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
replaces "glibc detected" with "malloc error" (313 bytes, patch)
2009-09-11 20:09 UTC, Kees Cook
Details | Diff
more detailed sentence to replace just "glibc detected" (320 bytes, patch)
2009-09-13 16:04 UTC, Kees Cook
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.