Re: [pcre-dev] 8.31-RC1 test release is available

Página Principal
Apagar esta mensagem
Autor: Philip Hazel
Data:  
Para: Ralf Junker
CC: pcre-dev
Assunto: Re: [pcre-dev] 8.31-RC1 test release is available
On Tue, 12 Jun 2012, Ralf Junker wrote:

> Pattern and subject below return different results when run with 8-bit
> and 16-bit DFA. The problem only shows when specifying the non-default
> ISO 8859 character tables (/T1).


The fault showed for me without the use of /T1 on Linux.

> Matching with pcre16_dfa_exec yields a "Pointer arithmetic underrun in process: pcretest.exe(4172)" in pcre_dfa_exec.c line 3208. This is the pcretest output for 16-bit:


I could not provoke that error on Linux. I did, however, find the bug
that was causing the 8-bit library to give a different (and incorrect)
answer to the 16-bit library.

> Note: Both 8-bit and 16-bit match identically if the non-ASCII chars \xA0 and \xBC are changed to ASCII (<= 127).


It turned out that there were three places in pcre_dfa_exec.c where "if
(utf)" had been accidentally omitted. Thus, code that should be run only
in UTF mode was being run unconditionally. I managed to create test
cases for the other two cases.

Codepoints > 127 provoked the bug in 8-bit mode. Others would have
caused a similar problem in 16-bit mode.

I have fixed the three bugs, updated the tests, and committed everything
(#979). Please test to see if this fixes the problem in your
environment.

Thanks for the testing.

Philip

--
Philip Hazel