[php-src] PR #18117: Fix GH-18112: NULL access with preloading and INI option
| From: | nielsdos | Date: | Wed, 19 Mar 2025 22:42:48 +0000 |
| Subject: | [php-src] PR #18117: Fix GH-18112: NULL access with preloading and INI option | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-31136@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/18117
Author: nielsdos
Preloading shutdown calls request shutdown which will deactivate the virtual cwd state. However,
further startup code still assumes the state that was set by virtual_cwd_startup(). So we need to
reactivate it manually.
Creating a test was a bit difficult because the INI setting I wanted to test this with is overridden
by the test runner apparently. To reproduce the issue, create an empty file test.php and execute
this in a ZTS build:
php -d opcache.preload=./ext/opcache/tests/preload_class_alias_2.inc -d "error_log="
-d "allow_url_include=1" test.php