lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev valgrind


From: Leonid Pauzner
Subject: Re: lynx-dev valgrind
Date: Tue, 4 Feb 2003 01:26:00 +0300 (MSK)

2-Feb-2003 18:08 Thomas Dickey wrote:
> After adding LP's fixes, I see this problem when testing with valgrind
> and the no-leaks configuration.  This is if I do something like visit the
> help page, then another, then the help page again, so it is linked more than
> once in memory.

> ==19625== Invalid read of size 4
> ==19625==    at 0x8110DB6: deleteLinks 
> (../../../WWW/Library/Implementation/HTAnchor.c:526)

Yes, I saw this either (crash under gdb).
Apparently, this is due to
>>++ HTAnchor_link now links only foreign sources -LP
- destinations and sources became unbalanced
(I haven't thought it is so critical).


I made a patch against your dev13b snapshot,
it finishes my play around HTAnchor.c/h.
The patch is rather large but _seems_ trivial and stable.


* simplify (clarify) anchor structure: links now moved from HTAnchor
  to HTChildAnchor (where they only used), by this we avoid unneeded casting
  in calls to HTAnchor_followMainLink, HTAnchor_followTypedLink, deleteLinks.
  [GridText.c, HTML.c, LYList.c, HTAnchor.c]
* as of 1998-11-21 "workaround for multiple anchors in the same (invalid) HTML
  document with the same NAME and different destinations (HTAnchor.c) - KW",
  along with skipping HTAnchor_link() call in this case now, we realize
  that HTChildAnchor may have only a single link. (Previously: mainLink and
  links list). This removes unneeded complication from HTAnchor.c
* simplify HTChunk.c
* optimize LYRemoveNewlines() and LYRemoveBlanks()


 changes                         |    1
 src/gridtext.c                  |   27 ++---
 src/html.c                      |   14 +-
 src/lylist.c                    |   15 +-
 src/lystring.c                  |   37 ++++--
 src/lyutils.h                   |   12 +-
 www/library/implemen/htanchor.c |  215 ++++++++--------------------------------
 www/library/implemen/htanchor.h |   31 +----
 www/library/implemen/htchunk.c  |   77 ++++++--------
 www/library/implemen/htchunk.h  |   21 +++
 www/library/implemen/htdos.c    |    2
 www/library/implemen/htparse.c  |    7 -
 www/library/implemen/sgml.c     |   45 +++++---
 13 files changed, 208 insertions, 296 deletions

Attachment: dev13c.pat
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]