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

Issue 2201663003: Heap::CopyCode handling of references into NEW_SPACE (Closed)

Created:
4 years, 4 months ago by Mircea Trofin
Modified:
4 years, 4 months ago
CC:
v8-reviews_googlegroups.com, Hannes Payer (out of office), ulan, ahaas, ddchen
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Heap::CopyCode does not correctly handle references into NEW_SPACE. A fix would be to walk the reloc info and RecordWriteIntoCode. Doing so, however, upsets a scavenger DCHECK. We stumbled upon this issue because we were placing wasm objects (fixed arrays) in NEW_SPACE, rather than OLD_SPACE. These fixed arrays were subsequently referenced from Code objects, which were then cloned. The current CL ensures wasm constructs are allocated in OLD_SPACE, by pre-tenuring them (consistent with other wasm allocations). In addition, it adds a DCHECK for CopyCode clarifying its lack of support for references to NEW_SPACE. We can investigate in a subsequent CL making CopyCode more robust, pending understanding of the Scavenger's assumptions. BUG= Committed: https://crrev.com/c0dfc8d8f93d892c86193b3d70f85bc9a8d3ae84 Cr-Commit-Position: refs/heads/master@{#38263}

Patch Set 1 #

Patch Set 2 : CopyCode #

Patch Set 3 : CopyCode #

Patch Set 4 : Just wasm-module changes. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -31 lines) Patch
M src/wasm/wasm-module.cc View 1 4 chunks +21 lines, -31 lines 2 comments Download

Messages

Total messages: 40 (29 generated)
Mircea Trofin
4 years, 4 months ago (2016-08-02 00:40:45 UTC) #18
Michael Lippautz
Thanks for hinting us to the actual problem! We are missing a generational barrier for ...
4 years, 4 months ago (2016-08-02 09:30:53 UTC) #21
Mircea Trofin
On 2016/08/02 09:30:53, Michael Lippautz wrote: > Thanks for hinting us to the actual problem! ...
4 years, 4 months ago (2016-08-02 15:40:50 UTC) #24
Michael Lippautz
On 2016/08/02 15:40:50, Mircea Trofin wrote: > On 2016/08/02 09:30:53, Michael Lippautz wrote: > > ...
4 years, 4 months ago (2016-08-02 19:14:36 UTC) #27
Mircea Trofin
On 2016/08/02 19:14:36, Michael Lippautz wrote: > On 2016/08/02 15:40:50, Mircea Trofin wrote: > > ...
4 years, 4 months ago (2016-08-02 20:56:41 UTC) #28
Mircea Trofin
+brad for the wasm part +ddchen FYI, since I'm shuffling his code back to "how ...
4 years, 4 months ago (2016-08-02 20:58:30 UTC) #32
bradnelson
https://codereview.chromium.org/2201663003/diff/80001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (left): https://codereview.chromium.org/2201663003/diff/80001/src/wasm/wasm-module.cc#oldcode1207 src/wasm/wasm-module.cc:1207: for (int j = 0; j < clone_indirect_tables->length(); ++j) ...
4 years, 4 months ago (2016-08-02 22:47:15 UTC) #33
bradnelson
lgtm https://codereview.chromium.org/2201663003/diff/80001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (left): https://codereview.chromium.org/2201663003/diff/80001/src/wasm/wasm-module.cc#oldcode1207 src/wasm/wasm-module.cc:1207: for (int j = 0; j < clone_indirect_tables->length(); ...
4 years, 4 months ago (2016-08-02 22:48:54 UTC) #34
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/2201663003/80001
4 years, 4 months ago (2016-08-02 22:51:09 UTC) #36
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 4 months ago (2016-08-02 22:52:50 UTC) #38
commit-bot: I haz the power
4 years, 4 months ago (2016-08-02 22:55:53 UTC) #40
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/c0dfc8d8f93d892c86193b3d70f85bc9a8d3ae84
Cr-Commit-Position: refs/heads/master@{#38263}

Powered by Google App Engine
This is Rietveld 408576698