Bug #64146 [Csd->Asn]: serialize incorrectly saving objects when they are cloned

From: Date: Wed, 15 Jan 2014 19:35:30 +0000
Subject: Bug #64146 [Csd->Asn]: serialize incorrectly saving objects when they are cloned
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183814@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64146&edit=1

 ID:                 64146
 Updated by:         mike@php.net
 Reported by:        slusarz at curecanti dot org
 Summary:            serialize incorrectly saving objects when they are
                     cloned
-Status:             Closed
+Status:             Assigned
 Type:               Bug
 Package:            Variables related
 Operating System:   Linux
 PHP Version:        5.4.11
-Assigned To:        
+Assigned To:        mike
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2014-01-10 08:33:44] gm dot outside+php at gmail dot com

PHP 5.5.7 (the latest at this moment) fails its testsuite on a 32-bit architecture on this bug.  The
reproduction build is very simple: ./configure --disable-all && make && make test .

According to Remi Collet this has started with PHP 5.5.5 and affects only 32-bit systems while
64-bit systems pass the test.  The latest reply on the PHP development list I found was from Michael
Wallner saying that he was going to look into the issue:

http://permalink.gmane.org/gmane.comp.php.devel/82473

Well, the issue is still there, so the bug is not properly solved, IMO.

Below is the content of ext/standard/tests/serialize/bug64146.diff on my 32-bit system after the
failure of the test:
===
$ cat ext/standard/tests/serialize/bug64146.diff003+ 
004+ Notice: Trying to get property of non-object in
/usr/src/php-5.5.7/ext/standard/tests/serialize/bug64146.php on line 49
005+ 
003- 2
$ 
===

------------------------------------------------------------------------
[2013-10-04 14:18:01] mike@php.net

Automatic comment on behalf of mike
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8973390541faaadfdfc0f838421f037060188e5e
Log: fix bug #64146 (serialize incorrectly saving objects when they are cloned)

------------------------------------------------------------------------
[2013-02-07 22:58:23] mike@php.net

Using zend_objects_get_address() instead of the object handle fixes; but triggers 
bug #62836

------------------------------------------------------------------------
[2013-02-07 22:57:27] mike@php.net

The following patch has been added/updated:

Patch Name: zend_objects_get_address
Revision:   1360277847
URL:        https://bugs.php.net/patch-display.php?bug=64146&patch=zend_objects_get_address&revision=1360277847

------------------------------------------------------------------------
[2013-02-07 21:35:26] mike@php.net

Obviously a flaw in the way an object is identified in the engine/in the 
serializer.

Since the cloned objects only live for the time of serialization, both have the 
same object handle and will be identified as the *same*. 

Not sure why unserialize barfs on it, though.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=64146


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64146&edit=1


Thread (16 messages)

« previous php.bugs (#183814) next »