In message <[EMAIL PROTECTED]> Chris McGrath <[EMAIL PROTECTED]> wrote:
> On 11 Jun 2007, at 20:07, Tom Hughes wrote: > >> That was the point - my patches never made it to the list because >> they were held for moderation and they still haven't been approved. > > Stick them up on http://pastie.caboo.se and post the links here. Right... First up, here's the simple one, which is a leak in document.to_s when converting a document to a string where it leaks a copy of the document text: http://trac.openstreetmap.org/attachment/ticket/482/libxml-leak2.patch The one that caused real grief trying to fix it is this: http://trac.openstreetmap.org/attachment/ticket/482/libxml-leak1.patch The basic problem is the failure to free nodes when copying them into a document, but fixing that reveals lots of problems with libxml nodes and attributes being used via ruby objects after libxml has already freed them. The problem is that when a node is attached to another node you wind up with a libxml level C object that is owned both by another libxml C object (which is itself owned by a ruby object) and by a ruby object. If the parent C object goes away first then it frees the other object that is still be used by a ruby object... The patch therefore winds up doing a major rework of the way the libxml wrapper is handling node and attribute objects. Both those patches have been in use on www.openstreetmap.org for several weeks now and have helped substantially with the problems we were having. Tom -- Tom Hughes ([EMAIL PROTECTED]) http://www.compton.nu/ _______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel