Bug 68499 - glibc-2.2.90-14 MALLOC_CHECK_=1 is broken
Summary: glibc-2.2.90-14 MALLOC_CHECK_=1 is broken
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: glibc
Version: limbo
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 67217
TreeView+ depends on / blocked
 
Reported: 2002-07-10 18:28 UTC by Jonathan Kamens
Modified: 2016-11-24 15:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-07-10 22:36:20 UTC
Embargoed:


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

Description Jonathan Kamens 2002-07-10 18:28:54 UTC
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 18:36:37 UTC
Created attachment 64626 [details]
program to illustrate MALLOC_CHECK_ bug

Comment 2 Jakub Jelinek 2002-07-24 15:17:35 UTC
Fixed in glibc-2.2.90-15.


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