Re: [pcre-dev] PCRE_STUDY_JIT_COMPILE option bug?

Top Page
Delete this message
Author: Zoltán Herczeg
Date:  
To: Ervin Hegedüs, pcre-dev@exim.org
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?

Regards,
Zoltan

-------- Eredeti levél --------
Feladó: Ervin Hegedüs via Pcre-dev < pcre-dev@??? (Link -> mailto:pcre-dev@exim.org) >
Dátum: 2019 január 26 10:38:35
Tárgy: [pcre-dev] PCRE_STUDY_JIT_COMPILE option bug?
Címzett: pcre-dev@??? (Link -> mailto:pcre-dev@exim.org)
 
He all,
I run into a problem, it would be good to get some help.
Here is the test code:
https://www.dropbox.com/s/qimi2aekk505r0r/pcre_test.c
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)
Thanks,
a.
--
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev