Issue 184 in opencollada: xmlCleanupParser used incorrectly, can cause crashes

13 views
Skip to first unread message

openc...@googlecode.com

unread,
Jan 31, 2012, 2:15:37 PM1/31/12
to opencolla...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 184 by echesl...@gmail.com: xmlCleanupParser used incorrectly,
can cause crashes
http://code.google.com/p/opencollada/issues/detail?id=184

In GeneratedSaxParser/src/GeneratedSaxParserLibxmlSaxParser.cpp,
xmlCleanupParser is called in the destructor of LibxmlSaxParser.
xmlCleanupParser is not meant to clean up after one instance of parsing.

As per http://xmlsoft.org/html/libxml-parser.html#xmlCleanupParser , it
should be called either right before exit, which OpenCOLLADA can't
guarantee, or not at all.

This call can cause crashes in seemingly unrelated, pthread-using code. We
found this issue in Sirikata as it caused crashes in some PulseAudio code
(which we were using indirectly via SDL). I tracked it down to this issue
via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500696#15 .

I think this line should just be removed. We're using a patched version
that just removes the line in Sirikata and it seems to be fine.

openc...@googlecode.com

unread,
Jul 25, 2013, 5:02:33 PM7/25/13
to opencolla...@googlegroups.com

Comment #1 on issue 184 by Luke1...@gmx.de: xmlCleanupParser used
I concur and second the bugreport.

We are still using the FCollada library in one of our projects. As far as I
see the history of that issue goes back to FCollada < 3.04 where
xmlCleanupParser() is incorrectly? called in FArchiveXML::ImportFile() and
FArchiveXML::ImportFileFromMemory().

That was then fixed in FCollada in between 3.05b and 3.1.1, where the call
was completely removed.

I'd guess the same should be applied to opencollada?

Note that after a xmlCleanupParser all callbacks are reset. So if a user
actually sets the callbacks to his own ones, they will only be used for the
first time OpenCollada opens a file.

So that's another symptom of the underlying bug here.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages