Tom Hughes wrote:
Having upgraded to libxml-ruby 1.0.0 yesterday I am now seeing
repeatable crashes in the garbage collection. The end of the trace looks
like:
#0 rxml_attr_mark (xattr=0x0) at ruby_xml_attr.c:41
#1 0xb7ed6a15 in gc_mark_children (ptr=3050895040, lev=1) at gc.c:945
#2 0xb7ed6c49 in mark_locations_array (x=0xbfc32f90, n=39) at gc.c:629
#3 0xb7ed6e17 in garbage_collect () at gc.c:1366
#4 0xb7ed79c5 in ruby_xmalloc (size=48) at gc.c:103
#5 0xb71855fa in xmlNewPropInternal (node=0xa20a190, ns=0x0,
name=0x84983b0 "k", value=0xa20a170 "created_by", eatname=0) at tree.c:1791
One of my colleagues thinks he has spotted the problem:
"the attribute is being allocated (rxml_attr_alloc), which sets the data
pointer to NULL. almost immediately, the initialise method is called
(rxml_attr_initialize) where the self object has that NULL data
pointer. when it gets to xmlNewProp it triggers the GC which tries to
mark the current object, which hasn't finished initialising yet...
Making rxml_attr_mark() return immediately if xattr is null seems to
have stopped it segving anyway - the mark routine for nodes is already
doing that in fact.
Tom
--
Tom Hughes (t...@compton.nu)
http://www.compton.nu/
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel