Autor: Graycode Datum: To: Pcre-dev Betreff: Re: [pcre-dev] Internal errors and crashes with quantified
subroutines
I get similar error results with prior versions as well as 8.20.
My thresholds are different than yours, perhaps due to environment
or something customized in my config.h
In case it helps Phillip or someone else, below shows the compiled
expression sizes as determined by calling pcre_fullinfo() with
PCRE_INFO_SIZE.
/(a)(?2){0,1999}?(b)/ == Error(52) at offset 16 internal error: overran compiling workspace
... same for 2000 thru 2048 ...
/(a)(?2){0,2048}?(b)/ == Error(52) at offset 16 internal error: overran compiling workspace
/(a)(?2){0,2049}?(b)/ == Crash!
The tests were done with a default LINK_SIZE of 2 running in a Windows
32-bit x86 environment. It seems to have problems when approaching
32K vs. the 64K that LINK_SIZE 2 provides.
The PCRE_INFO_SIZE was increasing by 16 for each increment, but the
amount of generated code appears to have been 32 for each increment.
It's crashing when a lot more code gets generated than the calculated
length was supposed to be.
Section 'COMPILED PATTERN MEMORY USAGE' of PCREPERFORM(3) describes
how portions of patterns are repeated, and in this case that operation
is multiplying the impact of the issue.