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

Issue 2500443004: [wasm] OOB traps: build protected instruction list during codegen (Closed)

Created:
4 years, 1 month ago by Eric Holk
Modified:
4 years ago
Reviewers:
mtrofin, bradnelson, titzer
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] OOB traps: build protected instruction list during codegen During codegen, we build a list mapping protected instructions to their associated landing pads. This will ultimately by used by the signal handler to recover from out of bounds faults and throw a JS exception. This is mostly pulled from my larger in-progress CL at https://codereview.chromium.org/2371833007/. BUG= https://bugs.chromium.org/p/v8/issues/detail?id=5277 Committed: https://crrev.com/bf35d15e5265f2d6ac74a594876d73ced535d8d1 Cr-Commit-Position: refs/heads/master@{#41400}

Patch Set 1 #

Patch Set 2 : Fixing Windows #

Patch Set 3 : Fixing Windows better #

Total comments: 6

Patch Set 4 : Moving most of the instruction list code to src/compiler; merging with master #

Patch Set 5 : Merging with master #

Total comments: 13

Patch Set 6 : Merging with master #

Patch Set 7 : Code review feedback #

Total comments: 2

Patch Set 8 : Merging with master #

Patch Set 9 : Removing spurious changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -46 lines) Patch
M BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/code-generator.h View 1 2 3 4 5 6 4 chunks +7 lines, -1 line 0 comments Download
M src/compiler/code-generator.cc View 1 2 3 4 5 6 3 chunks +15 lines, -3 lines 0 comments Download
M src/compiler/pipeline.h View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -1 line 0 comments Download
M src/compiler/pipeline.cc View 1 2 3 4 5 6 7 8 8 chunks +25 lines, -10 lines 0 comments Download
M src/compiler/wasm-compiler.h View 1 2 3 4 5 6 3 chunks +8 lines, -1 line 0 comments Download
M src/compiler/wasm-compiler.cc View 1 2 3 4 5 6 7 3 chunks +22 lines, -2 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 2 3 4 5 6 7 11 chunks +26 lines, -22 lines 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -4 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 2 chunks +10 lines, -1 line 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A src/trap-handler/trap-handler.h View 1 2 3 4 5 6 1 chunk +26 lines, -0 lines 0 comments Download
M src/v8.gyp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 6 1 chunk +32 lines, -0 lines 0 comments Download
M src/wasm/wasm-objects.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/wasm/wasm-run-utils.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 33 (21 generated)
Eric Holk
4 years, 1 month ago (2016-11-11 21:55:04 UTC) #2
Eric Holk
Has anyone had a chance to take a look at this yet?
4 years, 1 month ago (2016-11-16 17:19:01 UTC) #15
titzer
Generally the right direction, but I think we should move the protected instruction list data ...
4 years, 1 month ago (2016-11-16 18:06:47 UTC) #16
Eric Holk
I was able to move pretty much everything requested into the compiler. The protected instruction ...
4 years, 1 month ago (2016-11-18 02:19:47 UTC) #17
Eric Holk
ping
4 years ago (2016-11-30 17:12:05 UTC) #22
titzer
Sorry for the delay. Mostly looking good. https://codereview.chromium.org/2500443004/diff/80001/src/compiler/code-generator.cc File src/compiler/code-generator.cc (right): https://codereview.chromium.org/2500443004/diff/80001/src/compiler/code-generator.cc#newcode80 src/compiler/code-generator.cc:80: trap_handler::ProtectedInstructionData data; ...
4 years ago (2016-11-30 17:31:13 UTC) #23
Eric Holk
Thanks for the feedback. Please take another look. https://codereview.chromium.org/2500443004/diff/80001/src/compiler/code-generator.cc File src/compiler/code-generator.cc (right): https://codereview.chromium.org/2500443004/diff/80001/src/compiler/code-generator.cc#newcode80 src/compiler/code-generator.cc:80: trap_handler::ProtectedInstructionData ...
4 years ago (2016-11-30 20:16:20 UTC) #24
titzer
lgtm https://codereview.chromium.org/2500443004/diff/120001/src/objects.h File src/objects.h (right): https://codereview.chromium.org/2500443004/diff/120001/src/objects.h#newcode5426 src/objects.h:5426: DECL_ACCESSORS(protected_instructions, FixedArray) Can you double check that the ...
4 years ago (2016-11-30 21:19:07 UTC) #25
Eric Holk
Thanks! https://codereview.chromium.org/2500443004/diff/120001/src/objects.h File src/objects.h (right): https://codereview.chromium.org/2500443004/diff/120001/src/objects.h#newcode5426 src/objects.h:5426: DECL_ACCESSORS(protected_instructions, FixedArray) On 2016/11/30 21:19:07, titzer wrote: > ...
4 years ago (2016-11-30 21:55:55 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2500443004/160001
4 years ago (2016-11-30 21:56:04 UTC) #29
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years ago (2016-11-30 22:31:47 UTC) #31
commit-bot: I haz the power
4 years ago (2016-11-30 22:32:13 UTC) #33
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/bf35d15e5265f2d6ac74a594876d73ced535d8d1
Cr-Commit-Position: refs/heads/master@{#41400}

Powered by Google App Engine
This is Rietveld 408576698