#41702 [Opn->Fbk]: php5 crashes when issuing an XPath query that incorrectly uses the XPath contai
| From: | scottmac@php.net | Date: | Fri, 15 Jun 2007 15:30:24 +0000 |
| Subject: | #41702 [Opn->Fbk]: php5 crashes when issuing an XPath query that incorrectly uses the XPath contai | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-113831@lists.php.net to get a copy of this message | ||
ID: 41702
Updated by: scottmac@php.net
Reported By: wendell at bani dot com dot br
-Status: Open
+Status: Feedback
Bug Type: DOM XML related
Operating System: Linux Ubuntu Feisty
PHP Version: 5.2.3
New Comment:
I can't reproduce this on my test box, it's linked against libxml2
version 2.6.28.
The version on your bug report in launchpad says 5.2.1 but you've
selected 5.2.3 in the report here, did you correctly test with the
latest version of PHP which is 5.2.3?
Previous Comments:
------------------------------------------------------------------------
[2007-06-15 14:54:40] wendell at bani dot com dot br
Description:
------------
Bug reported in Ubuntu (http://launchpad.net/bugs/103027):
See the attached PHP script for an example that will crash PHP.
This could be (is likely to be?) a bug in libxml2, but I'm not one to
make that call.
Reproduce code:
---------------
<?php
$dom = new DomDocument();
$dom->loadHTML(
"<html>
<table>
<tr><td>Cancellation of blabla</td></tr>
</table>
<table>
<tr><td>second table</td></tr>
</table>
<table>
<tr><td>third table</td></tr>
</table>
</html>");
$xp = new DomXPath($dom);
$matches = $xp->query("//table[contains('second')]");
?>
Actual result:
--------------
0 0xb7aaba16 in malloc_consolidate () from
/lib/tls/i686/cmov/libc.so.6
#1 0xb7aade38 in _int_malloc () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7aaeef5 in _int_realloc () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7ab108e in realloc () from /lib/tls/i686/cmov/libc.so.6
#4 0xb7bf7dba in ?? () from /usr/lib/libxml2.so.2
#5 0x086dee70 in ?? ()
#6 0x00000370 in ?? ()
#7 0xbff075e8 in ?? ()
#8 0xb7bf58ec in ?? () from /usr/lib/libxml2.so.2
#9 0x00000000 in ?? ()
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41702&edit=1