[php-src] Issue #8211: Segment fault 11 when trying to catch exception

From: Date: Tue, 12 Apr 2022 06:29:14 +0000
Subject: [php-src] Issue #8211: Segment fault 11 when trying to catch exception
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240858@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8211 Comment Author: mrsuh Hi guys! I found a way to reproduce the error: ```bash composer install symfony/cache ``` test.php ```php <?php use Symfony\Component\Cache\Adapter\FilesystemAdapter; require __DIR__ . '/vendor/autoload.php'; $cache = new FilesystemAdapter(); $cache->get('wrong@key', function () {}); ``` ```bash docker run -it --rm -v $PWD:/app -w /app php:8.1.2-cli bash pecl install xdebug-3.1.3 docker-php-ext-enable xdebug php test.php ``` The error only reproduces with: * PHP 8.1.0 - 8.1.3 * Xdebug <= 3.1.3 The error comes from creating \Closure [here](https://github.com/symfony/cache/blob/ba06841ed293fcaf79a592f59fdaba471f7c756c/Traits/ContractsTrait.php#L45) with a class with static variables [here](https://github.com/symfony/cache/blob/ba06841ed293fcaf79a592f59fdaba471f7c756c/LockRegistry.php#L128) Bug is already fixed in [PHP](https://github.com/php/php-src/issues/8083) and [Xdebug](https://bugs.xdebug.org/view.php?id=2064) I think we can close this issue. @madmortigan1 can you test it with PHP 8.1.4?

« previous php.bugs (#240858) next »