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

Issue 1967023004: [wasm] Add UTF-8 validation (Closed)

Created:
4 years, 7 months ago by Clemens Hammacher
Modified:
4 years, 7 months ago
Reviewers:
titzer, clemensh, Yang
CC:
v8-reviews_googlegroups.com, Michael Achenbach
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] Add UTF-8 validation Names passed for imports and exports are checked during decoding, leading to errors if they are no valid UTF-8. Function names are not checked during decode, but rather lead to undefined being returned at runtime if they are not UTF-8. We need to do these checks on the Wasm side, since the factory methods assume to get valid UTF-8 strings. R=titzer@chromium.org, yangguo@chromium.org Committed: https://crrev.com/f0523e30467789cbb3689b8023a207d3b5c4873c Cr-Commit-Position: refs/heads/master@{#36208}

Patch Set 1 #

Patch Set 2 : fix signed/unsigned mismatch #

Total comments: 4

Patch Set 3 : add titzer's comments #

Total comments: 4

Patch Set 4 : type & remove old files #

Patch Set 5 : rebase on parallel compilation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -23 lines) Patch
M src/unicode.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M src/unicode.cc View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
M src/unicode-inl.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M src/wasm/module-decoder.cc View 1 2 6 chunks +17 lines, -12 lines 0 comments Download
M src/wasm/wasm-function-name-table.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 3 chunks +5 lines, -3 lines 0 comments Download
A test/mjsunit/wasm/unicode-validation.js View 1 chunk +121 lines, -0 lines 0 comments Download
M test/mjsunit/wasm/wasm-module-builder.js View 3 chunks +16 lines, -8 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 17 (5 generated)
Clemens Hammacher
4 years, 7 months ago (2016-05-11 18:41:39 UTC) #1
titzer
https://codereview.chromium.org/1967023004/diff/20001/src/wasm/utf8.h File src/wasm/utf8.h (right): https://codereview.chromium.org/1967023004/diff/20001/src/wasm/utf8.h#newcode1 src/wasm/utf8.h:1: // Copyright 2016 the V8 project authors. All rights ...
4 years, 7 months ago (2016-05-12 08:29:14 UTC) #2
Clemens Hammacher
https://codereview.chromium.org/1967023004/diff/20001/src/wasm/utf8.h File src/wasm/utf8.h (right): https://codereview.chromium.org/1967023004/diff/20001/src/wasm/utf8.h#newcode1 src/wasm/utf8.h:1: // Copyright 2016 the V8 project authors. All rights ...
4 years, 7 months ago (2016-05-12 11:21:41 UTC) #3
titzer
https://codereview.chromium.org/1967023004/diff/40001/src/unicode.cc File src/unicode.cc (right): https://codereview.chromium.org/1967023004/diff/40001/src/unicode.cc#newcode311 src/unicode.cc:311: // Preformance optimization: Skip over single-byte values first. s/Preformance/Performance/ ...
4 years, 7 months ago (2016-05-12 11:35:30 UTC) #4
Clemens Hammacher
https://codereview.chromium.org/1967023004/diff/40001/src/unicode.cc File src/unicode.cc (right): https://codereview.chromium.org/1967023004/diff/40001/src/unicode.cc#newcode311 src/unicode.cc:311: // Preformance optimization: Skip over single-byte values first. On ...
4 years, 7 months ago (2016-05-12 11:48:27 UTC) #5
titzer
lgtm
4 years, 7 months ago (2016-05-12 11:53:03 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1967023004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1967023004/60001
4 years, 7 months ago (2016-05-12 12:07:54 UTC) #8
Yang
src/unicode lgtm.
4 years, 7 months ago (2016-05-12 12:09:31 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/15138)
4 years, 7 months ago (2016-05-12 12:10:06 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1967023004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1967023004/80001
4 years, 7 months ago (2016-05-12 12:52:33 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-12 13:01:17 UTC) #15
commit-bot: I haz the power
4 years, 7 months ago (2016-05-12 13:02:22 UTC) #17
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/f0523e30467789cbb3689b8023a207d3b5c4873c
Cr-Commit-Position: refs/heads/master@{#36208}

Powered by Google App Engine
This is Rietveld 408576698