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

Issue 2065043002: [wasm] Check for duplicate export names (Closed)

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

Description

[wasm] Check for duplicate export names Without this check, instantiation of the wasm module would fail on DefineOwnProperty on the exports object for the duplicate export. Now we detect this as validation error. R=rossberg@chromium.org, titzer@chromium.org, ahaas@chromium.org Committed: https://crrev.com/6fa656fde263b77ab806c1a76dcfec49cf48357b Cr-Commit-Position: refs/heads/master@{#37038}

Patch Set 1 #

Patch Set 2 : fix signed/unsigned comparison #

Patch Set 3 : fix for empty exports table #

Total comments: 7

Patch Set 4 : last change, saving one line :) #

Total comments: 4

Patch Set 5 : Address ahaas' comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -0 lines) Patch
M src/wasm/module-decoder.cc View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download
M test/mjsunit/wasm/export-table.js View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (6 generated)
Clemens Hammacher
4 years, 6 months ago (2016-06-14 13:05:40 UTC) #1
titzer
https://codereview.chromium.org/2065043002/diff/40001/src/wasm/module-decoder.cc File src/wasm/module-decoder.cc (right): https://codereview.chromium.org/2065043002/diff/40001/src/wasm/module-decoder.cc#newcode363 src/wasm/module-decoder.cc:363: std::vector<WasmExport> sorted_exports(module->export_table); Can't we just do that when creating ...
4 years, 6 months ago (2016-06-14 22:52:06 UTC) #2
Clemens Hammacher
https://codereview.chromium.org/2065043002/diff/40001/src/wasm/module-decoder.cc File src/wasm/module-decoder.cc (right): https://codereview.chromium.org/2065043002/diff/40001/src/wasm/module-decoder.cc#newcode363 src/wasm/module-decoder.cc:363: std::vector<WasmExport> sorted_exports(module->export_table); On 2016/06/14 22:52:06, titzer wrote: > Can't ...
4 years, 6 months ago (2016-06-15 07:48:09 UTC) #3
rossberg
https://codereview.chromium.org/2065043002/diff/40001/src/wasm/module-decoder.cc File src/wasm/module-decoder.cc (right): https://codereview.chromium.org/2065043002/diff/40001/src/wasm/module-decoder.cc#newcode363 src/wasm/module-decoder.cc:363: std::vector<WasmExport> sorted_exports(module->export_table); On 2016/06/15 07:48:09, Clemens Hammacher wrote: > ...
4 years, 6 months ago (2016-06-15 08:37:17 UTC) #4
rossberg
https://codereview.chromium.org/2065043002/diff/40001/src/wasm/module-decoder.cc File src/wasm/module-decoder.cc (right): https://codereview.chromium.org/2065043002/diff/40001/src/wasm/module-decoder.cc#newcode372 src/wasm/module-decoder.cc:372: std::stable_sort(sorted_exports.begin(), sorted_exports.end(), cmp); Instead of sorting the whole thing, ...
4 years, 6 months ago (2016-06-15 08:53:59 UTC) #5
Clemens Hammacher
https://codereview.chromium.org/2065043002/diff/40001/src/wasm/module-decoder.cc File src/wasm/module-decoder.cc (right): https://codereview.chromium.org/2065043002/diff/40001/src/wasm/module-decoder.cc#newcode372 src/wasm/module-decoder.cc:372: std::stable_sort(sorted_exports.begin(), sorted_exports.end(), cmp); On 2016/06/15 08:53:58, rossberg wrote: > ...
4 years, 6 months ago (2016-06-15 09:20:30 UTC) #6
rossberg
lgtm
4 years, 6 months ago (2016-06-15 09:24:54 UTC) #7
Clemens Hammacher
On 2016/06/15 09:24:54, rossberg wrote: > lgtm @ahaas: PTAL, still need an lgtm from a ...
4 years, 6 months ago (2016-06-16 08:06:11 UTC) #10
ahaas
lgtm with nits Here is a + from me :D https://codereview.chromium.org/2065043002/diff/60001/src/wasm/module-decoder.cc File src/wasm/module-decoder.cc (right): https://codereview.chromium.org/2065043002/diff/60001/src/wasm/module-decoder.cc#newcode365 ...
4 years, 6 months ago (2016-06-16 09:16:14 UTC) #11
Clemens Hammacher
https://codereview.chromium.org/2065043002/diff/60001/src/wasm/module-decoder.cc File src/wasm/module-decoder.cc (right): https://codereview.chromium.org/2065043002/diff/60001/src/wasm/module-decoder.cc#newcode365 src/wasm/module-decoder.cc:365: auto cmp = [base](const WasmExport& a, const WasmExport& b) ...
4 years, 6 months ago (2016-06-16 12:16:10 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2065043002/80001
4 years, 6 months ago (2016-06-16 12:16:30 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-16 12:18:22 UTC) #17
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-16 12:18:24 UTC) #18
commit-bot: I haz the power
4 years, 6 months ago (2016-06-16 12:19:18 UTC) #20
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/6fa656fde263b77ab806c1a76dcfec49cf48357b
Cr-Commit-Position: refs/heads/master@{#37038}

Powered by Google App Engine
This is Rietveld 408576698