From 003e9495a48357cb704c4e3878c0c969eb96b108 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 22 Jun 2019 20:54:06 +0300 Subject: [PATCH] disable pcre_jit on x32 (segfaults) this shouldn't be needed, as - pcre2.spec the jit is disabled: https://github.com/pld-linux/pcre2/blob/auto/th/pcre2-10.33-1/pcre2.spec#L256 - and in ext/pcre/config0.m4 there's feature check: https://github.com/php/php-src/blob/php-7.4.0alpha1/ext/pcre/config0.m4#L54 however reality shows that doesn't work as the segfault building phar.phar backtrace includes pcre_jit symbols --- php.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/php.spec b/php.spec index 733a027..cc7df84 100644 --- a/php.spec +++ b/php.spec @@ -59,6 +59,7 @@ %bcond_without opcache # without Enable Zend OPcache extension support %bcond_without openssl # without OpenSSL support and OpenSSL extension (module) %bcond_without pcntl # without pcntl extension module +%bcond_without pcre_jit # PCRE JIT %bcond_without pdo # without PDO extension module %bcond_without pdo_dblib # without PDO dblib extension module %bcond_without pdo_firebird # without PDO Firebird extension module @@ -93,6 +94,11 @@ %define apxs1 /usr/sbin/apxs1 %define apxs2 /usr/sbin/apxs +# segfaults on x32 +%ifarch x32 +%undefine with_pcre_jit +%endif + # disable all sapis %if %{with gcov} %undefine with_apache2 @@ -2302,7 +2308,8 @@ for sapi in $sapis; do %{?with_openssl:--with-openssl=shared} \ %{?with_kerberos5:--with-kerberos} \ --with-tcadb=/usr \ - %{?with_pcre:--with-external-pcre} \ + --with-external-pcre \ + %{__with_without pcre_jit pcre-jit} \ %{__enable_disable filter filter shared} \ %{__with_without pgsql pgsql shared} \ %{__enable_disable phar phar shared} \ -- 2.44.0