git: 14c7a1918999 - 2026Q2 - textproc/php83-xsl: Remove xsltCleanupGlobals call in ext/xsl MSHUTDOWN
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 16 Jun 2026 17:08:00 UTC
The branch 2026Q2 has been updated by bdrewery:
URL: https://cgit.FreeBSD.org/ports/commit/?id=14c7a1918999da8cf970939bdb8ffae354dcae00
commit 14c7a1918999da8cf970939bdb8ffae354dcae00
Author: Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2026-04-06 12:36:58 +0000
Commit: Bryan Drewery <bdrewery@FreeBSD.org>
CommitDate: 2026-06-16 15:58:36 +0000
textproc/php83-xsl: 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.
(cherry picked from commit 8a2f42718ddd83687a1fe7646343652e7c681977)
PR: 277888
---
textproc/php83-xsl/Makefile | 1 +
textproc/php83-xsl/files/patch-php__xsl.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/textproc/php83-xsl/Makefile b/textproc/php83-xsl/Makefile
index 13cf30a12fa5..59cb10d26d57 100644
--- a/textproc/php83-xsl/Makefile
+++ b/textproc/php83-xsl/Makefile
@@ -1,3 +1,4 @@
+PORTREVISION= 1
CATEGORIES= textproc
MASTERDIR= ${.CURDIR}/../../lang/php83
diff --git a/textproc/php83-xsl/files/patch-php__xsl.c b/textproc/php83-xsl/files/patch-php__xsl.c
new file mode 100644
index 000000000000..35c8952352de
--- /dev/null
+++ b/textproc/php83-xsl/files/patch-php__xsl.c
@@ -0,0 +1,10 @@
+--- php_xsl.c.orig 2026-04-04 20:11:31 UTC
++++ php_xsl.c
+@@ -212,7 +212,6 @@ PHP_MSHUTDOWN_FUNCTION(xsl)
+ xsltUnregisterExtModuleFunction ((const xmlChar *) "function",
+ (const xmlChar *) "http://php.net/xsl");
+ xsltSetGenericErrorFunc(NULL, NULL);
+- xsltCleanupGlobals();
+
+ return SUCCESS;
+ }