Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Zend/Optimizer/zend_optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ zend_result zend_optimizer_eval_special_func_call(

if (func && func->type == ZEND_INTERNAL_FUNCTION
&& func->module->type == MODULE_PERSISTENT
#ifdef ZEND_WIN32
#ifdef ZEND_OPCACHE_SHM_REATTACHMENT
&& func->module->handle == NULL
#endif
) {
Expand All @@ -129,7 +129,7 @@ zend_result zend_optimizer_eval_special_func_call(
}

if (m->type == MODULE_PERSISTENT
#ifdef ZEND_WIN32
#ifdef ZEND_OPCACHE_SHM_REATTACHMENT
&& m->handle == NULL
#endif
) {
Expand Down
6 changes: 3 additions & 3 deletions Zend/zend_inheritance.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ static void track_class_dependency(zend_class_entry *ce, zend_string *class_name
return;
}

#ifndef ZEND_WIN32
/* On non-Windows systems, internal classes are always the same,
#ifndef ZEND_OPCACHE_SHM_REATTACHMENT
/* On systems without reattachment, internal classes are always the same,
* so there is no need to explicitly track them. */
if (ce->type == ZEND_INTERNAL_CLASS) {
return;
Expand Down Expand Up @@ -3619,7 +3619,7 @@ ZEND_API zend_class_entry *zend_do_link_class(zend_class_entry *ce, zend_string
}
}

#ifndef ZEND_WIN32
#ifndef ZEND_OPCACHE_SHM_REATTACHMENT
if (ce->ce_flags & ZEND_ACC_ENUM) {
/* We will add internal methods. */
is_cacheable = false;
Expand Down
4 changes: 2 additions & 2 deletions ext/opcache/jit/zend_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ static bool zend_jit_class_may_be_modified(const zend_class_entry *ce, const zen
uint32_t i;

if (ce->type == ZEND_INTERNAL_CLASS) {
#ifdef _WIN32
#ifdef ZEND_OPCACHE_SHM_REATTACHMENT
/* ASLR */
return 1;
#else
Expand Down Expand Up @@ -752,7 +752,7 @@ static bool zend_jit_class_may_be_modified(const zend_class_entry *ce, const zen
static bool zend_jit_may_be_modified(const zend_function *func, const zend_op_array *called_from)
{
if (func->type == ZEND_INTERNAL_FUNCTION) {
#ifdef _WIN32
#ifdef ZEND_OPCACHE_SHM_REATTACHMENT
/* ASLR */
return 1;
#else
Expand Down
12 changes: 6 additions & 6 deletions ext/opcache/jit/zend_jit_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -8582,7 +8582,7 @@ static int zend_jit_push_call_frame(zend_jit_ctx *jit, const zend_op *opline, co
if_enough_stack = ir_IF(ref);
ir_IF_FALSE_cold(if_enough_stack);

#ifdef _WIN32
#ifdef ZEND_OPCACHE_SHM_REATTACHMENT
if (0) {
#else
if (opline->opcode == ZEND_INIT_FCALL && func && func->type == ZEND_INTERNAL_FUNCTION) {
Expand Down Expand Up @@ -8631,7 +8631,7 @@ static int zend_jit_push_call_frame(zend_jit_ctx *jit, const zend_op *opline, co
// JIT: ZEND_SET_CALL_INFO(call, 0, call_info);
ir_STORE(jit_CALL(rx, This.u1.type_info), ir_CONST_U32(IS_UNDEF | ZEND_CALL_NESTED_FUNCTION));
}
#ifdef _WIN32
#ifdef ZEND_OPCACHE_SHM_REATTACHMENT
if (0) {
#else
if (opline->opcode == ZEND_INIT_FCALL && func && func->type == ZEND_INTERNAL_FUNCTION) {
Expand Down Expand Up @@ -8768,7 +8768,7 @@ static int zend_jit_func_guard(zend_jit_ctx *jit, ir_ref func_ref, const zend_fu
ir_LOAD_A(ir_ADD_OFFSET(func_ref, offsetof(zend_op_array, opcodes))),
ir_CONST_ADDR(opcodes)),
ir_CONST_ADDR(exit_addr));
#ifdef ZEND_WIN32
#ifdef ZEND_OPCACHE_SHM_REATTACHMENT
} else if (func->type == ZEND_INTERNAL_FUNCTION) {
// ASLR may cause different addresses in different workers. Check for the internal function handler.
// JIT: if (call->func.internal_function.handler != handler) goto exit_addr;
Expand Down Expand Up @@ -8841,7 +8841,7 @@ static int zend_jit_init_fcall(zend_jit_ctx *jit, const zend_op *opline, uint32_
if (!func
&& trace
&& trace->op == ZEND_JIT_TRACE_INIT_CALL) {
#ifdef _WIN32
#ifdef ZEND_OPCACHE_SHM_REATTACHMENT
/* ASLR */
if (trace->func->type != ZEND_INTERNAL_FUNCTION) {
func = (zend_function*)trace->func;
Expand All @@ -8851,7 +8851,7 @@ static int zend_jit_init_fcall(zend_jit_ctx *jit, const zend_op *opline, uint32_
#endif
}

#ifdef _WIN32
#ifdef ZEND_OPCACHE_SHM_REATTACHMENT
if (0) {
#else
if (opline->opcode == ZEND_INIT_FCALL
Expand Down Expand Up @@ -10092,7 +10092,7 @@ static int zend_jit_do_fcall(zend_jit_ctx *jit, const zend_op *opline, const zen
if (trace && !func) {
if (trace->op == ZEND_JIT_TRACE_DO_ICALL) {
ZEND_ASSERT(!trace->func || trace->func->type == ZEND_INTERNAL_FUNCTION);
#ifndef ZEND_WIN32
#ifndef ZEND_OPCACHE_SHM_REATTACHMENT
// TODO: ASLR may cause different addresses in different workers ???
func = trace->func;
if (JIT_G(current_frame) &&
Expand Down
Loading