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]

Re: malloc patch for 2.2.4


> 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.


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