From: tser at deltacontrols dot com Operating system: WinXP PHP version: 5.2.5 PHP Bug Type: Arrays related Bug description: php extension dealing with array cause crash
Description: ------------ Implemented a simple php extension function that return an array of arrays. A php page that call the function and repeatedly echo the content works fine until the page is executed frequently (simply by holding F5 on the browser) it will cause a crash in inetinfo. Reproduce code: --------------- ZEND_FUNCTION(GetProperty) { zval* objectEntry; array_init(return_value); zend_first_try { for (int t=0; t<500; t++) { MAKE_STD_ZVAL(objectEntry); array_init(objectEntry); add_next_index_string(objectEntry, "TestEntryTestEntryTestEntryTestEntryTestEntryTestEntryTestEntryTestEntry", 1); add_next_index_string(objectEntry, "000000000000000000000000000000000000000000000000000000000000000000000000", 1); add_next_index_zval(return_value, objectEntry); } } zend_catch { } zend_end_try(); } --------------------------- <?php for ($X=1; $X<25; $X++) { echo "Memory Usage:" , memory_get_usage(), "/", memory_get_peak_usage(), "<br>"; $Result = GetProperty(".*"); foreach ($Result as $ObjectResult) { echo $ObjectResult[0], "(" , $ObjectResult[1], ")", ","; } echo "<br>"; } ?> ---------------------------- In IIS, setup the website to use Low(IIS Process). Browser the page and hit F5 in the browser to refresh the page. Expected result: ---------------- The page should be refresh properly. Actual result: -------------- inetinfo.exe will crash. Sometime there will a runtime error message. Runtime Error! R6030 - CRT not initialized -- Edit bug report at http://bugs.php.net/?id=43631&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43631&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43631&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43631&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43631&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43631&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43631&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43631&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43631&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43631&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43631&r=support Expected behavior: http://bugs.php.net/fix.php?id=43631&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43631&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43631&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43631&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43631&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43631&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43631&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43631&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43631&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43631&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43631&r=mysqlcfg