[pcre-dev] [Bug 1493] pcre_study does not include VT in star…

Αρχική Σελίδα
Delete this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: pcre-dev
Αντικείμενο: [pcre-dev] [Bug 1493] pcre_study does not include VT in starting chars for /\s/
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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




--- Comment #2 from Philip Hazel <ph10@???> 2014-06-17 17:13:02 ---
On Tue, 17 Jun 2014, Zoltan Herczeg wrote:

> This one is interesting. SVN annotate says:
>
>   1033       ph10       /* The cbit_space table has vertical tab as whitespace;
> we have to not
>   1033       ph10       set it from the table. Luckily, the code value is the
> same (0x0b) in
>   1033       ph10       ASCII and EBCDIC, so we can just adjust the appropriate
> bit. */
>     91      nigel
>     77      nigel       case OP_WHITESPACE:
>    539       ph10       c = start_bits[1];    /* Save in case it was already
> set */
>    539       ph10       set_type_bits(start_bits, cbit_space, table_limit, cd);
>    539       ph10       start_bits[1] = (start_bits[1] & ~0x08) | c;
>     77      nigel       try_next = FALSE;
>     77      nigel       break;

>
> PCRE woprks this way since r539. Philip even added a comment in r1033. I
> suspect we could simply remove this special case.


Yes! Not removing this is a bug that was introduced when VT was added to
"space". The handling of OP_WHITESPACE further up the code was changed,
but this case was overlooked. I happened to be working on this code for
PCRE2 yesterday and today, and spotted some of these issues. I will deal
with these issues in a day or two, when I can check them both in PCRE
and PCRE2.

Philip


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