Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: robin.berjon [...] gmail
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: Crash on using replaceChild when xml:id is involved
Download (untitled) / with headers
text/plain 641b
The attached script causes Perl to crash with a Bus Error (on OSX). GDB gives me: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 _domReconcileNsAttr (attr=0x13627c0, unused=0xbffff66c) at dom.c:40 40 dom.c: No such file or directory. in dom.c The problem happens just the same if there's importNode. It doesn't happen if the xml:id are removed. I don't know if this is a bug in libxml or XML::LibXML, and I don't really have the skills to find out. Any fix would be greatly appreciated, this is crashing one of my projects. Thanks! -- --darobin
Subject: test-case.pl
Download test-case.pl
text/x-perl 429b
use strict; use warnings; use XML::LibXML qw(); my $docOne = XML::LibXML->new->parse_string('<foo><inc xml:id="test"/></foo>'); my $docTwo = XML::LibXML->new->parse_string('<bar><urgh xml:id="foo"/></bar>'); my $inc = $docOne->getElementById('test'); warn $inc->toString . "\n"; my $rep = $docTwo->getElementById('foo'); warn $rep->toString . "\n"; $inc->parentNode->replaceChild($rep, $inc); warn $docOne->toString . "\n";
Download (untitled) / with headers
text/plain 227b
Hi Robin! I can reproduce the problem. It seems that the new NS reconciling code tries to reconcile namespace for the xml: prefix of xml:id. Seems easy, I should be able to fix this soon. Thanks for reporting this. -- Petr
ok, fixed in SVN trunk (svn co svn://axkit.org/XML-LibXML/trunk) Dahut! -- Petr
Thanks a lot Petr, that was fast! DAAAAHUUUUUUT!!!!! -- --darobin
Download (untitled) / with headers
text/plain 132b
Finally closing this bug before releasing 1.64. Please do not respond to this message via RT unless you really wish to reopen it;-)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.