Skip to content

Commit ce4afd5

Browse files
committed
Remove special handling of method named during preloading
Nowadays op_arrays always hold a ref to the function_name, even if they are fully shared. As such, I don't believe that this code is necessary anymore, and it interferes with the code that releases function_names the appropriate number of times while persisting.
1 parent b196d4a commit ce4afd5

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4707,8 +4707,6 @@ static int accel_preload(const char *config, bool in_child)
47074707
zend_persistent_script *script;
47084708
int ping_auto_globals_mask;
47094709
int i;
4710-
zend_class_entry *ce;
4711-
zend_op_array *op_array;
47124710

47134711
if (PG(auto_globals_jit)) {
47144712
ping_auto_globals_mask = zend_accel_get_auto_globals();
@@ -4878,19 +4876,6 @@ static int accel_preload(const char *config, bool in_child)
48784876
HANDLE_BLOCK_INTERRUPTIONS();
48794877
SHM_UNPROTECT();
48804878

4881-
/* Store method names first, because they may be shared between preloaded and non-preloaded classes */
4882-
ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4883-
ZEND_HASH_FOREACH_PTR(&ce->function_table, op_array) {
4884-
zend_string *new_name = zend_shared_alloc_get_xlat_entry(op_array->function_name);
4885-
4886-
if (!new_name) {
4887-
new_name = accel_new_interned_string(op_array->function_name);
4888-
zend_shared_alloc_register_xlat_entry(op_array->function_name, new_name);
4889-
}
4890-
op_array->function_name = new_name;
4891-
} ZEND_HASH_FOREACH_END();
4892-
} ZEND_HASH_FOREACH_END();
4893-
48944879
ZCSG(preload_script) = preload_script_in_shared_memory(script);
48954880

48964881
SHM_PROTECT();

0 commit comments

Comments
 (0)