From: kh dot wild at wicom dot li
Operating system: FreeBSD 6.2
PHP version: 5.2.5
PHP Bug Type: Unknown/Other Function
Bug description: If eval fails used memory will not freed anymore
Description:
------------
When an eval fails on execution
the memory consumtions raises.
The script below simulates the
situation.
Is that an memory-leak?
Reproduce code:
---------------
<?
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
ini_set('error_reporting', 1 );
for( $i = 0; $i < 100000; $i++ )
{
eval( '$x = / 1000' );
}
print( "finish\n" );
?>
Expected result:
----------------
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 4864 bytes) in test.php(7) : eval()'d code on line 1
--
Edit bug report at http://bugs.php.net/?id=43278&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43278&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43278&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43278&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43278&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43278&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43278&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43278&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43278&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43278&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43278&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43278&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43278&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43278&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43278&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43278&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43278&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43278&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43278&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43278&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43278&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43278&r=mysqlcfg