Skip to content

Fix #78429: opcache_compile_file(__FILE__); segfaults #4570

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

Closed
wants to merge 1 commit into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Aug 20, 2019

We have to ensure that OPcache has been properly started up when
opcache_compile_file() is called.

We have to ensure that OPcache has been properly started up when
`opcache_compile_file()` is called.
@@ -852,6 +852,11 @@ static ZEND_FUNCTION(opcache_compile_file)
return;
}

if (!accel_startup_ok) {
zend_error(E_NOTICE, ACCELERATOR_PRODUCT_NAME " has not been properly started, can't compile file");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated: Is there even a need for the ACCELERATOR_PRODUCT_NAME to still be a thing as its development is managed by us?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frankly, I don't know, but in doubt we should stick with it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dstogov Any input here? Is this something Zend uses internally still?

Copy link
Contributor

@staabm staabm Sep 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this error message contain a hint where to look for the problem cause, e.g. ini-setting opcache.enable_cli?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can tell, OPcache might not be started for completely different reasons as well (e.g. because it failed to attach to the SHM on Windows).

@cmb69
Copy link
Member Author

cmb69 commented Sep 2, 2019

@dstogov, is this good to merge?

@cmb69
Copy link
Member Author

cmb69 commented Sep 16, 2019

Unless there are objections, I'll merge this PR in a few hours, so the patch makes it into PHP 7.4.0RC2.

@dstogov
Copy link
Member

dstogov commented Sep 16, 2019

Sorry, I missed this. It's OK to merge.

@cmb69
Copy link
Member Author

cmb69 commented Sep 16, 2019

Thanks @dstogov!

@cmb69
Copy link
Member Author

cmb69 commented Sep 16, 2019

Applied as 20f73d3.

@cmb69 cmb69 closed this Sep 16, 2019
@cmb69 cmb69 deleted the fix-78429 branch September 16, 2019 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants