Bug #75636 [Opn->Fbk]: php crashes with too many objects

From: Date: Fri, 08 Dec 2017 18:47:59 +0000
Subject: Bug #75636 [Opn->Fbk]: php crashes with too many objects
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213017@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75636&edit=1 ID: 75636 Updated by: ab@php.net Reported by: benoit dot david at free dot fr Summary: php crashes with too many objects -Status: Open +Status: Feedback Type: Bug Package: Reproducible crash Operating System: Docker Version 17.09.0 PHP Version: 7.2.0 Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2017-12-06 05:49:04] benoit dot david at free dot fr Description: ------------ The test script below works fine for 10 iterations but crashes (Segmentation fault) for 400000 iterations while it shouldn't crash. Uses Php 7.2 on docker (Version 17.09.0-ce-mac35 (19611)) with no extension. Test script: --------------- <?php class Lim { public $id; public $inv; public $fi; function __construct($id) { $this->id = $id; $this->inv = new Inv($this); } }; class Inv { public $inv; public $fi; function __construct($inv) { $this->inv = $inv; } } $max = 400000; //$max = 10; $lim0 = new Lim(0); $limp = $lim0; for ($i=1; $i<$max; $i++) { $lim = new Lim($i); $lim->fi = $limp->inv; $limp->inv->fi = $lim; $limp = $lim; } Expected result: ---------------- The above script should not crash for 400000 iterations. Actual result: -------------- The above script crashes for 400000 iterations. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75636&edit=1

« previous php.bugs (#213017) next »