#18883 [Opn->Dup]: Crush when generating large XML documents using dom_xml under Apache

From: Date: Tue, 13 Aug 2002 14:22:29 +0000
Subject: #18883 [Opn->Dup]: Crush when generating large XML documents using dom_xml under Apache
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16619@lists.php.net to get a copy of this message
 ID:               18883
 Updated by:       jtate@php.net
 Reported By:      ed@avi.ru
-Status:           Open
+Status:           Duplicate
 Bug Type:         Reproducible crash
 Operating System: Windows 98
 PHP Version:      4.2.2
 New Comment:

This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

Please try the latest development version of PHP.  This was fixed some
time ago, but has not made it into the release yet.


Previous Comments:
------------------------------------------------------------------------

[2002-08-13 10:11:05] ed@avi.ru


The problem occurs when running the following code:

<?PHP

	$doc = domxml_new_doc ('1.0');

	$root = $doc->append_child ($doc->create_element ('root'));

	for ($i = 0; $i < 10; $i++) {
		$node = $root->append_child ($doc->create_element ('top_node_' .
$i));
		for ($j = 0; $j < 10; $j++) {
			$child = $node->append_child ($doc->create_element (sprintf
('node_%s_%s', $i, $j)));
			for ($k = 0; $k < 10; $k++)
				$child->set_attribute (sprintf ('attribute_%s', $k), $i . "_" . $j
. "_" . $k);
		}
	}

	print ($doc->dump_mem ());

?>

Apache 1.3.24 crushes with the following message (translated from
Russian):

Program APACHE did crush when accessing memory page in module
PHP4TS.DLL in adress 015f:1009c557.
Registers:
EAX=0529a2a0 CS=015f EIP=1009c557 EFLGS=00010206
EBX=007b82e0 SS=0167 ESP=01a3f998 EBP=01a3fac4
ECX=01a3f9a8 DS=0167 ESI=01a3f9a8 FS=6e0f
EDX=01a3f9f4 ES=0167 EDI=007b82e0 GS=6ff6
Bytes on address CS:EIP:
66 ff 48 0a 8b 06 66 8b 48 0a 66 85 c9 75 30 50 
Stack content:
007e9050 012b1b0a 01a3f9a8 012b1b7f 0529a2a0 007e9810 012b1b50 007e97b0
007e98d0 012b1b32 007e9810 007e9970 012b1b32 007e98d0 007e99f0 012b1ac4


The same problem had occured on earlier versions of Apache/PHP, and had
been tested on several machines.

If you try to decrement the number of 'for' cycles, the script will
generate correct output. On FreeBSD system this script works
correctly.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=18883&edit=1



Thread (3 messages)

« previous php.bugs (#16619) next »