Charlie Savage wrote:
Hi Dmitri,

Well, after some looking around it seems to me that the problem appears in ruby_xml_parser.c
when calling
   rb_gc_mark(((rx_string_data *)rxp->data)->str);

Is it possible that ((rx_string_data *)rxp->data)->str is not a proper RVALUE? Or at least without proper ruby type?

Hmm, could be. I don't much like that code (the string,io and file handling) - I think its can be simplified a lot.

Anyway, do you have a test case? Or if not, do you know roughly what is causing this? Is this just a parser parsing a string, or maybe something more complicated is going on like a parser being reused?
I do not have a test case. The code is just loading bunch of file one after another in the string, then parses it and extracts few elements using XPath. Peculiarity of the code is that I am loading couple of hundred thousands of those xml files. The error does not always gets triggered, but if I run it several of times, I certainly get the error after processing at least 30000 files, however sometimes I can load more 400000 without any problems.

I do not know the cause of it yet. Will be looking into it tomorrow, but any help is appreciated.
Please let me know if you have any ideas.

By the way, I am unable to compile current svn trunk.

Did you get the chance to incorporate patch provided by  Tom Bugby?

--
Dmitri Priimak

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

Reply via email to