Bug #77260 [Opn]: preg_match_all(): JIT compilation failed: no more memory
| From: | nikic@php.net | Date: | Thu, 24 Jan 2019 10:21:26 +0000 |
| Subject: | Bug #77260 [Opn]: preg_match_all(): JIT compilation failed: no more memory | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219162@lists.php.net to get a copy of this message | ||
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:
Is anyone who is *not* on macOS experiencing this issue?
Previous Comments:
------------------------------------------------------------------------
[2019-01-24 09:35:30] d dot kreuer at danielkreuer dot com
Disabling the JIT compilation of PCRE is a workaround for this error. Tweeted by Marcus Battle: https://twitter.com/themarcusbattle/status/1072929621790855174
------------------------------------------------------------------------
[2019-01-14 14:26:03] sbarex at gmail dot com
Not solved in php 7.3.1.
With this bug php is unusable. Even phpinfo cause a crash.
------------------------------------------------------------------------
[2018-12-10 15:17:53] ettore at themecraft dot studio
Just tried with the latest commit on master (ad06f1aa2e). The error persists. If you need more
details on my system configuration, just ask.
I did not experience this issue on production servers running Debian and PHP 7.3 from sury.
Note and off-topic: I've run into some compilation troubles while building from git with XSL
enabled. It fails to compile on my system after hundreds of warnings. I just disabled it since I did
not even know why I left it enabled in the first place. I'm using libxml 2.9.7 from homebrew.
------------------------------------------------------------------------
[2018-12-08 13:16:07] cmb@php.net
This *might* be another manifestation of bug #77193. Please try
again with the fix[1] applied, or with a recent Git snapshot.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=ef1269d5c158afaf052e3d79591462e0f5372b1a>
------------------------------------------------------------------------
[2018-12-08 09:24:33] sbarex at gmail dot com
I have same problem with php 7.3 installed via homebrew on mojave (both with bottle package or
compiled from source).
If i use xdebug extension no page can be viewed (php-fpm kill the child process).
If use php from command line without xdebug php works but kill when I use pcre functions.
Also if I use psysh (REPL cli) php crash on every command.
In all cases the code "crashed on child side of fork pre-exec" on php_pcre2_jit_compile or
php_pcre2_jit_match.
This is a crash report:
Process: php [24544]
Path: /usr/local/Cellar/php/7.3.0/bin/php
Identifier: php
Version: 0
Code Type: X86-64 (Native)
Parent Process: ??? [24543]
Responsible: php [24544]
User ID: 501
Date/Time: 2018-12-07 21:58:04.395 +0100
OS Version: Mac OS X 10.14.2 (18C54)
Report Version: 12
Bridge OS Version: 3.2 (16P2542)
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000106928478
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [24544]
VM Regions Near 0x106928478:
MALLOC_LARGE 0000000106828000-0000000106918000 [ 960K] rw-/rwx SM=COW
-->
VM_ALLOCATE 0000000106a00000-0000000107000000 [ 6144K] rw-/rwx SM=COW
Application Specific Information:
crashed on child side of fork pre-exec
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 php 0x0000000102d4a4fe jit_compile + 42782
1 php 0x0000000102d3fd82 php_pcre2_jit_compile + 78
2 php 0x0000000102d8371b pcre_get_compiled_regex_cache + 1808
3 php 0x0000000102d8725b php_do_pcre_match + 203
4 php 0x00000001030f4116 ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER + 81
5 php 0x00000001030abd32 execute_ex + 98
6 php 0x00000001030abeae zend_execute + 318
7 php 0x0000000103070cfa zend_execute_scripts + 277
8 php 0x000000010301c58f php_execute_script + 639
9 php 0x000000010311c78b do_cli + 3857
10 php 0x000000010311b70c main + 1108
11 libdyld.dylib 0x00007fff7a21ced9 start + 1
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=77260
--
Edit this bug report at https://bugs.php.net/bug.php?id=77260&edit=1