#31217 [Opn->Fbk]: extract($GLOBALS, EXTR_REFS) corrupts memory

From: Date: Mon, 07 Mar 2005 20:41:54 +0000
Subject: #31217 [Opn->Fbk]: extract($GLOBALS, EXTR_REFS) corrupts memory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-77117@lists.php.net to get a copy of this message
ID: 31217 Updated by: sniper@php.net Reported By: cdragon at draconic dot com -Status: Open +Status: Feedback Bug Type: Zend Engine 2 problem Operating System: win2k PHP Version: 5CVS-2004-12-18 (dev) New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-01-19 22:10:02] sniper@php.net See also bug #30074 ------------------------------------------------------------------------ [2004-12-21 04:26:04] cdragon at draconic dot com Description: ------------ Since php 5.0.1, extract($GLOBALS, EXTR_REFS) seems to corrupt code memory and cause various random problems. In my test case, it caused COM("someobject") to always return null, and in another case it just caused some strange output of a "1" instead of the expected strings. I never had a problem in php 5.0.0 up to CVS snapshot php5.0-win32-200407301630. Commenting out extract($GLOBALS, EXTR_REFS) fixes all strange behavior. I had a similar problem in php 4 which I reported as bug id 25708. That bug was fixed and I never had a problem again until 5.0.1. Reproduce code: --------------- extract($GLOBALS, EXTR_REFS); $query = new COM("IXSSO.Query"); if(is_object($query) == false) { var_dump($query); print "Can't create IXSSO Query object."; exit(); } Expected result: ---------------- Nothing Actual result: -------------- PHP has encountered an Access Violation at 01D5F185 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31217&edit=1

« previous php.bugs (#77117) next »