Subject: | XML::LibXML segfaults on undef of a XML::LibXML::Element |
XML::LibXML 1.58, 1.58_1, and CVS version tested.
libxml2 2.6.8 and 2.6.15 tested. Linux, glibc 2.3, gcc 3.3.
Bug is repeatable approximately in 70% of runs.
Please unpack bugz.tar.gz, cd bugz and run:
perl -Ilib -It t/Way.t
it should segfault in one of the two places in the code. First place where segfault occurs is very highlighted in the code of t/Way.t, look for "WHAT".
Second place is at the very end.
It all happens at the moment the XML::LibXML::Element is undefined, i.e. it cannot clean memory.
Way does a hard job :) or generating a complex tree from a string and hash snippets.
See the code in lib/DataSpirit/Way.pm at the lines 133 and 151. There are two ways to import XML string into an XML tree, I have tried the both ways. None works stable, it segfaults.
The testcase is repeatable and if it will not fail at first, it will fail at second run for sure. Tested on different versions and computers. I can answer all your questions and provide you with a shell if needed. Please help, we're stuck with it.
Message body not shown because it is not plain text.