Re: [PATCH 2/3] grep: stop "using" a custom JIT stack with PCRE v2
- From
Carlo Arenas <carenas@gmail.com>
- Date
- Jul 25, 2019, 05:11 UTC
- Message-ID
- <CAPUEspjj+fG8QDmf=bZXktfpLgkgiu34HTjKLhm-cmEE04FE-A@mail.gmail.com>
- In-Reply-To
- <87imrr6vv2.fsf@evledraar.gmail.com>
On Wed, Jul 24, 2019 at 1:20 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 8 quoted lines
> On Wed, Jul 24 2019, Junio C Hamano wrote: > > > > Does everybody use pcre2 with JIT with Git these days, or only those > > who want to live near the bleeding edge? > > My informal survey of various package recipies suggests that all the big > *nix distros are using it by default now, so we have a lot of users in > the wild, including in the just-released Debian stable.
FWIW neither OpenBSD or NetBSD enable JIT, and the git that comes with Xcode (AKA Apple Git) doesn't either, while still using PCRE1
Show 7 quoted lines
> > In any case, if we were not "using" the custom stack anyway for v2, > > this change does not hurt anybody, possibly other than those who > > will learn about pcre2 support by reading this message and experiments > > with larger patterns. And it should be simple to wire it back if it > > becomes necessary later. > > *nod*
the following pattern fails unless 1MB stack is available:
'^([/](?!/)|[^/])*~/.*'
the workaround implemented in GNU grep (that uses PCRE1) and the related discussion[1] are a very interesting read
Carlo
[1] https://www.mail-archive.com/bug-grep@gnu.org/msg05763.html