Skip to content

Commit 96e93e9

Browse files
committed
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. close GH-21610
1 parent c5fb035 commit 96e93e9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ PHP NEWS
3131
. Fixed bug GH-21468 (Segfault in file_get_contents w/ a https URL
3232
and a proxy set). (ndossche)
3333

34+
- XSL:
35+
. Fixed bug GH-21600 (Segfault on module shutdown). (David Carlier)
36+
3437
09 Apr 2026, PHP 8.4.20
3538

3639
- Bz2:

ext/xsl/php_xsl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ PHP_MSHUTDOWN_FUNCTION(xsl)
323323
xsltUnregisterExtModuleFunction ((const xmlChar *) "function",
324324
(const xmlChar *) "http://php.net/xsl");
325325
xsltSetGenericErrorFunc(NULL, NULL);
326-
xsltCleanupGlobals();
327326

328327
return SUCCESS;
329328
}

0 commit comments

Comments
 (0)