php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35488 serialize() segmentation fault (works with PHP 5.1)
Submitted: 2005-11-30 13:58 UTC Modified: 2005-12-24 02:11 UTC
From: kenashkov at gmail dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.4.1 OS: Fedora Core 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kenashkov at gmail dot com
New email:
PHP Version: OS:

 

 [2005-11-30 13:58 UTC] kenashkov at gmail dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-04 19:02 UTC] lsmith@php.net
Probably a dube of http://bugs.php.net/bug.php?id=35277
 [2005-12-24 02:11 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 12:01:31 2024 UTC