From 7fec72c74af072f8a8170b8929a03ee335a0feb4 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 2 Apr 2026 19:08:31 +0100 Subject: [PATCH] Fix GH-21600: Remove xsltCleanupGlobals call in ext/xsl MSHUTDOWN. The call to xsltCleanupGlobals() during module shutdown can cause a segfault in xmlHashFree() when freeing libxslt internal hash tables. This is the same class of shutdown cleanup issue that led to xmlCleanupParser() being removed from ext/libxml. The process is about to exit and the OS will reclaim all memory, making the explicit cleanup both unnecessary and harmful. --- ext/xsl/php_xsl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c index dec7eb501eb2f..1484d3891aa3b 100644 --- a/ext/xsl/php_xsl.c +++ b/ext/xsl/php_xsl.c @@ -323,7 +323,6 @@ PHP_MSHUTDOWN_FUNCTION(xsl) xsltUnregisterExtModuleFunction ((const xmlChar *) "function", (const xmlChar *) "http://php.net/xsl"); xsltSetGenericErrorFunc(NULL, NULL); - xsltCleanupGlobals(); return SUCCESS; }