Subject: | race condition on Perl 5.8.1 on Darwin 7.0.0 |
I'm getting what looks like a race condition in XML::LibXML on Perl 5.8.1, Darwin 7.0.0 (the stock OS X 10.3 Panther release).
It is similar to
bug #4076 : toString misbehaves on XML::LibXML::Attr types
because it happens in the same code, and it looks like he's also using OS X 10.3, but I am also getting segfaults and bus errors.
It either gives a segfault, Bus error, or it works. And like bug#4076, when it works, it returns the element form rather than the attribute form.
Tompkins:~/.cpan/build/XML-LibXML-1.56 root# ./tst
Segmentation fault
Tompkins:~/.cpan/build/XML-LibXML-1.56 root# ./tst
Bus error
Tompkins:~/.cpan/build/XML-LibXML-1.56 root# ./tst
Segmentation fault
Tompkins:~/.cpan/build/XML-LibXML-1.56 root# ./tst
Segmentation fault
Tompkins:~/.cpan/build/XML-LibXML-1.56 root# ./tst
Segmentation fault
Tompkins:~/.cpan/build/XML-LibXML-1.56 root# ./tst
Bus error
Tompkins:~/.cpan/build/XML-LibXML-1.56 root# ./tst
<name>Camel</name>Tompkins:~/.cpan/build/XML-LibXML-1.56 root#
--
tst:
#!/usr/bin/perl
use blib 'blib';
use XML::LibXML;
my $file = "example/dromeds.xml";
# init the file parser
my $parser = XML::LibXML->new();
$dom = $parser->parse_file( $file );
$elem = $dom->getDocumentElement();
@list = $elem->findnodes( 'species/@name' );
print $list[0]->toString;