[Bug 293276] textproc/php84-xsl: SIGSEGV on PHP shutdown (zm_shutdown_xsl -> xsltCleanupGlobals -> xmlHashFree) when running Nextcloud occ

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 18 Feb 2026 22:28:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293276

            Bug ID: 293276
           Summary: textproc/php84-xsl: SIGSEGV on PHP shutdown
                    (zm_shutdown_xsl -> xsltCleanupGlobals -> xmlHashFree)
                    when running Nextcloud occ
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: bofh@freebsd.org
          Reporter: paul.le.gauret@gmail.com
          Assignee: bofh@freebsd.org
             Flags: maintainer-feedback?(bofh@freebsd.org)

Created attachment 268176
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=268176&action=edit
Backtrace

Reproducer
su -m www -c 'php /usr/local/www/nextcloud/occ -V; echo rc=$?'

Observed:
- stdout: Nextcloud 32.0.6
- then: Segmentation fault
- exit code: 139

Same behavior for other read-only occ commands (status, check, app:list):
command output is correct, then segfault on exit.

Isolation
- If I run with a copied PHP scan dir and remove only ext-30-xsl.ini, crash
disappears:
mkdir -p /tmp/php-scan-no-xsl
cp /usr/local/etc/php/ext-*.ini /tmp/php-scan-no-xsl/
rm -f /tmp/php-scan-no-xsl/ext-30-xsl.ini
su -m www -c 'env PHP_INI_SCAN_DIR=/tmp/php-scan-no-xsl php
/usr/local/www/nextcloud/occ -V; echo rc=$?'

Result: rc=0

Backtrace (core)
frame #0  libc.so.7
frame #1  libxml2.so.16`xmlHashFree
frame #2  libxslt.so.1`xsltCleanupGlobals
frame #3  xsl.so`zm_shutdown_xsl
frame #4  php
frame #5  php`zend_hash_graceful_reverse_destroy
frame #7  php`php_module_shutdown

So this appears to be an XSL/libxslt/libxml2 shutdown crash path triggered by
PHP module shutdown.

Additional checks
- ldd /usr/local/lib/php/20240924/xsl.so resolves normally to libxslt.so.1,
libxml2.so.16, libexslt.so.0.
- Package versions are consistent (php84-* all at 8.4.18).

Could you advise whether this is already known in ports, and if a patch/update
is available or needs forwarding upstream to php-src/ext-xsl?

-- 
You are receiving this mail because:
You are the assignee for the bug.