ID: 10235
User Update by: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: Reproduceable crash
Bug Type: DOM XML related
Description: Segfault on domxml_root()
./configure --prefix=/usr --with-cgi
-with-config-file-path=./ --enable-debug --disable-xml
--disable-mysql --with-dom --without-mysql --without-pcre-regex
---
./php -m
Running PHP 4.0.6-dev
Zend Engine v1.0.5, Copyright (c) 1998-2001 Zend Technologies
[PHP Modules]
standard
session
posix
domxml
[Zend Modules]
---
[testdomxml.php]
<?
$xmlfile = "./file.xml";
$fp = fopen($xmlfile, "r");
while (!feof($fp))
$buf .= fgets($fp, 127);
$doc = xmldocfile($xmlfile);
print_r($doc);
$root = $doc.domxml_root();
print_r($root);
?>
---
gdb php
GNU gdb 19990928
(gdb) set args ../testdomxml.php
(gdb) r
Starting program: /var/local/home/huld/PHP4/CVS/php4/php
../testdomxml.php
X-Powered-By: PHP/4.0.6-dev
Content-type: text/html
<hr>
DomDocument Object
(
[doc] => Resource id #2
[url] => ./file.xml
[version] => 1.0
[standalone] => -1
[type] => 9
[compression] => -1
[charset] => 1
)
Program received signal SIGSEGV, Segmentation fault.
0x80635ad in php_dom_get_object (wrapper=0x0, rsrc_type1=5,
rsrc_type2=0)
at php_domxml.c:490
490
if (Z_TYPE_P(wrapper) != IS_OBJECT) {(gdb) bt
#0 0x80635ad in php_dom_get_object (wrapper=0x0,
rsrc_type1=5, rsrc_type2=0)
at php_domxml.c:490
#1 0x8066c1c in php_if_domxml_doc_document_element (ht=0,
return_value=0x8174ba4, this_ptr=0x0, return_value_used=1)
at php_domxml.c:1758
#2 0x80f088a in execute (op_array=0x816ff04) at
./zend_execute.c:1494
#3 0x80c7e44 in zend_execute_scripts (type=8, file_count=3)
at zend.c:743
#4 0x805d6cf in php_execute_script
(primary_file=0xbffffca4) at main.c:1196
#5 0x805b6bc in main (argc=2, argv=0xbffffd34) at
cgi_main.c:731
Look's like new Zend API? Other ext/ works excellent.
Previous Comments:
---------------------------------------------------------------------------
[2001-04-08 16:49:43] [EMAIL PROTECTED]
<?
$file1 = "/tmp/file1";
$file2 = "/tmp/file2";
$doc = xmldocfile($file1);
$root = domxml_root($doc);
print_r($root);
?>
./configure --prefix=/usr --with-apxs=/usr/bin/apxs
--with-config-file-path=/etc/php4/apache --enable-debug --with-dom
php.ini-dist (not relevant)
Program received signal SIGSEGV, Segmentation fault.
0x403ada4e in compile_branch (options=0, brackets=0x8, codeptr=0x0,
ptrptr=0x403b1824, errorptr=0x4046baf4, optchanged=0x2, reqchar=0x2,
countlits=0x2, cd=0x10) at pcre.c:1209
1209 for (c = 0; c < 32; c++) class[c] |= ~cbits[c+cbit_word];
(gdb) bt
#0 0x403ada4e in compile_branch (options=0, brackets=0x8, codeptr=0x0,
ptrptr=0x403b1824, errorptr=0x4046baf4, optchanged=0x2, reqchar=0x2,
countlits=0x2, cd=0x10) at pcre.c:1209
#1 0x4046baf4 in inflate_mask () from /usr/lib/libxml2.so.2
#2 0x403b1846 in match (eptr=0x1 <Address 0x1 out of bounds>,
ecode=0x8155afc "", offset_top=0, md=0x1, ims=135616424, eptrb=0x0,
flags=1078193993) at pcre.c:3956
#3 0x40375147 in php_if_apache_lookup_uri (ht=135598500, return_value=0x2,
this_ptr=0x6e616d6d, return_value_used=1077437309) at php_apache.c:407
#4 0x40386420 in php_xpath_get_object (wrapper=0x8, rsrc_type1=3,
rsrc_type2=0) at php_domxml.c:332
#5 0x4039e4c3 in fn_ext (
name=0xbffffaf8 "
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]