[php-src] PR #15930: Fix GH-15905: Assertion failure for TRACK_VARS_SERVER

From: Date: Mon, 16 Sep 2024 23:21:07 +0000
Subject: [php-src] PR #15930: Fix GH-15905: Assertion failure for TRACK_VARS_SERVER
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-28631@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/15930 Author: cmb69 When the superglobals are eagerly initialized, but "S" is not contained in variables_order, TRACK_VARS_SERVER is created as empty array with refcount > 1. Since this hash table may later be modified, a flag is set which allows such COW violations for assertions. However, when register_argc_argv is on, the so far uninitialized hash table is updated with argv, what causes the hash table to be initialized, what drops the allow-COW-violations flag. The following update with argc then triggers a refcount violation assertion. Since we consider HT_ALLOW_COW_VIOLATION a hack, we do not want to keep the flag during hash table initialization, so we initialize the hash table right away after creation for this code path.

« previous php.git-pulls (#28631) next »