Bug 68499 - glibc-2.2.90-14 MALLOC_CHECK_=1 is broken
glibc-2.2.90-14 MALLOC_CHECK_=1 is broken
Status: CLOSED RAWHIDE
Product: Red Hat Public Beta
Classification: Retired
Component: glibc (Show other bugs)
limbo
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks: 67217
  Show dependency treegraph
 
Reported: 2002-07-10 14:28 EDT by Jonathan Kamens
Modified: 2016-11-24 10:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-07-10 18:36:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
program to illustrate MALLOC_CHECK_ bug (352 bytes, text/plain)
2002-07-10 14:36 EDT, Jonathan Kamens
no flags Details

  None (edit)
Description Jonathan Kamens 2002-07-10 14:28:54 EDT
I have glibc-2.2.90-14.i686.rpm.  I compile the attached program, set the
MALLOC_CHECK_ environment variable to 0, and then run it, and I get this ouput:

jik:/tmp!75> ./a.out
malloc: using debugging hooks
ptr=0x0, new_ptr=0x80495d0, i=4000
ptr=0x80495d0, new_ptr=0x80495d0, i=8000
ptr=0x80495d0, new_ptr=0x80495d0, i=16000
ptr=0x80495d0, new_ptr=0x80495d0, i=32000
ptr=0x80495d0, new_ptr=0x80495d0, i=64000
ptr=0x80495d0, new_ptr=0x80495d0, i=128000
ptr=0x80495d0, new_ptr=0x40023008, i=256000
ptr=0x40023008, new_ptr=0x0, i=512000

Without MALLOC_CHECK_ set, I get this:

jik:/tmp!77> ./a.out
ptr=0x0, new_ptr=0x80495d0, i=4000
ptr=0x80495d0, new_ptr=0x80495d0, i=8000
ptr=0x80495d0, new_ptr=0x80495d0, i=16000
ptr=0x80495d0, new_ptr=0x80495d0, i=32000
ptr=0x80495d0, new_ptr=0x80495d0, i=64000
ptr=0x80495d0, new_ptr=0x80495d0, i=128000
ptr=0x80495d0, new_ptr=0x40023008, i=256000
ptr=0x40023008, new_ptr=0x40023008, i=512000
ptr=0x40023008, new_ptr=0x40023008, i=1024000
ptr=0x40023008, new_ptr=0x40023008, i=2048000
ptr=0x40023008, new_ptr=0x40023008, i=4096000
ptr=0x40023008, new_ptr=0x40023008, i=8192000
ptr=0x40023008, new_ptr=0x40023008, i=16384000
ptr=0x40023008, new_ptr=0x40023008, i=32768000
ptr=0x40023008, new_ptr=0x42119008, i=65536000
ptr=0x42119008, new_ptr=0x42119008, i=131072000
ptr=0x42119008, new_ptr=0x42119008, i=262144000
ptr=0x42119008, new_ptr=0x42119008, i=524288000
ptr=0x42119008, new_ptr=0x0, i=1048576000

The latter is correct.

I'm not sure it's OK to ship the next release with MALLOC_CHECK_ broken like
this.  It is significant glibc functionality.
Comment 1 Jonathan Kamens 2002-07-10 14:36:37 EDT
Created attachment 64626 [details]
program to illustrate MALLOC_CHECK_ bug
Comment 2 Jakub Jelinek 2002-07-24 11:17:35 EDT
Fixed in glibc-2.2.90-15.

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