Fix #78429: opcache_compile_file(__FILE__); segfaults#4570
Fix #78429: opcache_compile_file(__FILE__); segfaults#4570cmb69 wants to merge 1 commit intophp:PHP-7.4from
Conversation
We have to ensure that OPcache has been properly started up when `opcache_compile_file()` is called.
| } | ||
|
|
||
| if (!accel_startup_ok) { | ||
| zend_error(E_NOTICE, ACCELERATOR_PRODUCT_NAME " has not been properly started, can't compile file"); |
There was a problem hiding this comment.
Unrelated: Is there even a need for the ACCELERATOR_PRODUCT_NAME to still be a thing as its development is managed by us?
There was a problem hiding this comment.
Frankly, I don't know, but in doubt we should stick with it.
There was a problem hiding this comment.
@dstogov Any input here? Is this something Zend uses internally still?
There was a problem hiding this comment.
could this error message contain a hint where to look for the problem cause, e.g. ini-setting opcache.enable_cli?
There was a problem hiding this comment.
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).
|
@dstogov, is this good to merge? |
|
Unless there are objections, I'll merge this PR in a few hours, so the patch makes it into PHP 7.4.0RC2. |
|
Sorry, I missed this. It's OK to merge. |
|
Thanks @dstogov! |
|
Applied as 20f73d3. |
We have to ensure that OPcache has been properly started up when
opcache_compile_file()is called.