[Webkit-unassigned] [Bug 151597] Some tests fail with ES6 `u` (Unicode) flag for regular expressions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 30 15:59:00 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=151597

--- Comment #5 from Michael Saboff <msaboff at apple.com> ---
(In reply to comment #2)
> Seems like this has been implemented in Safari Technology Preview v9.1.1
> (11601.6.10, 11602.1.25).
> 
> However, the implementation is buggy:
> http://mathias.html5.org/tests/javascript/regexp/
> 
> The following tests fail:
> 
>     assert_equals(/𝌆{2}/u.test('𝌆𝌆'), true);
>     assert_equals(/\uD834\uDF06{2}/u.test('\uD834\uDF06\uD834\uDF06'), true);

These two tests point out bug in quantified unicode regular expression processing.

>     assert_equals(/\W/iu.test('S'), true);
>     assert_equals(/\W/iu.test('K'), true);

According the CharacterClassEscape pattern semantic rules specified in the ES6 spec section 21.2.2.12 (https://tc39.github.io/ecma262/2016/#sec-characterclassescape) along with the canonicalization rules found at 21.2.2.8.2 (https://tc39.github.io/ecma262/2016/#sec-runtime-semantics-canonicalize-ch), upper case ASCII 'S' and 'K' ARE word characters and therefore should fail with the non-word, \W, character class.  This also holds true for when the ignore case flag is provided.

Note that the Chrome team believes that the current Chrome canary (51.0.2692.0 canary) incorrectly handles these two test cases.  This Chrome issue is tracked in https://bugs.chromium.org/p/v8/issues/detail?id=4879.

> Please fix this before shipping this in a stable release to avoid
> compatibility problems.

I created a new bug (https://bugs.webkit.org/show_bug.cgi?id=156044) to track just the quantified unicode RegExp test failures.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160330/2a04e3df/attachment.html>


More information about the webkit-unassigned mailing list