[php-src] Issue #15904: Segmentation fault (stack overflow) in Zend/zend_alloc.c:1435
| From: | YuanchengJiang | Date: | Mon, 16 Sep 2024 08:27:41 +0000 |
| Subject: | [php-src] Issue #15904: Segmentation fault (stack overflow) in Zend/zend_alloc.c:1435 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247789@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15904
Author: YuanchengJiang
### Description
The following code:
```php
<?php
class MemoryLeak
{
public function __construct()
{
$this->things[] = $this;
}
public function __destruct()
{
$fusion->things[] = null;
}
}
for ($i = 0; $i < 100000; ++$i) {
$obj = new MemoryLeak();
}
```
Resulted in this output: https://3v4l.org/9eRM1/rfc#vgit.master
### PHP Version
PHP 8.4.0-dev
### Operating System
ubuntu 22.04