Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Apr 2026 13:37:08 +0000
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 8a2f42718ddd - main - textproc/php83-xsl: Remove xsltCleanupGlobals call in ext/xsl MSHUTDOWN
Message-ID:  <69d3b704.38083.72fd0591@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8a2f42718ddd83687a1fe7646343652e7c681977

commit 8a2f42718ddd83687a1fe7646343652e7c681977
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2026-04-06 12:36:58 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2026-04-06 13:36:38 +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.
---
 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;
+ }


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69d3b704.38083.72fd0591>