|
|
 |
perl-xml
LibXML, LibXSLT free(): invalid pointer error
by Joshua Santelli other posts by this author
Nov 21 2005 12:24PM messages near this date
view in the new Beta List Site
Re: RPC::XML set request timeout...
|
Re: LibXML, LibXSLT free(): invalid pointer error
& XSLT We're getting an "invalid pointer" error (see below)
from the following code. Is there something that I am
doing wrong in either the XSLT or the perl code below?
I'm trying to track down a problem in a larger system
that we are developing and this small script appears
to reproduce that problem.
The LibXML, LibXSLT, perl and system versions are
below.
This is only a problem on Linux (spec below) and we
are not able to reproduce this problem on Solaris 9.
Thanks in advance.
=======================================
use XML::LibXSLT;
use XML::LibXML;
my $parser = XML::LibXML-> new();
my $xslt = XML::LibXSLT-> new();
my $xml = $ARGV[0];
my $xsl = $ARGV[1];
my $x = XML::LibXML::Document-> new();
my $root = $x-> createElement("root");
$x-> setDocumentElement($root);
my $source = $parser-> parse_file($xml);
my $style_doc = $parser-> parse_file($xsl);
my $stylesheet = $xslt-> parse_stylesheet($style_doc);
my $results = $stylesheet-> transform($source);
$root-> appendChild( $results->getDocumentElement() );
print $root-> serialize();
=======================================
# ./libxslt.pl 1.xml toc.xsl
<root> <test version="2.0">
<foo/>
*** glibc detected *** /usr/bin/perl: free(): invalid
pointer: 0x08780829 ***
======= Backtrace: =========
/lib/libc.so.6[0x84d424]
/lib/libc.so.6(__libc_free+0x77)[0x84d95f]
/usr/lib/libxml2.so.2(xmlFreeNodeList+0x146)[0x3ae382e]
/usr/lib/libxml2.so.2(xmlFreeNodeList+0x89)[0x3ae3771]
/usr/lib/libxml2.so.2(xmlFreeNodeList+0x89)[0x3ae3771]
/usr/lib/libxml2.so.2(xmlFreeDoc+0xdc)[0x3ae3e20]
... this goes on.
=======================================
<?xml version="1.0" encoding="UTF-8"?>
<test version="2.0">
<foo/>
</test>
=======================================
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:copy-of select="current()" />
</xsl:template>
</xsl:stylesheet>
======================================
RedHat FC4
PERL v5.8.6 built for i386-linux-thread-multi
installed the following from source:
XML::LibXSLT::VERSION -> 1.58
libxslt version -> 1.1.15
XML::LibXML::VERSION -> 1.58
XML::LibXML::LIBXML_DOTTED_VERSION -> 2.6.22
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Joshua Santelli
rrathmann
Joshua Santelli
|
|
|
 |
|