Bug #18376 Updated: After an abitrary number of nodes DOMXML dies on large XML documents

From: Date: Wed, 17 Jul 2002 21:11:18 +0000
Subject: Bug #18376 Updated: After an abitrary number of nodes DOMXML dies on large XML documents
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14454@lists.php.net to get a copy of this message
ID: 18376 Updated by: jtate@php.net Reported By: watford@uiuc.edu -Status: Assigned +Status: Closed Bug Type: DOM XML related Operating System: Windows 2000 Pro PHP Version: 4.2.1 latest Assigned To: jtate 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. Yes, this is fixed. <?php $doc = new_xmldoc( "1.0" ); $root = $doc->add_root("document"); for($i = 1; $i < 10000; $i++){ $element = $doc->create_element("element"); $element->set_content("content ".$i); $root->append_child($element); } $xml = $doc->dumpmem(); echo htmlspecialchars($xml); ?> Runs just fine. I'm using Apache 1.3.24 with the CVS version of 4_2_0. Also looks fixed in HEAD. Remember that when you use a SNAPS version, you've got to copy the php_domxml.dll to the proper directory. You were probably still testing against the one in 4.2.1. Make sure that you've copied the file from the snapshot, restarted Apache, and if it still happens, e-mail me personally. Previous Comments: ------------------------------------------------------------------------ [2002-07-17 16:35:05] jtate@php.net I fixed this. I'll verify against PHP4_2_0 though, just to make sure. It could be something different. ------------------------------------------------------------------------ [2002-07-17 16:05:52] chregu@php.net Can someone verify this on Windows with stable-latest? And if there really is a problem, fix it? :) I couldn't reproduce it on Linux, there was not even a memory hole like last time (tested with 100'000 appended childs...) chregu ------------------------------------------------------------------------ [2002-07-17 15:04:59] watford@uiuc.edu This script is from a previous bug report, it also causes PHP to crash. Every crash happens after the document is done outputting, with the same errors, in the same place in the disassembly. Maybe its that double-freeing error, but I have read that it was fixed. <?php $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); ?> ------------------------------------------------------------------------ [2002-07-17 14:40:39] watford@uiuc.edu Using Apache/1.3.26 and the latest release from the snaps, it still dies with the following messages: The instruction at "0x10096397" referenced memory at "0x03e1813a". The memory could not be "written". The instruction at "0x10096397" referenced memory at "0x03e181a2". The memory could not be "written". The instruction at "0x10096397" referenced memory at "0x03e18072". The memory could not be "written". Unhandled Exception in Apache.exe (PHP4TS.DLL): 0xC0000005: Access Violation. Disassembly: 1009E6C0 push esi 1009E6C1 mov esi,dword ptr [esp+8] 1009E6C5 mov eax,dword ptr [esi] -> 1009E6C7 dec word ptr [eax+0Ah] 1009E6CB mov eax,dword ptr [esi] 1009E6CD mov cx,word ptr [eax+0Ah] 1009E6D1 test cx,cx Registers: EAX = 03E18068 EBX = 00A97940 ECX = 00000000 EDX = 00CDFA10 ESI = 00CDF9DC EDI = 00A97940 EIP = 1009E6C7 ESP = 00CDF9CC EBP = 00CDFAE0 EFL = 00000202 CS = 001B DS = 0023 ES = 0023 SS = 0023 FS = 0038 GS = 0000 OV=0 UP=0 EI=1 PL=0 ZR=0 AC=0 PE=0 CY=0 03E18072 = ???? ST0 = +0.00000000000000000e+0000 ST1 = +0.70443418271368093e+4085 ST2 = -0.00391334816692398e+4421 ST3 = +0.00000000000000000e+0000 ST4 = +0.00000000000000000e+0000 ST5 = +0.00635391772729999e+4930 ST6 = -2.09327663353178650e+0005 ST7 = 1#QNAN CTRL = 027F STAT = 4020 TAGS = FFFF EIP = 00B8D934 CS = 001B DS = 0023 EDO = 00BD1AC8 Call Stack: -> PHP4TS! 1009e6c7() PHP4TS! 1009ac4e() PHP4TS! 10002e35() PHP4APACHE! 60002be8() PHP4APACHE! 6000181b() PHP4APACHE! 600014ee() ------------------------------------------------------------------------ [2002-07-17 14:02:17] sniper@php.net get apache 1.3.26, apache 2 is not stable for any kind of usage yet. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18376 -- Edit this bug report at http://bugs.php.net/?id=18376&edit=1

« previous php.bugs (#14454) next »