String iterator doesn't handle lone surrogates correctly
Reported by
mfica...@shapesecurity.com,
May 25 2017
|
||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Steps to reproduce the problem:
1. Array.from('\xD800\xD800')
What is the expected behavior?
['\xD800', '\xD800']
What went wrong?
Returned ['Ø', '0', '0', 'Ø', '0', '0'].
Did this work before? N/A
Chrome version: 58.0.3029.110 Channel: stable
OS Version: Fedora 25
Flash Version: N/A
Notice that '\xD800\xD800' is not a valid surrogate pair. For these code units, a single-code-unit string should be produced by the iterator. See https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
,
May 25 2017
The sample test case is in the original message.
,
May 25 2017
Thank you for providing more feedback. Adding requester "ligimole@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 26 2017
Tested the issue on chrome Stable #58.0.3029.110, Canary 60.0.3111.0 in Ubuntu 14.04 and was able to reproduce the issue. Observations: M30-M44 : Array.from function is not available. Console displaying a error message. M45-M60 : Returned ['Ø', '0', '0', 'Ø', '0', '0']. Please find the screen shot for reference(Win & Linux) This is a Non-Regression issue since seeing this from M45 #45.0.2454.0, Making the status to Untriaged so that the issue would get addressed. Note : Able to reproduce the issue in Win 10.0 and Mac 10.12.4. Thank you.
,
May 26 2017
Attachment..
,
May 26 2017
Please close. I meant to use Array.from('\uD800\uD800'). Doing too much PureScript lately.
,
May 30 2017
Closing per comment 6 |
||||
►
Sign in to add a comment |
||||
Comment 1 by ligim...@chromium.org
, May 25 2017Labels: Needs-Triage-M58 Needs-Bisect Needs-Feedback