Skip to content

Commit bf8c01d

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-15905: Assertion failure for TRACK_VARS_SERVER
2 parents 91c0679 + 87d59d7 commit bf8c01d

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ PHP NEWS
55
- Core:
66
. Fixed bug GH-16054 (Segmentation fault when resizing hash table iterator
77
list while adding). (nielsdos)
8+
. Fixed bug GH-15905 (Assertion failure for TRACK_VARS_SERVER). (cmb)
89

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

main/php_variables.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,7 @@ static bool php_auto_globals_create_server(zend_string *name)
897897
} else {
898898
zval_ptr_dtor_nogc(&PG(http_globals)[TRACK_VARS_SERVER]);
899899
array_init(&PG(http_globals)[TRACK_VARS_SERVER]);
900+
zend_hash_real_init_mixed(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]));
900901
}
901902

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

tests/basic/gh15905.phpt

Lines changed: 12 additions & 0 deletions
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)