Bug 234439 - Using perl's XML::LibXML Xpath function makes perl to crash
Summary: Using perl's XML::LibXML Xpath function makes perl to crash
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-XML-LibXML
Version: 6
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robin Norwood
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-29 08:58 UTC by zby
Modified: 2008-02-27 15:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-27 15:29:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
error dump plus history (2.33 KB, application/x-gzip)
2007-03-29 08:58 UTC, zby
no flags Details

Description zby 2007-03-29 08:58:59 UTC
Description of problem:
I study xpath functions using perl's XML::LibXML and the result of one of my
tests makes perl to end abnormaly dumping a backtrace and the memory map. I
would expect either 0, undef, the xpath's "Invalid expression" or compile
(sytax) error to result no matter how the xpath function is build or stated in
the code.


Version-Release number of selected component (if applicable):
2.6.20-1.2933.fc6 #1 SMP Mon Mar 19 10:42:48 EDT 2007 i686 i686 i386 GNU/Linux
perl-5.8.8-10
perl-XML-LibXML-1.58-2.2.2.1


How reproducible:
a single occurence - a technology study

Steps to Reproduce:
1.
2.
3.
  
Actual results:
SIGABRT

Expected results:
0, undef, the "Invalid expression" Xpath error or compile (sytax) error


Additional info:
Datiled steps I did are in the attachement

Comment 1 zby 2007-03-29 08:58:59 UTC
Created attachment 151183 [details]
error dump plus history

Comment 2 Jan Pazdziora 2008-02-27 12:52:34 UTC
The problem is not present on Fedora 8:

$ perl -MXML::LibXML -Mstrict -e 'my $x =
XML::LibXML->new()->parse_file("current.xml"); my
@nodes=$x->findnodes("//*[count(\"accel::code\")]")->get_nodelist; print STDOUT
scalar(@nodes)."\n";'
Invalid type
xmlXPathCompiledEval: 2 objects left on the stack.

$ rpm -q perl-XML-LibXML gcc perl glibc libxml2
perl-XML-LibXML-1.62001-2.fc8.3.x86_64
gcc-4.1.2-33.x86_64
perl-5.8.8-33.fc8.x86_64
glibc-2.7-2.x86_64
glibc-2.7-2.i686
libxml2-2.6.31-1.fc8.x86_64

So maybe we can close this with CURRENTRELEASE?

Comment 3 zby 2008-02-27 15:23:06 UTC
I have upgraded my XML::LibXML off of the CPAN and the same task finished as
expected. I recommend to FC6 owners and perl XML::LibXML users doing the same thing.
[zby@DDFF ~]$ find . -type f -name current.xml
./.openoffice.org2/user/config/soffice.cfg/global/accelerator/en-US/current.xml
./.openoffice.org2/user/config/soffice.cfg/global/accelerator/cs/current.xml
./.openoffice.org2/user/config/soffice.cfg/modules/scalc/accelerator/en-US/current.xml
./.openoffice.org2/user/config/soffice.cfg/modules/scalc/accelerator/cs/current.xml
./.openoffice.org2/user/config/soffice.cfg/modules/swriter/accelerator/en-US/current.xml
./.openoffice.org2/user/config/soffice.cfg/modules/swriter/accelerator/cs/current.xml
./.openoffice.org2/user/config/soffice.cfg/modules/sdraw/accelerator/en-US/current.xml
./.openoffice.org2/user/config/soffice.cfg/modules/dbapp/accelerator/en-US/current.xml
./.openoffice.org2/user/config/soffice.cfg/modules/StartModule/accelerator/en-US/current.xml
./.openoffice.org2/user/config/soffice.cfg/modules/StartModule/accelerator/cs/current.xml
./.openoffice.org2/user/config/soffice.cfg/modules/simpress/accelerator/en-US/current.xml
./.openoffice.org2/user/config/soffice.cfg/modules/simpress/accelerator/cs/current.xml
[zby@DDFF ~]$ perl -MXML::LibXML -Mstrict -e 'my $x
=XML::LibXML->new()->parse_file(".openoffice.org2/user/config/soffice.cfg/global/accelerator/en-US/current.xml");
my @nodes=$x->findnodes("//*[count(\"accel::code\")]")->get_nodelist; print
STDOUT scalar(@nodes)."\n";'
Invalid type
xmlXPathCompiledEval: 2 objects left on the stack.
[zby@DDFF ~]$ perl -MXML::LibXML -e 'print $XML::LibXML::VERSION."\n";'
1.66
[zby@DDFF ~]$ 


I think I will not come back to the version with this flaw. Also, based on the
fact that there are new versions of Fedora I suppose that I will not need to
bother with this problem any further.
As far as me, you may close this report.
Thank you.


Note You need to log in before you can comment on or make changes to this bug.