[php-src] PR #26005: JIT: Fix jit trampoline num args
| From: | jorgsowa | Date: | Tue, 01 Dec 2026 20:14:02 +0000 |
| Subject: | [php-src] PR #26005: JIT: Fix jit trampoline num args | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-41335@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/26005
Author: jorgsowa
find_trampoline_num_args() picked the INIT_CALL record of a user call inlined in the
arguments of an internal trampoline call (e.g. an FFI function or
_ZendTestClass::test()) instead of the trampoline's own record. Debug builds
abort:
Assertion failed: (!p->op_array), function find_trampoline_num_args, file zend_jit_trace.c,
line 1306.
Release builds only over-estimate the trace stack size.
Reproducer (tracing JIT, hot counters = 1):
```php
function f($x) { return $x + 1; }
$obj = new _ZendTestClass();
for ($i = 0; $i < 5; $i++) {
$obj->test(f($i), 2, 3, 4, 5, 6, 7, 8);
}
```
Affects PHP 8.5+ (introduced in #16365).