emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#19833: closed (grep: internal PCRE error: -27 sinc


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19833: closed (grep: internal PCRE error: -27 since updating from 2.16 to 2.21)
Date: Wed, 11 Feb 2015 07:50:02 +0000

Your message dated Tue, 10 Feb 2015 23:49:17 -0800
with message-id <address@hidden>
and subject line Re: bug#19833: grep: internal PCRE error: -27 since updating 
from 2.16 to 2.21
has caused the debbugs.gnu.org bug report #19833,
regarding grep: internal PCRE error: -27 since updating from 2.16 to 2.21
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
19833: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19833
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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


Cheers,
        Oliver

Attachment: pcrejit.txt
Description: Text document


--- End Message ---
--- Begin Message --- Subject: Re: bug#19833: grep: internal PCRE error: -27 since updating from 2.16 to 2.21 Date: Tue, 10 Feb 2015 23:49:17 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 Thanks for the bug report and test case. I installed the attached patch, which fixed the bug for me, and which adds a similar test case to the test database.

Attachment: 0001-Grow-the-JIT-stack-if-it-becomes-exhausted.patch
Description: Text Data


--- End Message ---

reply via email to

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