Re: [pcre-dev] Overran compiling workspace

Etusivu
Poista viesti
Lähettäjä: ph10
Päiväys:  
Vastaanottaja: ND
Kopio: Pcre-dev
Aihe: Re: [pcre-dev] Overran compiling workspace
On Thu, 27 Aug 2015, ND wrote:

> Sometimes "internal error: overran compiling workspace" rises (PCRE 8.38
> RC-1).
> I find this error code 52 in pcre documentation but find nothing about why it
> happens.
>
> Explain about it please.


This should not happen. There are two possible causes. The
pcre_compile() function scans the regex twice. The first time it is
computing how much memory the compiled regex will need. It compiles each
item in the regex into some workspace, and then discards it after noting
how big it is. One cause of error 52 is overrunning the workspace.

In the second pass, which is doing the real compile, the workspace is
used to keep a list of forward references to numbered groups. The error
occurs if this is overrun.

In both cases there are supposed to be checks to prevent this happening;
the workspace should be extended in the second pass, for example.

Please post the pattern that causes this error.

Note: in PCRE2 the forward references are handled differently, so only
the first case applies.

Philip

--
Philip Hazel