This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about malloc_useable_size


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]