W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2001

Core dumps after HTTP requests. Bug fix in HTAnchor.c (cvs patche d versions).

From: Michel Philip <mphilip@infovista.com>
Date: Mon, 23 Apr 2001 06:12:23 -0400 (EDT)
Message-ID: <F520B214418AD4119F7000508BD90CC294B8B4@hq01sr02.infovista.com>
To: "'www-lib@w3.org'" <www-lib@w3.org>
Hi all,

This is my bug fix for the patched version of HTAnchor.c.
This also my bug fix for the standard version.

If you just use the standard version rather refer to my next mail.

First thank to libwww hackers who provide invaluable contributions 
to the libwww code base.

Thank InfoVista I can spend some time last week, testing HTTP requests 
with libwww.

As far I've understood HTAnchor's code, actually the adult_table 
shares the objects of its lists (object of type HTParentAnchor) 
with the tree of parents/childs anchors.

With such a data structure it's impossible to safely destroy it.

One way could be to use reference counters. 
But I believe this will not match the initial design when adult_table.
had been implements. I believe the design was to never clean adult_table
cause even if you swept all the web it can't grow infinitely (memory leaks 
comes from other bugs) and as it's shared by all requests it give better 
performances to keep unchanged.

However a little bug in HTAnchor_findAdress makes the structure wrong.
I believe that not the HTParentAnchor must be share, but only the address.
Such it becomes possible to safely call the HTAnchor_delete function and let
the adult_table unchanged.
Notes that one also must not HT_FREE(me->address) in 'delete_parent' 'cause
it's shared.

Here is attached diff output which can be applied to the patched version of
(the one which is on cvsweb).

Hope this help. 



Received on Monday, 23 April 2001 06:15:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:54 UTC