Bug 234439 - Using perl's XML::LibXML Xpath function makes perl to crash
Using perl's XML::LibXML Xpath function makes perl to crash
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: perl-XML-LibXML (Show other bugs)
6
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Robin Norwood
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-29 04:58 EDT by zby
Modified: 2008-02-27 10:29 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-27 10:29:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description zby 2007-03-29 04:58:59 EDT
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 04:58:59 EDT
Created attachment 151183 [details]
error dump plus history
Comment 2 Jan Pazdziora 2008-02-27 07:52:34 EST
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 10:23:06 EST
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.