[php-src] Issue #7772: Garbage collector segmentation fault for deep nested objects.

From: Date: Tue, 14 Dec 2021 09:55:55 +0000
Subject: [php-src] Issue #7772: Garbage collector segmentation fault for deep nested objects.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238388@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7772 Author: whsv26 ### Description The following code: ```php <?php abstract class LinkedList { } final class Cons extends LinkedList { public function __construct( public mixed $head, public LinkedList $tail ) { } } final class Nil extends LinkedList { } $list = new Nil(); for ($i = 0; $i < 100000; $i++) { $list = new Cons(random_int(0, PHP_INT_MAX), $list); } ``` Resulted in this output: ``` Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) ``` But I expected this output instead: ``` Process finished with exit code 0 ``` ### PHP Version PHP 8.0.11 (cli) ### Operating System Ubuntu 20.04

« previous php.bugs (#238388) next »