Edit report at https://bugs.php.net/bug.php?id=77260&edit=1
ID: 77260
Updated by: nikic@php.net
Reported by: ettore at themecraft dot studio
Summary: preg_match_all(): JIT compilation failed: no more
memory
Status: Open
Type: Bug
Package: PCRE related
Operating System: macOS 10.13.6
PHP Version: 7.3.0
Block user comment: N
Private report: N
New Comment:
@cmb: Wouldn't that generate a JIT_STACKLIMIT rather than NOMEMORY error?
Previous Comments:
------------------------------------------------------------------------
[2018-12-07 14:03:32] cmb@php.net
> Warning: preg_match_all(): JIT compilation failed: no more
> memory
This warning is trigged, because pcre2_jit_compile() returns
PCRE2_ERROR_NOMEMORY, which hints at a too small JIT stack.
------------------------------------------------------------------------
[2018-12-07 13:42:49] ettore at themecraft dot studio
Description:
------------
I'm experiencing an intermittent issue with WordPress 5.0 running on PHP 7.3.0:
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 4885
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 4781
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 4885
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/l10n.php on line 1202
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 4885
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/l10n.php on line 1235
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/class-requests.php on line 563
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/Requests/IRI.php on line 329
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/Requests/IRI.php on line 764
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_replace_callback(): JIT compilation failed: no more
memory in wp-includes/Requests/IRI.php on line 422
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/Requests/IRI.php on line 425
[07-Dec-2018 13:37:11 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/Requests/IDNAEncoder.php on line 115
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/class-requests.php on line 652
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/class-requests.php on line 654
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/class-requests.php on line 667
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/class-requests.php on line 752
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 4885
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace_callback(): JIT compilation failed: no more
memory in wp-includes/formatting.php on line 4382
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace_callback(): JIT compilation failed: no more
memory in wp-includes/kses.php on line 724
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/option.php on line 900
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/general-template.php on line 705
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_match_all(): JIT compilation failed: no more memory in
wp-includes/formatting.php on line 229
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_split(): JIT compilation failed: no more memory in
wp-includes/formatting.php on line 235
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/formatting.php on line 289
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/formatting.php on line 295
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-admin/admin-header.php on line 75
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/option.php on line 1021
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-admin/admin-header.php on line 163
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-admin/menu-header.php on line 14
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-admin/menu-header.php on line 15
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-admin/menu-header.php on line 16
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-admin/menu-header.php on line 17
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-admin/menu-header.php on line 108
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/formatting.php on line 4674
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/formatting.php on line 4549
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 111
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 112
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 113
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 114
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 115
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 116
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/functions.php on line 122
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_split(): JIT compilation failed: no more memory in
wp-admin/includes/class-core-upgrader.php on line 239
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_replace(): JIT compilation failed: no more memory in
wp-admin/update-core.php on line 220
[07-Dec-2018 13:37:12 UTC] PHP Warning: preg_match(): JIT compilation failed: no more memory in
wp-includes/formatting.php on line 4768
I am not able to reproduce the issue by singling out any specific preg_* function and parameters.
The ony way I can reproduce the issue is with a clean install of WordPress 5.0.
Below there's php -i:
PHP Version => 7.3.0
System => Darwin iMac.local 17.7.0 Darwin Kernel Version 17.7.0: Wed Oct 10 23:06:14 PDT 2018;
root:xnu-4570.71.13~1/RELEASE_X86_64 x86_64
Build Date => Dec 7 2018 12:22:53
Configure Command => './configure' '--prefix=/Users/ettore/.php/7.3.0'
'--with-config-file-path=/Users/ettore/.php' '--enable-cli'
'--with-apxs2' '--disable-cgi' '--without-pear'
'--enable-pcntl' '--enable-bcmath' '--enable-mbstring'
'--enable-intl' '--enable-soap' '--enable-zip'
'--with-libzip' '--with-zlib-dir=/usr' '--with-pdo-mysql'
'--with-mysqli' '--with-curl' '--with-openssl=/usr/local/opt/openssl'
'--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local'
'--with-libedit' '--with-xsl'
'--with-libxml-dir=/usr/local/opt/libxml2' '--with-xmlrpc'
'--with-gmp'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /Users/ettore/.php
Loaded Configuration File => /Users/ettore/.php/php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
PHP API => 20180731
PHP Extension => 20180731
Zend Extension => 320180731
Zend Extension Build => API320180731,NTS
PHP Extension Build => API20180731,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled
Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => zlib.*, convert.iconv.*, string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, consumed, dechunk
This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
php.ini:
[PHP]
short_open_tag = Off
max_execution_time = 600
memory_limit = 512M
post_max_size = 256M
upload_max_filesize = 128M
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = On
request_order = "GP"
zend.assertions = 1
assert.exception = On
pcre.jit = On
[CLI Server]
cli_server.color = On
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = On
[Xdebug]
;zend_extension = xdebug.so
xdebug.remote_enable = 1
xdebug.profiler_output_dir=/Users/ettore/Workspace/xdebug_profiling
xdebug.profiler_output_name=%u.%R
xdebug.profiler_enable_trigger=1
;xdebug.remote_log = /Users/ettore/Workspace/xdebug/xdebug.log
xdebug.var_display_max_data = 2048
NOTICE that the issue appears with both XDebug 2.7.0beta1 disabled and enabled.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77260&edit=1