[PATCH] fix to malloc checking

James Lemke jwlemke@codesourcery.com
Wed Feb 4 18:56:00 GMT 2015


> glibc testing would sometimes generate this failure for me:
>    FAIL: malloc/tst-malloc-usable.out
>    malloc_usable_size: expected 7 but got 11


On 12/11/2014 06:03 AM, Andreas Schwab wrote:
> This is broken, please revert.
>
> $ MALLOC_CHECK_=3 iconv/iconvconfig --prefix=$PWD/root
> *** Error in `iconv/iconvconfig': free(): invalid pointer: 0x09f15018 ***


Sorry for the delay in returning to this.

My previous patch used a second checking byte (minimum 2, up from 1) that was
a problem in some circumstances.  This patch stays with a minimum of 1 byte.
It is a bit simpler.  Only the code to generate the checking bytes is
modified.  The verification code is essentially unchanged from the original.

This version solves the original problem, passes the iconvconfig test above
and my own testing.

OK to commit?

-- 
Jim Lemke, GNU Tools Sourcerer
Mentor Graphics / CodeSourcery
Orillia, Ontario
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 14619-gli-0204a.diff
Type: text/x-diff
Size: 4707 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150204/b4516ded/attachment.bin>


More information about the Libc-alpha mailing list