Re: [pcre-dev] PCRE_STUDY_JIT_COMPILE option bug?

Top Page

Reply to this message
Author: Zoltán Herczeg
To: Ervin Hegedüs,
Subject: Re: [pcre-dev] PCRE_STUDY_JIT_COMPILE option bug?
Hi Ervin,

The result value is misinterpreted by showresult (). PCRE_ERROR_NOMATCH is -1, not 0. The 0 value represents that a match is found, but the ovector is too small to store all capturing bracket positions. So increasing #define OVCOUNT from 30 to 40 "solves" the JIT case. For some reason the interpreter returns the highest capturing bracket below the end of ovector, which is kind of misleading, since there are valid capturing positions outside of that region. Philip, is this intended?


-------- Eredeti levél --------
Feladó: Ervin Hegedüs via Pcre-dev < pcre-dev@??? (Link -> >
Dátum: 2019 január 26 10:38:35
Tárgy: [pcre-dev] PCRE_STUDY_JIT_COMPILE option bug?
Címzett: pcre-dev@??? (Link ->
He all,
I run into a problem, it would be good to get some help.
Here is the test code:
The problem is that if I check the pattern in subject, and
called pcre_study() before the pcre_exec() with option
PCRE_STUDY_JIT_COMPILE, then it doesn't matches. With option=0 it
worked as well.
Could anybody helps to explain, what's wrong? Eg. the pattern? Or
my code?
Version: 8.39 14-June-2016
gcc version 8.2.0 (Debian 8.2.0-13)
## List details at