Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Issue 2984713002: Fix scanning of unterminated strings (Closed)

Created:
3 years, 5 months ago by danrubel
Modified:
3 years, 4 months ago
Reviewers:
ahe
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix scanning of unterminated strings This fixes * lineStart tracking when synthetic strings added * token charOffset when scanning UTF-8 stream These changes prevent the crashes mentioned in #29976 and #29982. R=ahe@google.com Committed: https://github.com/dart-lang/sdk/commit/5909efe40128b680eb65a60d072b5b26750726f7

Patch Set 1 #

Patch Set 2 : update test status #

Total comments: 8

Patch Set 3 : update tests #

Total comments: 4

Patch Set 4 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -18 lines) Patch
M pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart View 5 chunks +12 lines, -8 lines 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/string_scanner.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/test/scanner_fasta_test.dart View 1 chunk +41 lines, -0 lines 0 comments Download
M pkg/front_end/testcases/ast_builder.status View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M pkg/front_end/testcases/compile.status View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/front_end/testcases/outline.status View 1 chunk +0 lines, -2 lines 0 comments Download
A pkg/front_end/testcases/regress/issue_29976.dart.direct.expect View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/regress/issue_29976.dart.outline.expect View 1 chunk +2 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/regress/issue_29976.dart.strong.expect View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/regress/issue_29982.dart.direct.expect View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/regress/issue_29982.dart.outline.expect View 1 chunk +2 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/regress/issue_29982.dart.strong.expect View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M pkg/front_end/testcases/strong.status View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
danrubel
3 years, 5 months ago (2017-07-20 20:21:28 UTC) #2
ahe
The scanner changes looks good, but the change from start to tokenStart could use a ...
3 years, 5 months ago (2017-07-21 14:09:10 UTC) #3
ahe
On 2017/07/21 14:09:10, ahe wrote: > ./pkg/front_end/tool/fasta testing compile -DupdateExpectations=true > > ./pkg/front_end/tool/fasta testing strong ...
3 years, 5 months ago (2017-07-21 14:10:04 UTC) #4
ahe
On 2017/07/21 14:10:04, ahe wrote: > On 2017/07/21 14:09:10, ahe wrote: > > ./pkg/front_end/tool/fasta testing ...
3 years, 5 months ago (2017-07-21 14:11:23 UTC) #5
danrubel
Comments addressed. PTAL. On 2017/07/21 14:09:10, ahe wrote: > You can't mark the bugs as ...
3 years, 5 months ago (2017-07-21 17:38:19 UTC) #7
ahe
lgtm https://codereview.chromium.org/2984713002/diff/20001/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart File pkg/front_end/lib/src/fasta/scanner/string_scanner.dart (right): https://codereview.chromium.org/2984713002/diff/20001/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart#newcode63 pkg/front_end/lib/src/fasta/scanner/string_scanner.dart:63: type, source + closingQuotes, tokenStart, source.length); On 2017/07/21 ...
3 years, 4 months ago (2017-08-01 14:19:57 UTC) #8
danrubel
https://codereview.chromium.org/2984713002/diff/20001/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart File pkg/front_end/lib/src/fasta/scanner/string_scanner.dart (right): https://codereview.chromium.org/2984713002/diff/20001/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart#newcode63 pkg/front_end/lib/src/fasta/scanner/string_scanner.dart:63: type, source + closingQuotes, tokenStart, source.length); On 2017/08/01 14:19:57, ...
3 years, 4 months ago (2017-08-01 21:23:20 UTC) #9
danrubel
3 years, 4 months ago (2017-08-01 21:31:14 UTC) #11
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
5909efe40128b680eb65a60d072b5b26750726f7 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698