ID: 43631
Updated by: [EMAIL PROTECTED]
Reported By: tser at deltacontrols dot com
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: WinXP
PHP Version: 5.2.5
New Comment:
This is not a bug *in* PHP - please discuss this on the pecl-dev
mailinglist instead.
Previous Comments:
------------------------------------------------------------------------
[2007-12-19 00:19:52] tser at deltacontrols dot com
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 this bug report at http://bugs.php.net/?id=43631&edit=1