Test: /ext/spl/tests/bug45826.phpt - Version 7.4.6-dev        

Bug #45826 serialize of ArrayObject causes segmentation fault
Submitted: 2008-08-15 00:14:14 Modified: 2008-08-25 18:41:14
From: kevin.armenat Assigned: colder
Status: Closed Package: SPL related
PHP Version: 5.3CVS, 6CVS (2008-08-15) OS: *

There are 2 different diffs reported by users for this test.

Count Diff
2 (67%)
005+ Segmentation fault (core dumped) 006+ 007+ Termsig=11 005- bool(true) 006- bool(true) 007- bool(true) 008- bool(true) 009- bool(true) 010- #### Extending ArrayObject 011- bool(true) 012- bool(true) 013- string(97) "O:12:"ArrayObject2":4:{i:0;i:0;i:1;a:3:{i:0;O:8:"stdClass":0:{}i:1;r:4;i:2;r:1;}i:2;a:0:{}i:3;N;}" 014- array(4) { 015- [0]=> 016- int(0) 017- [1]=> 018- array(3) { 019- [0]=> 020- object(stdClass)#8 (0) { 021- } 022- [1]=> 023- object(stdClass)#8 (0) { 024- } 025- [2]=> 026- object(ArrayObject2)#5 (1) { 027- ["storage":"ArrayObject":private]=> 028- *RECURSION* 029- } 030- } 031- [2]=> 032- array(0) { 033- } 034- [3]=> 035- NULL 036- } 037- bool(true) 038- bool(true) 039- bool(true) 040- bool(true) 041- bool(true)
1 (33%)
005+ 006+ Fatal error: Allowed memory size of 134217728 bytes exhausted at /home/travis/build/php/php-src/Zend/zend_string.h:133 (tried to allocate 17960381302687404992 bytes) in %s/bug45826.php on line 16 005- bool(true) 006- bool(true) 007- bool(true) 008- bool(true) 009- bool(true) 010- #### Extending ArrayObject 011- bool(true) 012- bool(true) 013- string(97) "O:12:"ArrayObject2":4:{i:0;i:0;i:1;a:3:{i:0;O:8:"stdClass":0:{}i:1;r:4;i:2;r:1;}i:2;a:0:{}i:3;N;}" 014- array(4) { 015- [0]=> 016- int(0) 017- [1]=> 018- array(3) { 019- [0]=> 020- object(stdClass)#8 (0) { 021- } 022- [1]=> 023- object(stdClass)#8 (0) { 024- } 025- [2]=> 026- object(ArrayObject2)#5 (1) { 027- ["storage":"ArrayObject":private]=> 028- *RECURSION* 029- } 030- } 031- [2]=> 032- array(0) { 033- } 034- [3]=> 035- NULL 036- } 037- bool(true) 038- bool(true) 039- bool(true) 040- bool(true) 041- bool(true)