Skip to content

Commit b09bddc

Browse files
committed
Save opline before fallible arg type check in recv_init jit
The verify arg functions may throw an exception, so we need to save the opline beforehand. Asan failures could be observed in Zend/tests/type_declarations/scalar_constant_defaults.phpt with a ZTS build.
1 parent 1afcf28 commit b09bddc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9100,6 +9100,7 @@ static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, zend_op_a
91009100
} else {
91019101
| cmp byte [r0 + 8], IS_OBJECT
91029102
| jne >8
9103+
| SAVE_VALID_OPLINE opline
91039104
| mov FCARG1a, r0
91049105
| mov r0, EX->run_time_cache
91059106
| lea r0, [r0 + opline->extended_value]
@@ -9151,6 +9152,7 @@ static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, zend_op_a
91519152
}
91529153
if (has_slow & 2) {
91539154
|8:
9155+
| SAVE_VALID_OPLINE opline
91549156
| mov FCARG1a, r0
91559157
| mov r0, EX->run_time_cache
91569158
| lea r0, [r0 + opline->extended_value]

0 commit comments

Comments
 (0)