Skip to content

Commit 05fce50

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix GH-15905: Assertion failure for TRACK_VARS_SERVER
2 parents 6f7ec6a + bf8c01d commit 05fce50

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

Diff for: NEWS

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ PHP NEWS
66
. Fixed bug GH-16040 (Use-after-free of object released in hook). (ilutov)
77
. Fixed bug GH-16054 (Segmentation fault when resizing hash table iterator
88
list while adding). (nielsdos)
9+
. Fixed bug GH-15905 (Assertion failure for TRACK_VARS_SERVER). (cmb)
910

1011
- DOM:
1112
. Fixed bug GH-16039 (Segmentation fault (access null pointer) in

Diff for: main/php_variables.c

+1
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,7 @@ static bool php_auto_globals_create_server(zend_string *name)
893893
} else {
894894
zval_ptr_dtor_nogc(&PG(http_globals)[TRACK_VARS_SERVER]);
895895
array_init(&PG(http_globals)[TRACK_VARS_SERVER]);
896+
zend_hash_real_init_mixed(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]));
896897
}
897898

898899
check_http_proxy(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]));

Diff for: tests/basic/gh15905.phpt

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
GH-15905 (Assertion failure for TRACK_VARS_SERVER)
3+
--INI--
4+
variables_order=E
5+
auto_globals_jit=0
6+
register_argc_argv=1
7+
--FILE--
8+
<?php
9+
echo "okay\n";
10+
?>
11+
--EXPECT--
12+
okay

0 commit comments

Comments
 (0)