[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19833: grep: internal PCRE error: -27 since updating from 2.16 to 2.

From: Oliver Freyermuth
Subject: bug#19833: grep: internal PCRE error: -27 since updating from 2.16 to 2.21
Date: Tue, 10 Feb 2015 22:59:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Dear grep'pers,

since I updated from 2.16 to 2.21, several of my "check list of files
for bad filenames"-style grep expressions fail like this:
grep: internal PCRE error: -27
(one of the failing examples follows at the end of the mail, example
filename-list attached)

Researching this, I found that -27 is PCRE_ERROR_JIT_STACKLIMIT.
Apparently I exceed the 512 K JIT-stack-limit which is hardcoded in grep
with several of my regexps.

As using the JIT can not be turned off at runtime, nor can the stacksize
be controlled without patching + recompiling, this breaks previously
working expressions for me, so I consider this a new regression,
introduced with b06f7a29a58bbdd5866afc1e92dba3fdc9e2ed59 .

I tested that increasing the stack-size to 1 M fixes the problem for me.
A better fix could maybe consist of a better error message, allowing
stack-size control at runtime and / or making JIT optional at runtime.

Reproducer, using the attached file (which is generated by a find
command, of course - only 637 files with absolute paths in plain ASCII):
$ LANG=C grep -P -n '^([/](?!/)|[^/])*~/.*' pcrejit.txt
grep: internal PCRE error: -27


Attachment: pcrejit.txt
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]