From: [EMAIL PROTECTED]
Operating system: Windows XP
PHP version: 4.2.0
PHP Bug Type: DOM XML related
Bug description: domXML causes Segfault, when you create to many Nodes
System: Apache/1.3.24 PHP running as SAPI-module (Binary from php.net)
simple script, which causes segfault
<?
$doc = new_xmldoc( "1.0" );
$root = $doc->add_root("document");
for($i = 1; $i < 1000; $i++){
$element = $doc->create_element("element");
$element->set_content("content ".$i);
$root->append_child($element);
}
$xml = $doc->dumpmem();
echo htmlspecialchars($xml);
?>
Description:
the content is shown shortly in the browser, but apache causes a segfault
in module php4ts.dll at offset 00096057 and finally a 404 page is
displayed.
This code causes no problems with PHP 4.1.2. When you try to create only
100 elements in this loop, it runs without any seg-faults. For complex
xmldocuments this bug makes it impossible to use domxml with php 4.2.
Modules:
php_domxml, php_xslt, php_gd und mysql
--
Edit bug report at http://bugs.php.net/?id=16888&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16888&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16888&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16888&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16888&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16888&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16888&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16888&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16888&r=submittedtwice