From:             piotr dot m at shwrm dot com
Operating system: Linux / Ubuntu 13.04
PHP version:      5.5.3
Package:          *General Issues
Bug Type:         Bug
Bug description:@list call behaves incorrectly and may cause Segmentation fault 
(11)

Description:
------------
Call to @list on an array returned by function_get_args() will incorrectly
fill variables (only last one is filled) 80% of the time and will cause a
Segmentation fault (11) on the other 20%.

PHP 5.5.3 run on Apache 2.2.22

Test script:
---------------
function a() {
        $opts = func_get_args();
        @list($a, $b, $c) = $opts;
        var_dump($a, $b, $c);
}

a('1','22', '333');

Expected result:
----------------
string '1' (length=1)

string '22' (length=2)

string '333' (length=3)


Actual result:
--------------
null

null

string '333' (length=3)

Or segfault:
[Tue Sep 10 10:57:46 2013] [notice] child pid 32315 exit signal
Segmentation fault (11), possible coredump in /etc/apache2


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65647&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65647&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65647&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=65647&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65647&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65647&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65647&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65647&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65647&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65647&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65647&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=65647&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=65647&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65647&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65647&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65647&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65647&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65647&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65647&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65647&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65647&r=mysqlcfg

Reply via email to