com php-src: Fix bug #78154 with JIT: ext/opcache/jit/zend_ji t_helpers.c ext/opcache/jit/zend_jit_x86.dasc

From: Date: Thu, 13 Jun 2019 09:53:31 +0000
Subject: com php-src: Fix bug #78154 with JIT: ext/opcache/jit/zend_ji t_helpers.c ext/opcache/jit/zend_jit_x86.dasc
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106755@lists.php.net to get a copy of this message
Commit: 792e38d863a84ed44970a142339ecfe1b40aea8a Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 13 Jun 2019 11:53:31 +0200 Parents: 719a19d8256094e3a5237f7c50fef5910ab9c742 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=792e38d863a84ed44970a142339ecfe1b40aea8a Log: Fix bug #78154 with JIT Bugs: https://bugs.php.net/78154 Changed paths: M ext/opcache/jit/zend_jit_helpers.c M ext/opcache/jit/zend_jit_x86.dasc Diff: diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 231870d..98da052 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -1635,3 +1635,9 @@ static void ZEND_FASTCALL zend_jit_post_dec_typed_ref(zval *var_ptr, zend_refere ZVAL_COPY_VALUE(var_ptr, ret); } } + +static void ZEND_FASTCALL zend_jit_only_vars_by_reference(zval *arg) +{ + ZVAL_NEW_REF(arg, arg); + zend_error(E_NOTICE, "Only variables should be passed by reference"); +} diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 714abe2..1d57ea3 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -8023,14 +8023,12 @@ static int zend_jit_send_var(dasm_State **Dst, const zend_op *opline, zend_op_ar | jnz >7 | SAVE_VALID_OPLINE opline |.if X64 - | mov CARG1, E_NOTICE - | LOAD_ADDR CARG2, "Only variables should be passed by reference" - | EXT_CALL zend_error, r0 + | LOAD_ZVAL_ADDR CARG1, arg_addr + | EXT_CALL zend_jit_only_vars_by_reference, r0 |.else | sub r4, 8 - | push "Only variables should be passed by reference" - | push E_NOTICE - | EXT_CALL zend_error, r0 + | PUSH_ZVAL_ADDR arg_addr, r0 + | EXT_CALL zend_jit_only_vars_by_reference, r0 | add r4, 16 |.endif if (!zend_jit_check_exception(Dst)) { @@ -8070,14 +8068,12 @@ static int zend_jit_send_var(dasm_State **Dst, const zend_op *opline, zend_op_ar } | SAVE_VALID_OPLINE opline |.if X64 - | mov CARG1, E_NOTICE - | LOAD_ADDR CARG2, "Only variables should be passed by reference" - | EXT_CALL zend_error, r0 + | LOAD_ZVAL_ADDR CARG1, arg_addr + | EXT_CALL zend_jit_only_vars_by_reference, r0 |.else | sub r4, 8 - | push "Only variables should be passed by reference" - | push E_NOTICE - | EXT_CALL zend_error, r0 + | PUSH_ZVAL_ADDR arg_addr, r0 + | EXT_CALL zend_jit_only_vars_by_reference, r0 | add r4, 16 |.endif if (!zend_jit_check_exception(Dst)) {

« previous php.cvs (#106755) next »