Spread string with emoji produces holey array
Reported by
a...@scirra.com,
Dec 12
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36 Steps to reproduce the problem: 1. Spread a string with an emoji, e.g. [..."😃"] What is the expected behavior? ["😃"] What went wrong? ["😃", undefined] Did this work before? N/A Chrome version: 71.0.3578.80 Channel: stable OS Version: 10.0 Flash Version: This reproduces in stable 71.0.3578.80. It appears to be fixed in Canary 73.0.3638.0. However this is a serious problem: it can crash any web apps that reasonably assume a spread string will produce an array of strings. For example our web app Construct 3 (editor.construct.net) can crash if you enter an emoji in to a string because of this. So it may warrant a patch on the stable branch.
,
Dec 12
,
Dec 13
,
Dec 13
Thanks for filing the issue! Tried checking the issue on reported chrome version 71.0.3578.80 using Windows 10 with the below mentioned steps. 1. Launched Chrome 2. Inspected the page and Pasted "😃" in DevTools Console 3. Didn't observe any error. Attaching the screenshot of the same for reference. From comment#1 cc'ing "Hai Dang" for further inputs. @Reporter: Could you please share a sample test file to check the issue and please let us know if the process followed here isn't correct. Any further inputs from your end may be helpful.
,
Dec 13
You didn't follow the right steps. The repro is to use [..."😃"], not just "😃".
,
Dec 13
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 18
,
Dec 18
Probably because M71 is missing https://chromium-review.googlesource.com/c/v8/v8/+/1297320
,
Dec 18
Oh, I see there's a bisect finding that already :)
,
Dec 18
Any code point greater than U+FFFF can be used to reproduce the issue in Chrome stable. E.g.:
[...'\u{010000}'].length;
// → Actual: 2
// → Expected: 1
I cannot reproduce the issue in a recent d8 (which makes sense given comment #1).
,
Dec 18
As mentioned in comment 1, this bug has been fixed a while ago. The fix should have been merged back to stable but wasn't. Unfortunately it's now too late for that, so we'll have to wait for 72 to become stable next month.
,
Dec 20
Issue v8:8612 has been merged into this issue. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by woxxom@gmail.com
, Dec 12