From: cunha17 at uol dot com dot br Operating system: Linux 2.4.20 (Redhat 9) PHP version: 5.0.0b1 (beta1) PHP Bug Type: Zend Engine 2 problem Bug description: Memory Leak
Description: ------------ This small OO script gives some memory leaks. Reproduce code: --------------- class ReleaseInfo { const NAME_LONG = "PHPORB"; const NAME_SHORT = "orb"; const VERSION_MAJOR = 0; const VERSION_MINOR = 1; const VERSION_MINOR_CHANGE = 0; const VERSION = "" . VERSION_MAJOR . "." . VERSION_MINOR . "." . VERSION_MINOR_CHANGE; const SPEC_VERSION_MAJOR = 2; const SPEC_VERSION_MINOR = 4; const SPEC_VERSION_MINOR_CHANGE = 2; const SPEC_VERSION = "" . SPEC_VERSION_MAJOR . "." . SPEC_VERSION_MINOR . "." . SPEC_VERSION_MINOR_CHANGE; const RELEASE = NAME_LONG . " Version " . VERSION; const RELEASE_TAG = NAME_LONG . "_" . VERSION_MAJOR . "_" . VERSION_MINOR . "_" . VERSION_MINOR_CHANGE; public static function main($args) { echo NAME_LONG . ":"; echo "\t" . NAME_LONG . " " . VERSION; echo "\t" . RELEASE_TAG; echo "\tCORBA/IIOP " . SPEC_VERSION . " (http://www.omg.org/cgi-bin/doc?formal/01-02-01)"; } } Expected result: ---------------- Nothing to the standard output and no memory leaks. Actual result: -------------- /usr/src/zend2/php5-200307262130/Zend/zend_operators.c(1087) : Freeing 0x4070AE7C (12 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 13 times Zend/zend_language_scanner.c(4497) : Freeing 0x4070AE40 (2 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 9 times Zend/zend_language_scanner.c(4350) : Freeing 0x4070ADB8 (14 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 11 times /usr/src/zend2/php5-200307262130/Zend/zend_compile.c(2524) : Freeing 0x4070AA80 (6 bytes), script=org/openorb/ReleaseInfo.php /usr/src/zend2/php5-200307262130/Zend/zend_variables.c(111) : Actual location (location was relayed) Last leak repeated 2 times -- Edit bug report at http://bugs.php.net/?id=24831&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24831&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24831&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24831&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24831&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24831&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24831&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24831&r=support Expected behavior: http://bugs.php.net/fix.php?id=24831&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24831&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24831&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24831&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24831&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24831&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24831&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24831&r=gnused