XML::LibXML 1.89 + perl 5.14.2: segfault

Bug #995670 reported by Colin Higgs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libxml-libxml-perl (Ubuntu)
New
Undecided
Unassigned

Bug Description

Description: Ubuntu 12.04 LTS
Release: 12.04

# apt-cache policy libxml-libxml-perl
libxml-libxml-perl:
  Installed: 1.89+dfsg-1
  Candidate: 1.89+dfsg-1
  Version table:
 *** 1.89+dfsg-1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

perl program testfail.pl:

#!/usr/bin/perl

use XML::LibXML;

my $elt = XML::LibXML::Element->new("top");
my @nodes = $elt->findnodes("/");
print @nodes . "\n";

should ouput '1' and a newline.

instead this will randomly either:

- work as expected or,
- emit something like "PmmREFCNT_dec: REFCNT decremented below 0 for 176c5b0!." and segfault

with roughly equal probability.

I have fixed this for myself by upgrading to the latest version of XML::LibXML (1.97 at time of writing):

# cpanm XML::LibXML

I thought it best to submit a bug report so this can be fixed in the distribution.

Anyone with the same problem reading this should note that you'll need a few things first before the above 'cpanm' command will work:

# apt-get install cpanminus, libxml2-dev, zlib1g-dev

EDIT (it was obviously too late at night for me to be reporting bugs):

1) I typo'd the new version of XML::LibXML I installed (1.97 instead of 1.92 as originally written).

2) The new version still doesn't work properly. The following script is enough to cause the original error to reappear:

#!/usr/bin/perl

use XML::LibXML;
my $elt = XML::LibXML::Element->new("top");
print $elt->toString . "\n";
my @nodes = $elt->findnodes("/");
print @nodes . "\n";

Given that the latest version of XML::LibXML still has problems, perhaps this is an upstream bug. It's still early here: I'll investigate later and maybe send a report to the XML::LibXML maintainers.

description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.