Re: [pcre-dev] PCRE_STUDY_JIT_COMPILE option bug?

Top Page
Delete this message
Author: ph10
Date:  
To: Ervin Hegedüs
CC: Zoltán Herczeg, pcre-dev@exim.org
Subject: Re: [pcre-dev] PCRE_STUDY_JIT_COMPILE option bug?
On Sat, 26 Jan 2019, Ervin Hegedüs via Pcre-dev wrote:

> I don't know inside of PCRE, and the used API (I just fond a
> "bug" on of my project), so I think I have to see, what does it
> mean the ovector. The application can use longest pattern, than
> this... so I guess the 40 isn't the solution for "all cases".
>
> Is there any best practice to calculate the size? What other
> consequence is there, when I increase that size? Eg. more memory
> using, slower runtime...?


In PCRE2 there *is* a way of dealing with this. Instead of providing a
separate ovector, the application calls a function to create a "match
block" that contains the ovector, and one way of specifying how big the
ovector should be is "as big as necessary for this pattern".

More memory, yes, but probably insignificant effect on runtime.

> The "for some reason" is a little bit disquieting :), you mean
> that this result is not deterministic?


I suspect it's a bug/oversight in the old PCRE1 code, but as I said in
my previous message, I'm not inclined to investigate further.

Philip

--
Philip Hazel