This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: malloc patch for 2.2.4
- To: chris at ludwig-alpha dot unil dot ch
- Subject: Re: malloc patch for 2.2.4
- From: Wolfram Gloger <Wolfram dot Gloger at dent dot med dot uni-muenchen dot de>
- Date: Thu, 30 Aug 2001 16:10:34 +0200 (MDT)
- CC: libc-alpha at sources dot redhat dot com
- References: <200108292048.WAA17104@ludwig-alpha.unil.ch>
> Thanks for the suggestions. I just completed some tests using MALLOC_CHECK_.
>
> Now, if I run in multi-threaded mode(switch -a 2), I get a few messages:
> $ MALLOC_CHECK_=1 /usr/src/redhat/BUILD/ncbi/build/megablast
> -d "est_hum-re est_hum-up" -i chrom21_f.seq -f T -J F -F F -W 48
> -a 2 >chrom21_ESTs </dev/null
> malloc: using debugging hooks
> free(): invalid pointer 0x9630bc0!
...
> The darndest thing is that in both cases the program completes successfuly,
> and produces the correct results... The SegV doesn't occur in this case.
This indicates very strongly that you have an overrun of a single or a
few bytes somewhere. With MALLOC_CHECK_ set, an overrun of a single
byte is _always_ caught without crashing since an extra byte is
allocated for every chunk.
Please use MALLOC_CHECK_=1 and set a breakpoint on the first free()
which is detecting an invalid pointer. Voila, you've got the chunk
that was overrun by the application.
Regards,
Wolfram.