Re: PCRE jit bug with UTF-8 and lookbehind assertion
| From: | Christian Schneider | Date: | Tue, 23 Feb 2016 14:34:04 +0000 |
| Subject: | Re: PCRE jit bug with UTF-8 and lookbehind assertion | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91359@lists.php.net to get a copy of this message | ||
Am 21.02.2016 um 11:42 schrieb Anatol Belski <anatol.php@belski.net>:
>> -----Original Message-----
>> From: Ángel González [mailto:keisial@gmail.com]
>> Sent: Sunday, February 21, 2016 1:27 AM
>> To: Anatol Belski <anatol.php@belski.net>
>> Cc: 'Christian Schneider' <cschneid@cschneid.com>; 'PHP
>> internals'
>> <internals@lists.php.net>
>> Subject: Re: [PHP-DEV] PCRE jit bug with UTF-8 and lookbehind assertion
>>
>> On 19/02/16 09:20, Anatol Belski wrote:
>>> Could you please write back, what is the out difference between those
>>> two commands? Thanks. Anatol
>> In the first case, it correctly outputs «x°11» (78 c2 b0 7a). With jit enabled it
>> produces «x z» (78 c2 7a). That is, it is only outputting the lower byte of the utf-8
>> encoding of the U+00B0 character Tested on PHP 7.0.3 using the system libpcre
>> 8.38
>>
> Were you putting the snippets into a file or testing on the console? I had an issue while
> testing this on the console, that some chars was partially swallowed by terminal (which was a utf-8
> terminal). When putting into a file, the output is same for both - "x°z". Please see also
> the continued discussion in the original ticket
> https://bugs.exim.org/show_bug.cgi?id=1189 . The offsets delivered
> by PCRE also seem to be correct, and valgrind doesn't find anything. It were great if you
> could confirm these insights.
I can reproduce it in a console and in a file.
PCRE Library Version => 8.38 2015-11-23
I also reproduced it with a C program directly using the system PCRE library, no PHP involved.
I attached the C source to https://bugs.exim.org/show_bug.cgi?id=1189
Regards,
- Chris