|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-19 08:46 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 07:00:01 2025 UTC |
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