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

Issue 2395793003: [wasm] Support recompilation if deserialization fails. (Closed)

Created:
4 years, 2 months ago by Mircea Trofin
Modified:
4 years, 2 months ago
CC:
v8-reviews_googlegroups.com, Yang
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] Support recompilation if deserialization fails. One step closer to the informally-agreed upon specification that structured cloning will always succeed, meaning, if we fail to deserialize (e.g. because version mismatch in serialized format and v8 version), we recompile. As part of this work, the deserializer will need to become more resilient to invalid input data, and fail graciously rather than CHECK-ing. This CL addresses some of that, sufficient to unblock the current serialization tests. Subsequent CLs will add more testing and the appropriate fixes. BUG=639090 Committed: https://crrev.com/917ef616cccfcee30fc9871d8c6025c17b29b05b Cr-Commit-Position: refs/heads/master@{#40058}

Patch Set 1 #

Patch Set 2 : [wasm] recompile if needed when deserializing #

Total comments: 8

Patch Set 3 : Feedback #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -30 lines) Patch
M include/v8.h View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 2 chunks +42 lines, -3 lines 2 comments Download
M src/snapshot/code-serializer.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/snapshot/code-serializer.cc View 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/wasm/test-run-wasm-module.cc View 1 2 3 chunks +45 lines, -26 lines 0 comments Download

Messages

Total messages: 32 (23 generated)
Mircea Trofin
I realize I need to add back-compat APIs to avoid chrome build from failing, but ...
4 years, 2 months ago (2016-10-06 06:35:09 UTC) #11
Yang
lgtm https://codereview.chromium.org/2395793003/diff/20001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/2395793003/diff/20001/src/api.cc#newcode7216 src/api.cc:7216: WasmCompiledModuleRawBytesManager ensure_clean_serialization(compiled_part); what's the advantage of this over ...
4 years, 2 months ago (2016-10-06 07:35:34 UTC) #13
vogelheim
lgtm Generally looks good, but the API compatibility thing needs to be fixed. Also please ...
4 years, 2 months ago (2016-10-06 10:00:50 UTC) #14
Mircea Trofin
Thanks, will address the comments shortly and upload a new CL. https://codereview.chromium.org/2395793003/diff/20001/src/api.cc File src/api.cc (right): ...
4 years, 2 months ago (2016-10-06 16:17:48 UTC) #15
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/2395793003/40001
4 years, 2 months ago (2016-10-06 18:46:35 UTC) #23
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-10-06 19:33:42 UTC) #25
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/917ef616cccfcee30fc9871d8c6025c17b29b05b Cr-Commit-Position: refs/heads/master@{#40058}
4 years, 2 months ago (2016-10-06 19:34:07 UTC) #27
titzer
https://codereview.chromium.org/2395793003/diff/40001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/2395793003/diff/40001/src/api.cc#newcode7249 src/api.cc:7249: i_isolate, data->GetChars(), data->GetChars() + data->length(), This code is getting ...
4 years, 2 months ago (2016-10-07 07:52:55 UTC) #29
Clemens Hammacher
4 years, 2 months ago (2016-10-07 10:49:24 UTC) #31
Message was sent while issue was closed.
https://codereview.chromium.org/2395793003/diff/40001/src/api.cc
File src/api.cc (right):

https://codereview.chromium.org/2395793003/diff/40001/src/api.cc#newcode7249
src/api.cc:7249: i_isolate, data->GetChars(), data->GetChars() + data->length(),
On 2016/10/07 07:52:55, titzer wrote:
> This code is getting a raw pointer to the bytes of a string and handing that
out
> across an API that does a tons of allocation. This is failing now with GC
> stress. We have to be careful to avoid raw pointers into objects in general.
> 
> clemensh@ has a fix in progress.

Landed: https://codereview.chromium.org/2402633002

Powered by Google App Engine
This is Rietveld 408576698