[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV devel code / fotemods core dumps
From: |
Foteos Macrides |
Subject: |
Re: LYNX-DEV devel code / fotemods core dumps |
Date: |
Fri, 02 May 1997 15:29:55 -0500 (EST) |
Foteos Macrides <address@hidden> wrote:
>[...]
> As Klaus pointed out, that's not due to anything wrong
>with the code in LYMap.c (as far as visual inspections of the code,
>and walks through it with a debugger, are concerned). [...]
Well, this shows how much stock one can put in "looking"
at the code for problems, of even walking through it line by line
with a debugger...
The bug was at the bottom of LYAddImageMap() in LYMap.c.
It wasn't checking whether a stale MAP was being "cleaned out"
but still recycled, to avoid the pointless overhead of freeing
and reallocating it entirely. And if it wasn't being allocated
entirely, then it shouldn't be added to the HTList again, either:
[...]
PUBLIC BOOL LYAddImageMap ARGS2(
[...]
new = (old != NULL) ?
old : (LYImageMap *)calloc(1, sizeof(LYImageMap));
[...]
if (new != old)
HTList_addObject(LynxMaps, new);
[...]
i.e., add that if().
Fote
=========================================================================
Foteos Macrides Worcester Foundation for Biomedical Research
address@hidden 222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;