[php-src] Issue #12560: Assertion `0 && "too long jmp distance"' failed with new JIT on AArch64
| From: | pfustc | Date: | Mon, 30 Oct 2023 09:09:15 +0000 |
| Subject: | [php-src] Issue #12560: Assertion `0 && "too long jmp distance"' failed with new JIT on AArch64 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-245678@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/12560
Author: pfustc
### Description
Hi @dstogov, we recently monitored below assertion failure after the integration of the new PHP JIT
(#12079). The issue is reproducible by running some tests in the
[phpunit](https://github.com/sebastianbergmann/phpunit) repo on **AArch64**.
- Checkout and build
```
$ git clone https://github.com/sebastianbergmann/phpunit.git
$ cd phpunit
$ composer install
```
- Run a test
```
$ php -d zend_extension=/home/work/php-src/modules/opcache.so -d opcache.jit_buffer_size=128M \
-d opcache.enable_cli=1 ./phpunit tests/unit/Framework/AssertTest.php
PHPUnit 11.0-gddc736d9b by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.0-dev
Configuration: /tmp/phpunit/phpunit.xml
............................................................... 63 / 598 ( 10%)
............................................................... 126 / 598 ( 21%)
............................................................... 189 / 598 ( 31%)
............................................................... 252 / 598 ( 42%)
............................................................... 315 / 598 ( 52%)
............................................................... 378 / 598 ( 63%)
............................................................... 441 / 598 ( 73%)
............................................................... 504 / 598 ( 84%)
php: /home/work/php-src/ext/opcache/jit/ir/ir_aarch64.dasc:5609: ir_add_veneer: Assertion `0
&& "too long jmp distance"' failed.
Aborted (core dumped)
```
### PHP Version
master @ https://github.com/php/php-src/commit/4c6dbe0dd075bc324abbea85592d1d780bbbe062
### Operating System
Ubuntu 22.04