GNOME Bugzilla – Bug 153175
crash in xmlFreeDoc after parsing xml chunk with xmlParseInNodeContext()
Last modified: 2009-08-15 18:40:50 UTC
After parsing a chunk of XML with xmlParseInNodeContext() and then inserting it into the document, xmlFreeDoc() crashes in tree.c:3326 (example program is following). Note that the crash goes away if you do any of the following 1) use XML_PARSE_NODICT flag in xmlParseInNodeContext() function 2) remove the "xsi:type" declaration from the parsed by xmlParseInNodeContext() function buffer 3) change the node content in the parsed by xmlParseInNodeContext() function buffer (to avoid crash, the content should *not* be a single character or a single digital or a serials of blank) Comment from Daniel: "This sounds like a dictionnary mixup bug..." More info about this problem could be found in the following thread http://www.aleksey.com/pipermail/xmlsec/2004/002167.html
Created attachment 31735 [details] test program that shows crash
Created attachment 31736 [details] test file needed to run test program This file should be in the same folder as the test program executable
I added coding to force the XML_PARSE_NODICT option if the doc from the context node does not have it's own dictionary. This certainly fixes your test program - could you please check whether it solves your original problem, and re-open the bug if there is any further trouble? Changed code is in CVS (parser.c). Bill
Works for me now. Thanks! I will ask the original reporter to try it and will close the bug after that.
This should be fixed in release 2.6.15, thanks, Daniel