From:             postings-php-bug at hans-spath dot de
Operating system: Irrelevant
PHP version:      Irrelevant
PHP Bug Type:     Reproducible crash
Bug description:  array_splice on $GLOBALS leads to crash

Description:
------------
PHP doesn't handle an attempt of clearing $GLOBALS correctly.

Reproduce code:
---------------
function __(){array_splice($GLOBALS,0,count($GLOBALS));}__();

Expected result:
----------------
$GLOBALS should be empty or an error message should be printed.

Actual result:
--------------
My tests:

PHP 4.3.8 cli/cgi, 4.3.10 cli, Linux 2.6:
segmentation fault

PHP 4.3.8 apache2sapi, Windows XP SP2:
Apache2 log: Parent: child process exited with status 3221225477 --
Restarting.

PHP 5.0.1 cli, Windows XP SP2:
array_splice works, but then crashes on script end (probably during
cleanups) or on phpinfo();


-- 
Edit bug report at http://bugs.php.net/?id=31158&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31158&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31158&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31158&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31158&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31158&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31158&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31158&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31158&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31158&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31158&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31158&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31158&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31158&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31158&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31158&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31158&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31158&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31158&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31158&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31158&r=mysqlcfg

Reply via email to