Skip to content
Open
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
15 changes: 6 additions & 9 deletions ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -4345,15 +4345,6 @@ static void preload_load(void)
}
}

if (EG(zend_constants)) {
EG(persistent_constants_count) = EG(zend_constants)->nNumUsed;
}
if (EG(function_table)) {
EG(persistent_functions_count) = EG(function_table)->nNumUsed;
}
if (EG(class_table)) {
EG(persistent_classes_count) = EG(class_table)->nNumUsed;
}
if (CG(map_ptr_last) != ZCSG(map_ptr_last)) {
size_t old_map_ptr_last = CG(map_ptr_last);
CG(map_ptr_last) = ZCSG(map_ptr_last);
Expand Down Expand Up @@ -4589,6 +4580,12 @@ static zend_result accel_preload(const char *config, bool in_child)

preload_load();

/* Update persistent counts, as shutdown will discard anything past
* that, and these tables are aliases to global ones at this point. */
EG(persistent_functions_count) = EG(function_table)->nNumUsed;
EG(persistent_classes_count) = EG(class_table)->nNumUsed;
EG(persistent_constants_count) = EG(zend_constants)->nNumUsed;

/* Store individual scripts with unlinked classes */
HANDLE_BLOCK_INTERRUPTIONS();
SHM_UNPROTECT();
Expand Down
Loading