Skip Menu |

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 2719
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: sir_10 [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.53
  • 1.54_0
  • 1.54_1
  • 1.54_2
  • 1.54_3
  • 1.54_4
  • 1.54
Fixed in: (no value)



Subject: core dump
XML-LibXML-1.54 perl v5.6.1 FreeBSD 4.6 libxml2-2.5.6 this does not coredump with 1.52 Show quoted text
---- simplest test case ---- #!/usr/local/bin/perl -w use strict; use XML::LibXML; my $xml = do { local $/; $_ = <DATA> }; my $parser = XML::LibXML->new; my $doc = eval { $parser->parse_string($xml) }; die $@ if $@; ## <a> my $root_node = $doc->getDocumentElement; ## removing this extra level of scope stops the coredump, but the dom is ## left unchanged and several of the following warnings are issued: ## perl in free(): warning: chunk is already free { my ($last_c_node) = $root_node->findnodes('b/c[last()]'); $root_node->removeChild($last_c_node); } print $root_node->toString, "\n"; __END__ <?xml version="1.0"?> <a> <b> <c>test 1</c> <c>test 2</c> </b> </a>
Date: Mon, 2 Jun 2003 08:55:48 +0200
From: Christian Glahn <christian.glahn [...] uibk.ac.at>
To: Guest via RT <bug-XML-LibXML [...] rt.cpan.org>
Subject: Re: [cpan #2719] core dump
RT-Send-Cc:
On Sun, Jun 01, 2003 at 09:13:14PM -0400, Guest via RT wrote: Show quoted text
> XML-LibXML-1.54 > perl v5.6.1 > FreeBSD 4.6 > libxml2-2.5.6 > > this does not coredump with 1.52 ...
fixed in cvs already. Christian
From: sir_10 [...] yahoo.com
how long does it take for something to move from cvs to release? this issue seems important enough for a public update (besides the fact that the cvs repository is not publicly accessable). thanks Show quoted text
> On Sun, Jun 01, 2003 at 09:13:14PM -0400, Guest via RT wrote: > > fixed in cvs already.
Date: Tue, 10 Jun 2003 21:12:51 +0100
Subject: Re: [cpan #2719] core dump
From: Matt Sergeant <matt [...] sergeant.org>
To: bug-XML-LibXML [...] rt.cpan.org
RT-Send-Cc:
On Tuesday, Jun 10, 2003, at 20:16 Europe/London, Guest via RT wrote: Show quoted text
> how long does it take for something to move from cvs to release?
I believe this is fixed in 1.54 which is on CPAN. Show quoted text
> this > issue seems important enough for a public update (besides the fact that > the cvs repository is not publicly accessable).
$ cvs -d :pserver:anonymous@axkit.org:/home/cvs co XML-LibXML You only have to ask. Matt.
From: sir_10 [...] yahoo.com
Show quoted text
> I believe this is fixed in 1.54 which is on CPAN.
nope, this also affects 1.54 Show quoted text
> $ cvs -d :pserver:anonymous@axkit.org:/home/cvs co XML-LibXML > > You only have to ask.
thanks. confirmed the problem is fixed in the cvs version.
From: sir_10 [...] yahoo.com
the cvs version fixes the coredump, but i found another problem with the same test script- the call to removeChild fails to actually remove the node. thanks [guest - Thu Jun 12 02:17:28 2003]: Show quoted text
> thanks. confirmed the problem is fixed in the cvs version.
[guest - Thu Jun 12 02:27:01 2003]: Show quoted text
> the cvs version fixes the coredump, but i found another problem with > the > same test script- the call to removeChild fails to actually remove the > node.
Actually this is the correct behaviour and no bug. the 'c' node isn't a childnode of the root node 'a'. only 'b' is a child of 'a'. If you just want to remove a node from the tree structure, regardless where the node is located, you want to use the unbindNode() function. Christian
From: sir_10 [...] yahoo.com
[PHISH - Thu Jun 12 02:41:59 2003]: Show quoted text
> Actually this is the correct behaviour and no bug. > the 'c' node isn't a childnode of the root node 'a'. only 'b' is a > child of 'a'. > > If you just want to remove a node from the tree structure, regardless > where the node is located, you want to use the unbindNode() function.
ouch! removeChild does indeed remove the c node in versions <= 1.52 i actually have been relying on that behaviour.