Random failures when calling free()/malloc()

Andreas Jaeger aj@suse.de
Sun Jul 20 07:08:00 GMT 2003


Martin Schlemmer <azarah@gentoo.org> writes:

> On Sat, 2003-07-19 at 18:39, Dan Kegel wrote:
>> BTW, have you cranked glibc's malloc debugging setting
>> up to the max?  There's also a sanity check routine you
>> could call periodically before the failure...
>
> Ok, got this:
>
> --------------------------------------
> malloc.c:3212: munmap_chunk: Assertion `((p->prev_size + size) &
> (mp_.pagesize-1)) == 0' failed.
> --------------------------------------
>
> Pretty much the same as the rest, just ending in the assert and not
> the unlink().
>
> Any ideas will be appreciated.

Go back from this point in your program and check what you've done.
You're application has written beyond/before some area that you
allocated thereby destroying the internal malloc structure.  

This is really a bug in your application and nothing in glibc, so
let's close this discussion here on this list which is for glibc
development,

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126



More information about the Libc-alpha mailing list