[libxml-devel] Code snippet to crash libxml (segfault)
Saurabh Nanda
saurabhnanda at gmail.com
Thu Feb 7 03:36:15 EST 2008
> Are you sure it is the doc reference and not the GC finalizers
> running? Put a print statement after it and see what happens.
Probably what you're saying is right. I don't fully understand what
effect the GC finalizers have, but I've tried the following script
(same script without the doc reference) in two cases:
1. ruby /tmp/xml/rb -- segfaults
2. copy paste script in an irb session. Doesn't segfault at that
moment. However, as soon as you exit irb, it segfaults.
require 'xml/libxml'
x=XML::Parser.string("<test>something</test>")
doc=x.parse
x.parse
What could the problem be?
Nandz.
--
http://nandz.blogspot.com
http://foodieforlife.blogspot.com
More information about the libxml-devel
mailing list