PHP: fixed crash when calling module functions in OPcache preload.

In PHP, custom fastcgi_finish_request() and overloaded chdir() functions can be
invoked by an OPcache preloading script (it runs when php_module_startup() is
called in the app process setup handler).  In this case, there was no runtime
context set so trying to access it caused a segmentation fault.

This closes #602 issue on GitHub.
This commit is contained in:
Valentin Bartenev
2021-11-25 19:58:54 +03:00
parent 7ed38c9efe
commit d4b13c7cd5
2 changed files with 12 additions and 2 deletions

View File

@@ -45,6 +45,13 @@ appeared in 1.26.0.
</para>
</change>
<change type="bugfix">
<para>
a segmentation fault occurred in the PHP module if chdir() or
fastcgi_finish_request() was called in the OPcache preloading script.
</para>
</change>
</changes>