|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-28 20:28 UTC] sniper@php.net
[2003-08-03 15:05 UTC] cunha17 at uol dot com dot br
[2003-08-04 05:39 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
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