Re: Bug#6398: joe: segfaults on large files
maor@ece.utexas.edu (Guy Maor) wrote on 05.01.97 in <[🔎] 87eng0oa3k.fsf@slip-60-8.ots.utexas.edu>:
> Dale Scheetz <dwarf@polaris.net> writes:
>
> > If so, it should go away when I rebuild it with the new libc5.
>
> No, it won't. I don't know why everyone has this misconception.
That's because everyone still thinks it's a problem in the malloc, when in
fact it's a problem with the program.
"It worked before, so the program must be right".
No, the program isn't right. The old malloc didn't catch the buggy
behaviour.
A frequent cause for this is code that does
a = malloc(...);
free(a);
free(a);
or
a = malloc(...);
free(a);
do_something(*a);
Of course, it's usually obfuscated by a lot of additional code around.
Try using a malloc debugger (electric fence or similar) on programs that
break using the new malloc. It will probably find one bug or another.
MfG Kai
--
This message was delayed because the list mail delivery agent was down.
Reply to: