[php-src] Issue #13670: Segfault when GC is put on limits
| From: | mvorisek | Date: | Mon, 11 Mar 2024 01:05:37 +0000 |
| Subject: | [php-src] Issue #13670: Segfault when GC is put on limits | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246559@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/13670
Author: mvorisek
### Description
The following code:
repro: https://3v4l.org/Wo4ZO
When
$i = 20 (on l208) is changed to $i = 15, then the repro completes
without any issue.
I guess the repro hits some internal limitation of php-src GC or destructors. The repro creates a
weakmap with 20 x 100 items and each item has wrapper with reference cycle. This represents about
10k living objects which php must handle easily.
Resulted in this output:
```
Process exited with code 137.
```
But I expected this output instead:
no segfault
### PHP Version
any (tested 7.4, 8.2, 8.3, master)
### Operating System
any (tested Windows, linux)