Skip to content

Assertion `0 && "too long jmp distance"' failed with new JIT on AArch64 #12560

@pfustc

Description

@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 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 @ 4c6dbe0

Operating System

Ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions