mirror of
https://github.com/php/php-src.git
synced 2026-04-14 11:32:11 +02:00
Make "exception_handler_undef" stub to check EG(opline_before_exception) and undefine corresponnding result variable, if necessary.
This fixes few invalid "exception_handler_undef" usages.
This commit is contained in:
@@ -1714,7 +1714,16 @@ static int zend_jit_exception_handler_stub(dasm_State **Dst)
|
||||
static int zend_jit_exception_handler_undef_stub(dasm_State **Dst)
|
||||
{
|
||||
|->exception_handler_undef:
|
||||
| MEM_OP2_2_ZTS mov, r0, aword, executor_globals, opline_before_exception, r0
|
||||
| test byte OP:r0->result_type, (IS_TMP_VAR|IS_VAR)
|
||||
| jnz >1
|
||||
| .if X64
|
||||
| movsxd r0, dword OP:r0->result.var
|
||||
| .else
|
||||
| mov r0, aword OP:r0->result.var
|
||||
| .endif
|
||||
| SET_Z_TYPE_INFO FP + r0, IS_UNDEF
|
||||
|1:
|
||||
| jmp ->exception_handler
|
||||
|
||||
return 1;
|
||||
@@ -2547,7 +2556,6 @@ static int zend_jit_check_exception_undef_result(dasm_State **Dst, const zend_op
|
||||
{
|
||||
if (opline->result_type & (IS_TMP_VAR|IS_VAR)) {
|
||||
| MEM_OP2_1_ZTS cmp, aword, executor_globals, exception, 0, r0
|
||||
| mov r0, opline->result.var
|
||||
| jne ->exception_handler_undef
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user