Skip to content

Commit

Permalink
Merge branch 'PHP-8.3' into PHP-8.4
Browse files Browse the repository at this point in the history
* PHP-8.3:
  Fix phpGH-15905: Assertion failure for TRACK_VARS_SERVER
  • Loading branch information
cmb69 committed Sep 26, 2024
2 parents 6f7ec6a + bf8c01d commit 05fce50
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ PHP NEWS
. Fixed bug GH-16040 (Use-after-free of object released in hook). (ilutov)
. Fixed bug GH-16054 (Segmentation fault when resizing hash table iterator
list while adding). (nielsdos)
. Fixed bug GH-15905 (Assertion failure for TRACK_VARS_SERVER). (cmb)

- DOM:
. Fixed bug GH-16039 (Segmentation fault (access null pointer) in
Expand Down
1 change: 1 addition & 0 deletions main/php_variables.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ static bool php_auto_globals_create_server(zend_string *name)
} else {
zval_ptr_dtor_nogc(&PG(http_globals)[TRACK_VARS_SERVER]);
array_init(&PG(http_globals)[TRACK_VARS_SERVER]);
zend_hash_real_init_mixed(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]));
}

check_http_proxy(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]));
Expand Down
12 changes: 12 additions & 0 deletions tests/basic/gh15905.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--TEST--
GH-15905 (Assertion failure for TRACK_VARS_SERVER)
--INI--
variables_order=E
auto_globals_jit=0
register_argc_argv=1
--FILE--
<?php
echo "okay\n";
?>
--EXPECT--
okay

0 comments on commit 05fce50

Please sign in to comment.