This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Question about malloc_useable_size
- From: Wolfram Gloger <wmglo at dent dot med dot uni-muenchen dot de>
- To: kukuk at suse dot de
- Cc: libc-alpha at sources dot redhat dot com
- Date: 13 Jun 2005 09:01:25 -0000
- Subject: Re: Question about malloc_useable_size
- References: <20050610133557.GA9697@suse.de>
Hi,
> netgrp->data was created with malloc (len + 1); But there is a
> report (see Bug #962), that the assert sometimes fails with
> malloc_usable_size (netgrp->data) reporting 992, while len is 1002.
> How can this happen?
I cannot see a bug in the netgrp->data allocation, either. However,
this does point toward a bug, perhaps the previous chunk is overrun
somewhere in the application and malloc's internal size field is
changed from 1008 to 992. On little-endian arch, this could be caused
by a single byte overrun.
Regards,
Wolfram.