Was updating an instance and ran into a bug that's also related to imap module.
Release 12.0-p10 with latest version of port for php72 as well as php73.
If imap is disabled, PHP (with/without ZTS) works fine:
PHP 7.3.9 (cli) (built: Sep 8 2019 02:59:59) ( ZTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.9, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.9, Copyright (c) 1999-2018, by Zend Technologies
If imap is enabled for either version (with/without ZTS), "php -v" results in a core dump.
GNU gdb (GDB) 8.3 [GDB v8.3 for FreeBSD]
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd12.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from php...
(gdb) run php -v
Starting program: /usr/local/bin/php php -v
Program received signal SIGSEGV, Segmentation fault.
0x0000000800af090c in strcmp () from /lib/libc.so.7
I am afraid, I can't reproduce this bug. I tested it on 11.2 and 12.0 (both amd). I started a new jail in poudriere, compiled the extension and than called "php -v" - everything fine.
Maybe its due to an combination of modules, which has happened before. Can you show an "php -m" or "pkg info | grep php" please?
FYI - had not considered that it may be a combination of modules. Simply went through the process of elimination. eg: remove all (by commenting line item in files located in /usr/local/etc/php) and then add one at a time back into the mix (running php -v to verify) and the first failure was when imap was placed back into the mix.
Other details that may be pertinent (or not):
- /etc/make.conf includes WITH_MPM=event
- Also using mod-php
- All components are built from /usr/ports and not installed via "pkg install"