1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00

JIT: Disable recursive call optimization for VM without global register variables

A tail-call to VM handler from recursively called function may lead to
pass control to incorrect stack frame.
This commit is contained in:
Dmitry Stogov
2021-09-21 14:30:56 +03:00
parent 051036330a
commit 48d050ef72

View File

@@ -10082,7 +10082,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
}
}
if (!trace && op_array == &func->op_array
if (GCC_GLOBAL_REGS && !trace && op_array == &func->op_array
&& num_args >= op_array->required_num_args) {
/* recursive call */
if (ZEND_OBSERVER_ENABLED) {