Created
September 8, 2021 14:13
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc | |
index 7941b396f5..8e81627007 100644 | |
--- a/ext/opcache/jit/zend_jit_x86.dasc | |
+++ b/ext/opcache/jit/zend_jit_x86.dasc | |
@@ -4831,7 +4831,11 @@ static int zend_jit_math_helper(dasm_State **Dst, | |
| FREE_OP op1_type, op1, op1_info, 0, opline | |
| FREE_OP op2_type, op2, op2_info, 0, opline | |
if (may_throw) { | |
- zend_jit_check_exception(Dst); | |
+ if (Z_MODE(res_addr) == IS_MEM_ZVAL && Z_REG(res_addr) == ZREG_RX) { | |
+ zend_jit_check_exception_undef_result(Dst, opline); | |
+ } else { | |
+ zend_jit_check_exception(Dst); | |
+ } | |
} | |
if (Z_MODE(res_addr) == IS_REG) { | |
zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, res_var); | |
@@ -5167,7 +5171,11 @@ static int zend_jit_long_math_helper(dasm_State **Dst, | |
| FREE_OP op1_type, op1, op1_info, 0, opline | |
| FREE_OP op2_type, op2, op2_info, 0, opline | |
if (may_throw) { | |
- zend_jit_check_exception(Dst); | |
+ if (Z_MODE(res_addr) == IS_MEM_ZVAL && Z_REG(res_addr) == ZREG_RX) { | |
+ zend_jit_check_exception_undef_result(Dst, opline); | |
+ } else { | |
+ zend_jit_check_exception(Dst); | |
+ } | |
} | |
if (Z_MODE(res_addr) == IS_REG) { | |
zend_jit_addr real_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, res_var); | |
@@ -5281,7 +5289,11 @@ static int zend_jit_concat_helper(dasm_State **Dst, | |
| FREE_OP op1_type, op1, op1_info, 0, opline | |
| FREE_OP op2_type, op2, op2_info, 0, opline | |
if (may_throw) { | |
- zend_jit_check_exception(Dst); | |
+ if (Z_MODE(res_addr) == IS_MEM_ZVAL && Z_REG(res_addr) == ZREG_RX) { | |
+ zend_jit_check_exception_undef_result(Dst, opline); | |
+ } else { | |
+ zend_jit_check_exception(Dst); | |
+ } | |
} | |
#if 1 | |
if ((op1_info & MAY_BE_STRING) && (op2_info & MAY_BE_STRING)) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment