Skip to content

Commit 38d6d85

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: Fix GH-18112: NULL access with preloading and INI option
2 parents 8598e55 + 6649815 commit 38d6d85

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/opcache/ZendAccelerator.c

+5
Original file line numberDiff line numberDiff line change
@@ -4796,6 +4796,11 @@ static zend_result accel_finish_startup_preload(bool in_child)
47964796
EG(class_table) = NULL;
47974797
EG(function_table) = NULL;
47984798
PG(report_memleaks) = orig_report_memleaks;
4799+
#ifdef ZTS
4800+
/* Reset the virtual CWD state back to the original state created by virtual_cwd_startup().
4801+
* This is necessary because the normal startup code assumes the CWD state is active. */
4802+
virtual_cwd_activate();
4803+
#endif
47994804
} else {
48004805
zend_shared_alloc_unlock();
48014806
ret = FAILURE;

0 commit comments

Comments
 (0)