Skip to content

Commit c2f2078

Browse files
committed
Fixed reattach to IR JIT SHM
1 parent cd5c5c7 commit c2f2078

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ext/opcache/jit/zend_jit.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5500,6 +5500,11 @@ ZEND_EXT_API int zend_jit_startup(void *buf, size_t size, bool reattached)
55005500
#endif
55015501
*dasm_ptr = (void*)ZEND_MM_ALIGNED_SIZE_EX(((size_t)(*dasm_ptr)), 16);
55025502
zend_jit_protect();
5503+
} else {
5504+
#if (defined(_WIN32) || defined(IR_TARGET_AARCH64)) && defined(ZEND_JIT_IR)
5505+
zend_jit_stub_handlers = dasm_buf;
5506+
zend_jit_init_handlers();
5507+
#endif
55035508
}
55045509

55055510
#ifndef ZEND_JIT_IR
@@ -5549,13 +5554,10 @@ ZEND_EXT_API int zend_jit_startup(void *buf, size_t size, bool reattached)
55495554
return FAILURE;
55505555
}
55515556
} else {
5552-
#if defined(_WIN32) && !defined(ZEND_JIT_IR)
5557+
#if defined(_WIN32)
55535558
/* restore global labels */
55545559
memcpy(dasm_labels, dasm_buf, sizeof(void*) * zend_lb_MAX);
55555560
zend_jit_init_handlers();
5556-
#elif (defined(_WIN32) || defined(IR_TARGET_AARCH64)) && defined(ZEND_JIT_IR)
5557-
zend_jit_stub_handlers = dasm_buf;
5558-
zend_jit_init_handlers();
55595561
#endif
55605562
}
55615563

0 commit comments

Comments
 (0)