[php-src] PR #21160: Zend/COW invariant violation around $_FILES in debug-assertion builds

From: Date: Sat, 07 Feb 2026 18:42:34 +0000
Subject: [php-src] PR #21160: Zend/COW invariant violation around $_FILES in debug-assertion builds
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-34847@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/21160 Author: geeknik rfc1867_post_handler() registers file metadata into &PG(http_globals)[TRACK_VARS_FILES] (i.e. $_FILES). See main/rfc1867.c:1153. $_FILES is created as an auto-global and inserted into EG(symbol_table) in php_auto_globals_create_files() (main/php_variables.c). That means the underlying HashTable ends up with refcount > 1. When php_register_variable_*() tries to write into that shared HashTable, Zend asserts in Zend/zend_hash.c:912 unless the table is marked HT_ALLOW_COW_VIOLATION (same mechanism already used for $_SERVER).

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