From:             kenashkov at gmail dot com
Operating system: Fedora Core 4
PHP version:      4.4.1
PHP Bug Type:     Unknown/Other Function
Bug description:  serialize() segmentation fault

Description:
------------
Segmentation fault when serializing multidimentional recursive arrays. The
code below works fine with 4.3.11 (again on FC4).
When the argument is passend by reference (which is deprecated):
print_r(unserialize(serialize(&$arr1)));
it is fine. 
Or passing a reference:
print_r(unserialize(serialize($ref=&$arr1)));
also works.
No problem with serializing just $arr1[0]=&$arr;


Reproduce code:
---------------
<?
$arr1[0][0] =& $arr1;
print_r(unserialize(serialize($arr1)));
?>

Expected result:
----------------
Array
(
    [0] => Array
        (
            [0] => Array
                (
                    [0] => Array
                        (
                            [0] => Array
 *RECURSION*
                        )

                )

        )

)


Actual result:
--------------
Segmentation fault

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

Reply via email to