This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] malloc: Abort on heap corruption, without a backtrace [BZ #21754]
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Florian Weimer <fweimer at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 18 Aug 2017 08:29:05 -0700
- Subject: Re: [PATCH] malloc: Abort on heap corruption, without a backtrace [BZ #21754]
- Authentication-results: sourceware.org; auth=none
- References: <2fdd6ddc-b59d-c9c7-52f4-4899159e1516@redhat.com>
Thanks, I like the overall change too. One quibble:
+ __libc_message (do_abort, "Fatal glibc error in malloc: %s\n", str);
This change to the message wording won't work well, as the user will see
redundant text like "Fatal glibc error in malloc: malloc(): memory corruption
(fast)". Also, the wording "glibc error" suggests that there must be a fault in
glibc, whereas it's more likely that the fault is in the application. I suggest
changing the above line to:
__libc_message (do_abort, "%s\n", str);
This is simpler, and this way glibc will keep using the same wording that it's
been using for a while.