dmitry Thu, 10 Jun 2010 09:13:22 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=300345
Log: Fixed bug #52001 (Memory allocation problems after using variable variables) Bug: http://bugs.php.net/52001 (Assigned) Memory allocation problems after using variable variables Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug52001.phpt U php/php-src/branches/PHP_5_3/Zend/zend_compile.h A php/php-src/trunk/Zend/tests/bug52001.phpt Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2010-06-10 08:25:25 UTC (rev 300344) +++ php/php-src/branches/PHP_5_3/NEWS 2010-06-10 09:13:22 UTC (rev 300345) @@ -69,6 +69,8 @@ - Fixed bug #52010 (open_basedir restrictions mismatch on vacuum command). (Ilia) +- Fixed bug #52001 (Memory allocation problems after using variable variables). + (Dmitry) - Fixed bug #51991 (spl_autoload and *nix support with namespace). (Felipe) - Fixed bug #51911 (ReflectionParameter::getDefaultValue() memory leaks with constant array). (Felipe) Added: php/php-src/branches/PHP_5_3/Zend/tests/bug52001.phpt =================================================================== --- php/php-src/branches/PHP_5_3/Zend/tests/bug52001.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug52001.phpt 2010-06-10 09:13:22 UTC (rev 300345) @@ -0,0 +1,17 @@ +--TEST-- +Bug #52001 (Memory allocation problems after using variable variables) +--FILE-- +<?php +a(0,$$var); + +$temp1=1; +$temp2=2; +var_dump($temp1); + +function a($b,$c) {} +?> +--EXPECTF-- +Notice: Undefined variable: var in %sbug52001.php on line 2 + +Notice: Undefined variable: in %sbug52001.php on line 2 +int(1) Modified: php/php-src/branches/PHP_5_3/Zend/zend_compile.h =================================================================== --- php/php-src/branches/PHP_5_3/Zend/zend_compile.h 2010-06-10 08:25:25 UTC (rev 300344) +++ php/php-src/branches/PHP_5_3/Zend/zend_compile.h 2010-06-10 09:13:22 UTC (rev 300345) @@ -687,9 +687,9 @@ #define ZEND_CT (1<<0) #define ZEND_RT (1<<1) -#define ZEND_FETCH_STANDARD 0 -#define ZEND_FETCH_ADD_LOCK (1<<0) -#define ZEND_FETCH_MAKE_REF (1<<1) +#define ZEND_FETCH_STANDARD 0x00000000 +#define ZEND_FETCH_ADD_LOCK 0x08000000 +#define ZEND_FETCH_MAKE_REF 0x04000000 #define ZEND_FE_FETCH_BYREF 1 #define ZEND_FE_FETCH_WITH_KEY 2 Added: php/php-src/trunk/Zend/tests/bug52001.phpt =================================================================== --- php/php-src/trunk/Zend/tests/bug52001.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug52001.phpt 2010-06-10 09:13:22 UTC (rev 300345) @@ -0,0 +1,17 @@ +--TEST-- +Bug #52001 (Memory allocation problems after using variable variables) +--FILE-- +<?php +a(0,$$var); + +$temp1=1; +$temp2=2; +var_dump($temp1); + +function a($b,$c) {} +?> +--EXPECTF-- +Notice: Undefined variable: var in %sbug52001.php on line 2 + +Notice: Undefined variable: in %sbug52001.php on line 2 +int(1)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php