[php-src] PR #25975: ext/standard: Detach shutdown callbacks before cleanup

From: Date: Mon, 30 Nov 2026 21:00:26 +0000
Subject: [php-src] PR #25975: ext/standard: Detach shutdown callbacks before cleanup
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-41286@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25975 Author: iliaal A destructor that calls register_shutdown_function() while php_free_shutdown_functions() destroys the shutdown table can resize the bucket array that zend_hash_destroy() is still walking, a use-after-free. Detach the table from BG(user_shutdown_function_names) before destroying it, and drain any table a destructor creates meanwhile so late callback arguments are still released. Targets master because the trigger needs a reentrant userland destructor. Fixes GH-25920

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