IR JIT: too long jmp distance in ir_add_veneer, ir_aarch64.dasc:6495.
Open
@dstogov is already working on this.
Since Feb 19, 2025.
Bug
Category: JIT
Extension: opcache
Status: Needs Triage
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
Running ./psalm --no-cache in https://github.com/vimeo/psalm/tree/preload_all_classes_tmp on aarch64 (mac OS 15.3.1, not reproducible on linux aarch64 on a KVM in the same machine) triggers the following assertion:
Assertion failed: (0 && "too long jmp distance"), function ir_add_veneer, file ir_aarch64.dasc, line 6495.
On 3b23de31db969c3c12060ff7c5ba363f65de6669, the following assertion is triggered instead:
Assertion failed: (_blocks[use] == b || use_insn->op == IR_PARAM), function ir_schedule, file ir_gcm.c, line 948.
The issue is triggered by the large number of class_exists statements in src/Psalm/Internal/Preloader.php, reducing the number to < ~1020 fixes the issue.
PHP Version
PHP 8.4.4 or 3b23de31db969c3c12060ff7c5ba363f65de6669
Operating System
Mac OS 15.3.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.