]> granicus.if.org Git - php/commitdiff
JIT: Save opline before calling zend_timeout
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 29 Apr 2020 08:57:27 +0000 (10:57 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 29 Apr 2020 08:58:39 +0000 (10:58 +0200)
tests/045.phpt started segfaulting, because the opline is not set
when zend_timeout is invoked.

ext/opcache/jit/zend_jit_x86.dasc

index aac0e44f3c0bf3cc011e43a562399f4f9c5b3b79..205c6dc38a6f6dc59fb311d464d1117e9b120e7c 100644 (file)
@@ -1606,6 +1606,7 @@ static inline zend_bool is_signed(double d)
 static int zend_jit_interrupt_handler_stub(dasm_State **Dst)
 {
        |->interrupt_handler:
+       |       SAVE_OPLINE
        |       //EG(vm_interrupt) = 0;
        |       MEM_OP2_1_ZTS mov, byte, executor_globals, vm_interrupt, 0, r0
        |       //if (EG(timed_out)) {
@@ -1617,7 +1618,6 @@ static int zend_jit_interrupt_handler_stub(dasm_State **Dst)
        |1:
        |       //} else if (zend_interrupt_function) {
        if (zend_interrupt_function) {
-               |       SAVE_OPLINE
                |       //zend_interrupt_function(execute_data);
                |.if X64
                        |       mov CARG1, FP