[php-src] Issue #25208: PHP 8.5.12 CLI Segfault (exit code 2) when running PHPUnit 12 on Ubuntu 26.04
| From: | xiaxia9615 | Date: | Thu, 05 Nov 2026 13:15:46 +0000 |
| Subject: | [php-src] Issue #25208: PHP 8.5.12 CLI Segfault (exit code 2) when running PHPUnit 12 on Ubuntu 26.04 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-254017@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/25208
Author: xiaxia9615
### Description
### Description
I am experiencing a hard CLI segmentation fault (exit code 2) when running a PHPUnit test suite. The
crash occurs on the **latest PHP 8.5.12** release, even though the 8.5.12 changelog mentions fixes
for several JIT segfaults (e.g., GH-20890, GH-24388).
PHPUnit only outputs
Fatal error: Premature end of PHP process when running
<TestClass>::<method>. The crash is highly reproducible on Ubuntu 26.04 but does
not happen on PHP 8.3.
### Environment
- **OS:** Ubuntu 26.04 LTS (also reproducible on GitHub Actions ubuntu-latest which
recently migrated to Ubuntu 26)
- **PHP Version:** PHP 8.5.12 (cli) (built: Oct 21 2026)
- **PHPUnit Version:** 12.5.37 (Laravel 13)
- **SAPI:** CLI
- **OpCache:** Enabled (JIT is on by default in CLI). *Note: The crash still occurs even when JIT is
explicitly disabled via -d opcache.enable_cli=0.*
### Steps to Reproduce
1. Clone a Laravel 13 project with ~145 feature/unit tests.
2. Run php artisan test (which invokes vendor/bin/phpunit).
3. The process silently crashes and exits with code 2 right at
Tests\Feature\Admin\AdminFinanceTest::test_plain_admin_gets_403_on_approve_withdrawal_post.
### Expected Behavior
All tests should pass without crashing the CLI process.
### Actual Behavior
The process terminates abruptly with exit code 2. No standard PHP fatal error is
logged.
### Additional Context
- Running a single test file (AdminFinanceTest.php alone) passes successfully.
- Running the full suite crashes at the exact same method every time.
- The code is fully compatible with PHP 8.5, and all 12 architecture tests pass. This appears to be
an engine-level issue specifically triggered by the full test suite execution on Ubuntu 26.04.
- Downgrading to PHP 8.3 on the exact same codebase resolves the issue completely.
### PHP Version
```plain
PHP 8.5.12 (cli) (built: Oct 21 2026 08:07:33) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.5.12, Copyright (c) Zend Technologies
with Zend OPcache v8.5.12, Copyright (c), by Zend Technologies
```
### Operating System
Ubuntu 26.04 LTS (Tencent Cloud VM)