Bug #67452 [Com]: clone and serialize issue

From: Date: Fri, 20 Jun 2014 12:46:44 +0000
Subject: Bug #67452 [Com]: clone and serialize issue
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186275@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67452&edit=1

 ID:                 67452
 Comment by:         mbeccati@php.net
 Reported by:        remi@php.net
 Summary:            clone and serialize issue
 Status:             Open
 Type:               Bug
 Package:            *General Issues
 Operating System:   GNU/LInux (32 bits)
 PHP Version:        5.4+
 Block user comment: N
 Private report:     N

 New Comment:

Bug was reproducted on NetBSD i386. The patch fixes the issue.


Previous Comments:
------------------------------------------------------------------------
[2014-06-17 09:58:32] remi@php.net

This first patch seems to fix this runtime issue, and don't break other serialize tests.

This is not a perfect solution, as handle free list is ignored.

------------------------------------------------------------------------
[2014-06-17 09:56:47] remi@php.net

The following patch has been added/updated:

Patch Name: serialize.patch
Revision:   1402999007
URL:        https://bugs.php.net/patch-display.php?bug=67452&patch=serialize.patch&revision=1402999007

------------------------------------------------------------------------
[2014-06-16 11:34:03] remi@php.net

This test is failing since introduced in 5.4.22

------------------------------------------------------------------------
[2014-06-16 11:16:44] remi@php.net

Enabling debug output in php_add_var_hash(),
with (type, zend_objects_get_address, handle): var_no

+ add var (5, f6e11b18,        6): 1
+ add var (4,        0,        0): 2
+ add var (5, f6e1169c,        7): 3
+ add var (5, f6e13d94,        b): 4
+ add var (1,        0,        0): 5
+ add var (5, f6e1175c,        9): 6
- had var (5, f6e13d94,        b): 4

------------------------------------------------------------------------
[2014-06-16 11:14:23] remi@php.net

Description:
------------
On 32bits build, ext/standard/tests/serialize/bug64146.phpt fails.



Test script:
---------------
bug64146.phpt with a dump of the serialized string.

Expected result:
----------------
On 64 bits we have (test OK)

string(108)
"O:1:"A":1:{s:1:"a";a:2:{i:0;C:1:"B":24:{O:1:"C":1:{s:1:"c";i:1;}}i:1;C:1:"B":24:{O:1:"C":1:{s:1:"c";i:2;}}}}"



Actual result:
--------------
On 32 bits we have (failed test)

string(87)
"O:1:"A":1:{s:1:"a";a:2:{i:0;C:1:"B":24:{O:1:"C":1:{s:1:"c";i:1;}}i:1;C:1:"B":4:{r:4;}}}"



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



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


Thread (9 messages)

« previous php.bugs (#186275) next »