Re: [pcre-dev] Internal errors and crashes with quantified …

Góra strony
Delete this message
Autor: Philip Hazel
Data:  
Dla: ND
CC: pcre-dev
Temat: Re: [pcre-dev] Internal errors and crashes with quantified subroutines
On Mon, 21 Nov 2011, ND wrote:

> The pattern that is workable in Perl (Perl sucsessfully matches
> /(a)(?2){0,35000}?(b)/ for example) becames unworkable in PCRE. It's not good
> news for me. But if compatibility CAN NOT be achieved than this may be
> described in 'pcrecompat'.


It's a rather special case, but yes, it can be documented. It cannot be
fixed without a redesign of how the compile workspace size is handled
(it is currently of fixed size, 4K, defined by COMPILE_WORK_SIZE in
pcre_compile.c) and at the moment there are much more important things
to do.

> But investigate please, is there a way to take away compatibility immolation
> and make such patterns workable in PCRE.


You can patch pcre_compile.c to make COMPILE_WORK_SIZE bigger, but there
will always be a limit.

> May be LINK_SIZE influences. My PCRE build uses --with-link-size=3


Yes, that would make a difference.

Philip

--
Philip Hazel