Skip to content

Commit 6649815

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix GH-18112: NULL access with preloading and INI option
2 parents 9488684 + e9c0296 commit 6649815

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ PHP NEWS
6363
. Fixed bug GH-18050 (IN_ARRAY optimization in DFA pass is broken). (ilutov)
6464
. Fixed bug GH-18113 (stack-buffer-overflow ext/opcache/jit/ir/ir_sccp.c).
6565
(nielsdos)
66+
. Fixed bug GH-18112 (NULL access with preloading and INI option). (nielsdos)
6667

6768
- Standard:
6869
. Fix memory leaks in array_any() / array_all(). (nielsdos)

ext/opcache/ZendAccelerator.c

+5
Original file line numberDiff line numberDiff line change
@@ -4733,6 +4733,11 @@ static zend_result accel_finish_startup_preload(bool in_child)
47334733
EG(class_table) = NULL;
47344734
EG(function_table) = NULL;
47354735
PG(report_memleaks) = orig_report_memleaks;
4736+
#ifdef ZTS
4737+
/* Reset the virtual CWD state back to the original state created by virtual_cwd_startup().
4738+
* This is necessary because the normal startup code assumes the CWD state is active. */
4739+
virtual_cwd_activate();
4740+
#endif
47364741
} else {
47374742
zend_shared_alloc_unlock();
47384743
ret = FAILURE;

0 commit comments

Comments
 (0)