mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Stop recording of trace when encountering hook
Fixes GH-15178
This commit is contained in:
parent
b839c5f1af
commit
606eb849bb
3 changed files with 17 additions and 0 deletions
1
NEWS
1
NEWS
|
@ -37,6 +37,7 @@ PHP NEWS
|
|||
- Opcache:
|
||||
. Fixed bug GH-15490 (Building of callgraph modifies preloaded symbols).
|
||||
(ilutov)
|
||||
. Fixed bug GH-15178 (Assertion in tracing JIT on hooks). (ilutov)
|
||||
|
||||
- PDO_MYSQL:
|
||||
. mysqlnd: support ER_CLIENT_INTERACTION_TIMEOUT. (Appla)
|
||||
|
|
|
@ -265,6 +265,7 @@ zend_constant* ZEND_FASTCALL zend_jit_check_constant(const zval *key);
|
|||
_(INNER_LOOP, "inner loop") /* trace it */ \
|
||||
_(COMPILED_LOOP, "compiled loop") \
|
||||
_(TRAMPOLINE, "trampoline call") \
|
||||
_(PROP_HOOK_CALL, "property hook call") \
|
||||
_(BAD_FUNC, "bad function call") \
|
||||
_(COMPILER_ERROR, "JIT compilation error") \
|
||||
/* no recoverable error (blacklist immediately) */ \
|
||||
|
|
|
@ -503,6 +503,11 @@ static int zend_jit_trace_record_fake_init_call_ex(zend_execute_data *call, zend
|
|||
/* TODO: Can we continue recording ??? */
|
||||
return -1;
|
||||
}
|
||||
/* Function is a property hook. */
|
||||
if (func->common.prop_info) {
|
||||
/* TODO: Can we continue recording ??? */
|
||||
return -1;
|
||||
}
|
||||
if (func->type == ZEND_INTERNAL_FUNCTION
|
||||
&& (func->op_array.fn_flags & (ZEND_ACC_CLOSURE|ZEND_ACC_FAKE_CLOSURE))) {
|
||||
return -1;
|
||||
|
@ -966,6 +971,12 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
|
|||
break;
|
||||
}
|
||||
|
||||
if (EX(func)->op_array.prop_info) {
|
||||
/* TODO: Can we continue recording ??? */
|
||||
stop = ZEND_JIT_TRACE_STOP_PROP_HOOK_CALL;
|
||||
break;
|
||||
}
|
||||
|
||||
TRACE_RECORD(ZEND_JIT_TRACE_ENTER,
|
||||
EX(return_value) != NULL ? ZEND_JIT_TRACE_RETURN_VALUE_USED : 0,
|
||||
op_array);
|
||||
|
@ -1069,6 +1080,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
|
|||
/* TODO: Can we continue recording ??? */
|
||||
stop = ZEND_JIT_TRACE_STOP_BAD_FUNC;
|
||||
break;
|
||||
} else if (EX(call)->func->common.prop_info) {
|
||||
/* TODO: Can we continue recording ??? */
|
||||
stop = ZEND_JIT_TRACE_STOP_PROP_HOOK_CALL;
|
||||
break;
|
||||
}
|
||||
func = EX(call)->func;
|
||||
if (func->type == ZEND_INTERNAL_FUNCTION
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue