[php-src] Issue #19065: Crash on zts alpine with specific match statments (frankenphp)

From: Date: Mon, 07 Jul 2025 22:05:06 +0000
Subject: [php-src] Issue #19065: Crash on zts alpine with specific match statments (frankenphp)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250390@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/19065 Author: AlliBalliBaba ### Description This issue was originally opened in the [FrankenPHP repo](https://github.com/php/frankenphp/issues/1722), but I'm posting a minimal reproducer here as well since I'm not sure how to best debug this. Basically, specific weird match statements will lead to hanging+crash in the alpine docker image (bookworm doesn't have this issue). The original file where this first was observed is [this enum](https://github.com/PrinsFrank/standards/blob/2285d506844d0b8a3686c33193fe026f48ef8a3e/src/Country/CountryAlpha2.php#L378), but I created a minimal reproducer here: https://github.com/AlliBalliBaba/franke-alpine-zts-crash Hanging + crashing will only happen if the non-debug version of PHP is installed. As soon as I'm using a debug version like [this](https://github.com/AlliBalliBaba/franke-alpine-zts-crash/blob/master/Dockerfile), the crash will not happen anymore (essentially --with-debug when building PHP will prevent the crash). Similarly, disabling opcache will also prevent the crash. ### PHP Version ```plain PHP 8.4.10 (cli) (built: Jul 3 2025 23:01:28) (ZTS) Copyright (c) The PHP Group Built by https://github.com/docker-library/php Zend Engine v4.4.10, Copyright (c) Zend Technologies with Zend OPcache v8.4.10, Copyright (c), by Zend Technologies FrankenPHP v1.7.0 PHP 8.4.10 Caddy v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U= ``` ### Operating System Alpine 3.22.0

« previous php.bugs (#250390) next »