Skip to content

Commit 529f9f8

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: Release lock and protect SHM before replaying warnings
2 parents f06ac9a + 90ca8f9 commit 529f9f8

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
@@ -2178,6 +2178,9 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
21782178
zend_hash_index_del(EG(zend_constants), new_const_num);
21792179
}
21802180
}
2181+
persistent_script->dynamic_members.last_used = ZCG(request_time);
2182+
SHM_PROTECT();
2183+
HANDLE_UNBLOCK_INTERRUPTIONS();
21812184
} else {
21822185

21832186
#if !ZEND_WIN32
@@ -2214,15 +2217,14 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
22142217
}
22152218
}
22162219
}
2220+
persistent_script->dynamic_members.last_used = ZCG(request_time);
2221+
SHM_PROTECT();
2222+
HANDLE_UNBLOCK_INTERRUPTIONS();
2223+
22172224
replay_warnings(persistent_script->num_warnings, persistent_script->warnings);
22182225
from_shared_memory = 1;
22192226
}
22202227

2221-
persistent_script->dynamic_members.last_used = ZCG(request_time);
2222-
2223-
SHM_PROTECT();
2224-
HANDLE_UNBLOCK_INTERRUPTIONS();
2225-
22262228
/* Fetch jit auto globals used in the script before execution */
22272229
if (persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask)) {
22282230
zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask));

0 commit comments

Comments
 (0)