Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: RUZ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.69
Fixed in: (no value)



Subject: segmentation fault, may be because of misuse, but anyway it's a segfault
Download (untitled) / with headers
text/plain 617b
Script: require XML::LibXML; my $doc = XML::LibXML::Document->new('1.0', 'UTF-8'); my $root = $doc->createElement('sphinx:docset'); my $schema = $doc->createElement('sphinx:schema'); foreach ( qw(content) ) { my $field = $doc->createElement('sphinx:field'); $field->setAttribute( name => $_ ); $schema->appendChild( $schema ); } $root->appendChild( $schema ); print $doc->toString; Show quoted text
---- end of script ---- Compiled against libxml2 version: 20703 Running libxml2 version: 20703 PASS XML-LibXML-1.69 darwin-2level 8.11.1 -- Best regards, Ruslan.
Download (untitled) / with headers
text/plain 796b
the reason is in: $schema->appendChild( $schema ); a typo, but anyway it's up to you to decide. On Thu Apr 09 06:45:36 2009, RUZ wrote: Show quoted text
> Script: > > require XML::LibXML; > my $doc = XML::LibXML::Document->new('1.0', 'UTF-8'); > my $root = $doc->createElement('sphinx:docset'); > > my $schema = $doc->createElement('sphinx:schema'); > foreach ( qw(content) ) { > my $field = $doc->createElement('sphinx:field'); > $field->setAttribute( name => $_ ); > $schema->appendChild( $schema ); > } > $root->appendChild( $schema ); > > print $doc->toString; > ---- end of script ---- > > Compiled against libxml2 version: 20703 > Running libxml2 version: 20703 > PASS XML-LibXML-1.69 darwin-2level 8.11.1
-- Best regards, Ruslan.
Download (untitled) / with headers
text/plain 1009b
Dne čt 09.dub.2009 07:05:37, RUZ napsal(a): Show quoted text
> the reason is in: > $schema->appendChild( $schema );
So I figured! But nevertheless it was a bug (a "gap" in our hieararchy test - attaching a child-less node to itself). Thanks! -- Petr Show quoted text
> > a typo, but anyway it's up to you to decide. > > On Thu Apr 09 06:45:36 2009, RUZ wrote:
> > Script: > > > > require XML::LibXML; > > my $doc = XML::LibXML::Document->new('1.0', 'UTF-8'); > > my $root = $doc->createElement('sphinx:docset'); > > > > my $schema = $doc->createElement('sphinx:schema'); > > foreach ( qw(content) ) { > > my $field = $doc->createElement('sphinx:field'); > > $field->setAttribute( name => $_ ); > > $schema->appendChild( $schema ); > > } > > $root->appendChild( $schema ); > > > > print $doc->toString; > > ---- end of script ---- > > > > Compiled against libxml2 version: 20703 > > Running libxml2 version: 20703 > > PASS XML-LibXML-1.69 darwin-2level 8.11.1
>


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.