From f07eb59e572ebcc2dae66484953df09108a696ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 1 Nov 2026 14:30:42 +0100 Subject: [PATCH] Fix free of uninitialized date last_errors after a failed request startup In ZTS builds, a thread's date globals are malloc'd and last_errors is only set by RINIT, while the post-deactivate hook frees it. When the first request of a thread fails before modules are activated, php_request_shutdown() still runs the post-deactivate hooks and frees a garbage pointer. --- ext/date/php_date.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index ab03c7b63557..d97dc0825937 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -388,6 +388,7 @@ static PHP_GINIT_FUNCTION(date) date_globals->default_timezone = NULL; date_globals->timezone = NULL; date_globals->tzcache = NULL; + date_globals->last_errors = NULL; } /* }}} */