Bug 149205 - malloc: top chunk is corrupt w/ MALLOC_CHECK_=3
malloc: top chunk is corrupt w/ MALLOC_CHECK_=3
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-02-20 22:00 EST by jordan hargrave
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-10 16:17:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
mtest.c - causes glibc error message if MALLOC_CHECK_=3 is set (232 bytes, text/plain)
2005-02-20 22:01 EST, jordan hargrave
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Sourceware 457 None None None Never

  None (edit)
Description jordan hargrave 2005-02-20 22:00:18 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020903

Description of problem:
When allocating memory with the MALLOC_CHECK_=3 environment variable set, glibc
will display an error message:

malloc: top chunk is corrupt (RHEL3)
*** glibc detected *** : malloc top chunk is corrupt: <ptr> (RHEL4)

If the MALLOC_CHECK_ environment variable is not set, no message is displayed

Version-Release number of selected component (if applicable):
glibc-2.3.3-53  && glibc-2.3.2-95.27 (RHEL3)

How reproducible:

Steps to Reproduce:
1. Turn on malloc check: export MALLOC_CHECK_=3
2. Run mtest utility

Actual Results:  Error message is displayed and the program exits

Expected Results:  glibc should return NULL for malloc()

Additional info:

Message is not displayed for glibc 2.2.4-32 or glibc-2.2.5-164
Comment 1 jordan hargrave 2005-02-20 22:01:36 EST
Created attachment 111248 [details]
mtest.c - causes glibc error message if MALLOC_CHECK_=3 is set
Comment 2 Jakub Jelinek 2005-02-21 04:00:06 EST
glibc-2.3.3-53 is not what is shipped in RHEL4.
With glibc-2.3.4-2 I can't reproduce this both on i686 and x86_64 running 32-bit
MALLOC_CHECK_=3 ./mtest
malloc: using debugging hooks
.........................success: 5fec

ALLOC_CHECK_=3 ./mtest
malloc: using debugging hooks
.................................success: 7fee

Though I can reproduce it with glibc-2.3.2-95.30.
Comment 3 Jakub Jelinek 2005-02-21 04:13:24 EST
I believe the fix was BZ#457, will check.
Comment 4 Jakub Jelinek 2005-02-21 04:44:48 EST
Yeah, fixes this for RHEL3.  Queued for RHEL3 U5.
Comment 5 Jay Turner 2005-02-21 05:45:33 EST
So appears this is a RHEL3 bug only . . . RHEL4 isn't affected, right?  If
that's the case, then I'll switch the product/version to be appropriate.
Comment 6 Jakub Jelinek 2005-02-23 09:56:58 EST
A fixed RHEL3 glibc candidate at ftp://people.redhat.com/jakub/glibc/2.3.2-95.33/
Comment 7 Dilpreet Gulati 2005-04-29 07:12:21 EDT
This is fixed in RHEL3 U5 beta, glibc-2.3.2-95.33
Comment 8 Tim Powers 2005-05-18 10:00:17 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.