|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66292 Serializable interface implementation returns recursive when object serialized
Submitted: 2013-12-13 21:39 UTC Modified: 2013-12-15 09:50 UTC
From: will at johnstonclan dot net Assigned:
Status: Duplicate Package: Scripting Engine problem
PHP Version: 5.5.7 OS: Mac OS X 10.9
Private report: No CVE-ID: None
 [2013-12-13 21:39 UTC] will at johnstonclan dot net
When a class is created which implements Serializable, and the serialize method instantiates another class which is then serialized and returned, and several instances of the first class are created in an array, and then entire array is serialized, instances after the first one are considered recursive. If this is unserialized, PHP segfaults.

Test script:

If you uncomment the last line, the entire script segfaults.

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-13 21:40 UTC] will at johnstonclan dot net
This might be related to #36424. Since that bug has been fixed for a while, I opted to open a new one.
 [2013-12-15 09:50 UTC]
-Status: Open +Status: Duplicate
 [2013-12-15 09:50 UTC]
Duplicate of #66085
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 03 21:01:29 2023 UTC