New issue
Advanced search Search tips

Issue 604303 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

utf-16 characters in script comments cause DCHECK failure when there is no newline at the end of the file

Project Member Reported by meade@chromium.org, Apr 18 2016

Issue description

Version: HEAD (local build in clean client)
OS: Linux

What steps will reproduce the problem?
(1) Build a chrome debug build, run it
(2) Open the attached html file

What is the expected output?
No DCHECK failure

What do you see instead?
DCHECK failure at https://code.google.com/p/chromium/codesearch#chromium/src/v8/src/parsing/parser.cc&l=851

#
# Fatal error in ../../v8/src/parsing/parser.cc, line 851
# Check failed: scanner_.peek_location().beg_pos == source->length() (29 vs. 28).
#


- If there is a utf-16 character present in the file, and there is no newline at the end of the file, this DCHECK fails

- If the utf-16 character is present, and there is a newline at the end of the file, the DCHECK does not fail
- If there is no utf-16 character present, and there is no newline at the end of the file, the DCHECK does not fail

I've attached html and js files demonstrating these three case.
 
test-eng.html
61 bytes View Download
script-eng.js
27 bytes View Download
test-kata.html
62 bytes View Download
script-kata.js
28 bytes View Download
test-kata-newline.html
70 bytes View Download
script-kata-newline.js
29 bytes View Download

Comment 1 by meade@chromium.org, Apr 18 2016

for clarity, test-kata/script-kata is the failing case :)

Comment 2 by meade@chromium.org, Apr 29 2016

Components: Blink>JavaScript
Cc: vogelheim@chromium.org
Components: -Blink>JavaScript Blink>JavaScript>Language
Labels: -Pri-3 Pri-1
Owner: adamk@chromium.org
Status: Assigned (was: Untriaged)

Comment 4 by adamk@chromium.org, Jul 14 2016

Labels: Needs-Feedback
I can't reproduce this. meade, can you still reproduce this DCHECK?

Comment 5 by meade@chromium.org, Jul 15 2016

Status: WontFix (was: Assigned)
I can't reproduce this any more either. I guess it's been fixed somewhere along the way. The original website I found this problem on also doesn't trigger the issue anymore either.
There was a fix in May, where parsing would DCHECK-fail at the last character of the stream, if that character was a part of certain tokens (but not whitespace). This sounds like a duplicate.

fix: crrev.com/1941843002
bug:  crbug.com/607903 

@meade: Thanks for the report. The other bug was a ClusterFuzz thing. I'm happy and/or mildly shocked whenever I find out those things happen on real pages, too. :)

Comment 7 by meade@chromium.org, Jul 19 2016

@vogelheim: No problem! I'm glad it got caught by clusterfuzz and was fixed intentionally!

Sign in to add a comment