Hi,

>> However, the error disappears if "GC.start" is inserted just above
>> XML::Document.file(...).
>
> Right.  This is another Ruby GC issue.  If you don't call GC.start, then
>  all the documents that you have created remain open.  I assume this causes
> the OS to eventually run out of file handles, thus resulting in the error
> (which is being raised by libxml not Ruby).
>
> By calling GC.start, the documents are freed and the file handles are
> released.
>
> So I don't see this as a bug in the libxml bindings.

Maybe you are right, but if I change XML::Document.file("test.xml")
to File.open("test.xml"), I won't run out of file handles.

I wonder what makes the difference...

And if I remember correctly, even the original test code with
libxml-ruby 3.8 did not run out of file handles on 32bit intel machines
either - the reported segfault only affected the amd64 (and maybe
other) architecture.

Masashi
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to