Skip to content

Compile in opcache without COMPILE_IGNORE_INTERNAL_CLASSES #15025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
9 changes: 8 additions & 1 deletion ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1809,13 +1809,20 @@ static zend_persistent_script *opcache_compile_file(zend_file_handle *file_handl
zend_try {
orig_compiler_options = CG(compiler_options);
CG(compiler_options) |= ZEND_COMPILE_HANDLE_OP_ARRAY;
CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES;
CG(compiler_options) |= ZEND_COMPILE_DELAYED_BINDING;
CG(compiler_options) |= ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION;
CG(compiler_options) |= ZEND_COMPILE_IGNORE_OTHER_FILES;
CG(compiler_options) |= ZEND_COMPILE_IGNORE_OBSERVER;
#ifdef ZEND_WIN32
/* On Windows, don't compile with internal classes. Shm may be attached from different
* processes with internal classes living in different addresses. */
CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES;
#endif
if (ZCG(accel_directives).file_cache) {
CG(compiler_options) |= ZEND_COMPILE_WITH_FILE_CACHE;
/* Don't compile with internal classes for file cache, in case some extension is removed
* later on. We cannot assume it is there in the future. */
CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES;
}
op_array = *op_array_p = accelerator_orig_compile_file(file_handle, type);
CG(compiler_options) = orig_compiler_options;
Expand Down
Loading