Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-08-03 Thread Carlo Arenas
On Wed, Jul 31, 2019 at 7:57 AM Ævar Arnfjörð Bjarmason wrote: > What hasn't been supported is all of that saying "yes, I support JIT" > and the feature then fail whaling. I had not encountered that before. > > So far that seems like because Carlo just built a completely broken PCRE > v2 package,

Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-31 Thread Junio C Hamano
Johannes Schindelin writes: > For the record, I read > https://public-inbox.org/git/xmqqh8flkgs2@gitster-ct.c.googlers.com/ > as encouraging a slightly more powerful argument in favor. Junio seemed > to hope that PCRE2's own `pcre2grep` would behave that way, and that > would give us plenty r

Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-31 Thread Ævar Arnfjörð Bjarmason
On Wed, Jul 31 2019, Johannes Schindelin wrote: > Hi, > > On Mon, 29 Jul 2019, Carlo Marcelo Arenas Belón wrote: > >> $ git grep 'foo bar' >> fatal: Couldn't JIT the PCRE2 pattern 'foo bar', got '-48' > > My immediate reaction to this error message was: That's not helpful. > What is `-48` su

Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-31 Thread Johannes Schindelin
Hi Carlo, On Mon, 29 Jul 2019, Carlo Arenas wrote: > On Mon, Jul 29, 2019 at 10:47 AM Junio C Hamano wrote: > > René Scharfe writes: > > >> +pcre.jit:: > > >> +If set to false, disable JIT when using PCRE. Defaults to > > >> +true. > > >> +if set to -1 will try first to use JIT and

Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-31 Thread Johannes Schindelin
Hi, On Mon, 29 Jul 2019, Carlo Marcelo Arenas Belón wrote: > $ git grep 'foo bar' > fatal: Couldn't JIT the PCRE2 pattern 'foo bar', got '-48' My immediate reaction to this error message was: That's not helpful. What is `-48` supposed to mean? Why do we even think it sensible to throw such a

Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-30 Thread René Scharfe
Am 30.07.19 um 02:49 schrieb Carlo Arenas: > On Mon, Jul 29, 2019 at 10:47 AM Junio C Hamano wrote: >> René Scharfe writes: +pcre.jit:: +If set to false, disable JIT when using PCRE. Defaults to +true. +if set to -1 will try first to use JIT and fallback to the >>

Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-29 Thread Carlo Arenas
On Mon, Jul 29, 2019 at 10:47 AM Junio C Hamano wrote: > René Scharfe writes: > >> +pcre.jit:: > >> +If set to false, disable JIT when using PCRE. Defaults to > >> +true. > >> +if set to -1 will try first to use JIT and fallback to the > >> +interpreter instead of returning an er

Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-29 Thread Junio C Hamano
René Scharfe writes: >> +pcre.jit:: >> +If set to false, disable JIT when using PCRE. Defaults to >> +true. >> +if set to -1 will try first to use JIT and fallback to the >> +interpreter instead of returning an error. > > Why not implement only -1, without adding this config sett

Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-29 Thread René Scharfe
Am 29.07.19 um 12:59 schrieb Carlo Marcelo Arenas Belón: > PCRE1 allowed for a compile time flag to disable JIT, but PCRE2 never > had one, forcing the use of JIT if -P was requested. > > After ed0479ce3d (Merge branch 'ab/no-kwset' into next, 2019-07-15) > the PCRE2 engine will be used more broadl

Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-29 Thread Carlo Arenas
Known Issues: * PCRE1 is broken, but fixing it would make more sense on top of the topic[1] (not in pu) * it depends on the current ab/pcre-jit-fixes that is missing 1 critical commit in pu * no tests yet; would need to extend it on top of the debug from Beat and test-tool changes from Ævar, neithe

[RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE

2019-07-29 Thread Carlo Marcelo Arenas Belón
PCRE1 allowed for a compile time flag to disable JIT, but PCRE2 never had one, forcing the use of JIT if -P was requested. After ed0479ce3d (Merge branch 'ab/no-kwset' into next, 2019-07-15) the PCRE2 engine will be used more broadly and therefore adding this knob will allow users a escape from si