[pcre-dev] [Bug 1388] PCRE_UCP seems to ruin Callout pattern…

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1388] PCRE_UCP seems to ruin Callout pattern indices
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1388




--- Comment #4 from Philip Hazel <ph10@???> 2013-10-12 12:17:03 ---
On Fri, 11 Oct 2013, firas wrote:

> --- Comment #3 from firas <firas.dib@???> 2013-10-11 18:27:01 ---
> Thank you! Would you mind expanding on what caused the issue in the first
> place?


When creating auto callouts, a callout is inserted at the start of any
regex item, and then when the compiler reaches the end of the item, the
length is inserted.

When a character type such as \d is encountered in UCP mode, the
compiler is temporarily diverted to scan some alternative text. For
example, \d is replaced by \p{Nd}. Auto callout processing should be
suspended while this is going on, but it wasn't. This caused an extra
callout to be inserted and the length computations to go haywire.

The fix was trivial.

Regards,
Philip


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email