Skip to content

Commit 90ca8f9

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Release lock and protect SHM before replaying warnings
2 parents 40e0bdb + 8f5480e commit 90ca8f9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,6 +2185,9 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
21852185
zend_hash_index_del(EG(zend_constants), new_const_num);
21862186
}
21872187
}
2188+
persistent_script->dynamic_members.last_used = ZCG(request_time);
2189+
SHM_PROTECT();
2190+
HANDLE_UNBLOCK_INTERRUPTIONS();
21882191
} else {
21892192

21902193
#if !ZEND_WIN32
@@ -2221,15 +2224,14 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
22212224
}
22222225
}
22232226
}
2227+
persistent_script->dynamic_members.last_used = ZCG(request_time);
2228+
SHM_PROTECT();
2229+
HANDLE_UNBLOCK_INTERRUPTIONS();
2230+
22242231
replay_warnings(persistent_script->num_warnings, persistent_script->warnings);
22252232
from_shared_memory = 1;
22262233
}
22272234

2228-
persistent_script->dynamic_members.last_used = ZCG(request_time);
2229-
2230-
SHM_PROTECT();
2231-
HANDLE_UNBLOCK_INTERRUPTIONS();
2232-
22332235
/* Fetch jit auto globals used in the script before execution */
22342236
if (persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask)) {
22352237
zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask));

0 commit comments

Comments
 (0)