#18668 [Ver->Csd]: Initialization of static hash array variable crashes PHP

From: Date: Mon, 09 Sep 2002 15:11:55 +0000
Subject: #18668 [Ver->Csd]: Initialization of static hash array variable crashes PHP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18798@lists.php.net to get a copy of this message
ID: 18668 Updated by: stas@php.net Reported By: michiwalter@gmx.de -Status: Verified +Status: Closed Bug Type: Scripting Engine problem Operating System: Windows 2000, Linux PHP Version: 4.3.0-dev New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-08-11 12:55:08] michiwalter@gmx.de @tater: // 4. The hash has to contain at least 2 entries. ------------------------------------------------------------------------ [2002-08-11 12:44:43] tater@potatoe.com with PHP 4.3.0-dev (cli), Zend Engine v2.0.0-alpha2, built from CVS, on OS X, I don't see a crash. Instead, with debug enabled, I get a memory leak message unless I call the function at least once: % php -r 'define("BAR",1); function foo() { static $x = array(BAR=>"bar"); var_dump($x);}' /usr/local/book/php4/Zend/zend_language_scanner.l(1169) : Freeing 0x0054B610 (4 bytes), script=- % php -r 'define("BAR",1); function foo() { static $x = array(BAR=>"bar"); var_dump($x);} foo();' array(1) { [1]=> string(3) "bar" } ------------------------------------------------------------------------ [2002-07-31 18:30:20] sniper@php.net reclassified and updated version and OS. ------------------------------------------------------------------------ [2002-07-31 11:08:26] kalowsky@php.net Just pulled down recent fixes, and results in: Fatal error in zend_hash_update: p->pData == pData Fatal error in zend_hash_update: p->pData == pData On Both OSX and FreeBSD. ------------------------------------------------------------------------ [2002-07-31 10:24:36] nohn@php.net Cannot very this with PHP 4.3.0-dev-200207300000 on Compaq Tru64 .... B=>'B' ); var_dump($test); } gives back NULL. So it does'nt crash, but the result seems not to be the expected one. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18668 -- Edit this bug report at http://bugs.php.net/?id=18668&edit=1

« previous php.bugs (#18798) next »