GNU bug report logs -
#19833
grep: internal PCRE error: -27 since updating from 2.16 to 2.21
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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
Cheers,
Oliver
[pcrejit.txt (text/plain, attachment)]
This bug report was last modified 10 years and 156 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.