Edit report at https://bugs.php.net/bug.php?id=67363&edit=1
ID: 67363
Comment by: php at laszlokorte dot de
Reported by: mg at artigo dot pl
Summary: Unserialize corrupts data
Status: Open
Type: Bug
Package: Variables related
Operating System: Irrelavant
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Not sure if this is the correct issue but I came across some problem with serialize/unserialize.
(php-5.6.14)
I have created a gist to reproduce it:
https://gist.github.com/laszlokorte/3948f40873346cc1fd9b8c11ab06ae04
The problem is that if an object contains a another object as child in multiple places that child
does not get (un)serialized correctly. Not just that the identity of the multiple occurrences is not
preserved but the object is not unserialized correctly at all. It's easier to understand by
looking at gist.
Previous Comments:
------------------------------------------------------------------------
[2017-01-01 13:36:14] mg at artigo dot pl
Maybe I should add that the issue was present for sure without opcache and it was not the case of
shared memory, because we could repeat it any time, on any day with the same result and same
corruption.
------------------------------------------------------------------------
[2017-01-01 13:31:19] mg at artigo dot pl
Dear Nikita,
I wish you a Happy New Year with lots of happiness and joy.
It has been so long since the issue was reported, that we managed to implement some workarounds in
the meantime and we do not encounter it anymore.
That said, if I encounter it again, I will open another issue, ok?
Thanks,
Marcin
------------------------------------------------------------------------
[2017-01-01 12:44:29] nikic@php.net
Is someone still encountering this problem in PHP >= 5.6? If so, could you please specify whether
you use opcache? If you do, can you check whether you get a reproducible crash if you set
opcache.protect_memory=1?
------------------------------------------------------------------------
[2014-06-27 11:25:35] mg at artigo dot pl
3 more:
"ticketshop-kilometer-bank" => "ticketshop-kilomfter-(NUL)ank"
"ticketshop-promo-spar-holiday" => "ticketshop-promo.spar(NUL)holiday"
"ticketshop-promo-weekend" => "ticketshop-promo.week(NUL)nd"
------------------------------------------------------------------------
[2014-06-27 11:18:51] mg at artigo dot pl
We just had the same issue on a different server (FCGI 5.4.27)
String currupted by unserialize:
"ticketshop-promo-summer-ticket" => "ticketshop-promo.summ(NUL)r-ticket"
------------------------------------------------------------------------
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=67363
--
Edit this bug report at https://bugs.php.net/bug.php?id=67363&edit=1