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

Issue 2416563002: [heap] Fix forwarding pointer race between sweeper threads and pointer updating threads. (Closed)

Created:
4 years, 2 months ago by Hannes Payer (out of office)
Modified:
4 years, 2 months ago
Reviewers:
Michael Lippautz, ulan
CC:
v8-reviews_googlegroups.com, Hannes Payer (out of office), ulan
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[heap] Fix forwarding pointer race between sweeper threads and pointer updating threads. The race can happen if: 1) Fixed array A is right before object B in new space 2) A slot in object C located in old space points to object B (old to new remembered set entry is created) 3) Object C becomes unreachable which held the only reference to object B which also becomes unreachable 4) Fixed array A gets right trimmed 5) The sweeper will sweep the last word of object A and object B. It will write the free space map into the last word of object A and a size field in the first word of object B. 6) Pointer updating may observe the size field now because the recored slot points to the start of object B and will confuse it with a forwarding pointer. Note a similar race may happen with left trimming. Array A points to its backing store, the backing store gets left trimmed by 1 element, and array A dies. BUG= Committed: https://crrev.com/13488842de6a672dffe102a4a6eb414dd1fb25e0 Cr-Commit-Position: refs/heads/master@{#40218}

Patch Set 1 #

Total comments: 3

Patch Set 2 : explict bailout #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M src/heap/mark-compact.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
Hannes Payer (out of office)
4 years, 2 months ago (2016-10-12 12:07:11 UTC) #5
ulan
https://codereview.chromium.org/2416563002/diff/1/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/2416563002/diff/1/src/heap/mark-compact.cc#newcode3645 src/heap/mark-compact.cc:3645: map_word.ToRawValue() >= Page::kPageSize) { I think we need to ...
4 years, 2 months ago (2016-10-12 12:18:10 UTC) #8
Michael Lippautz
lgtm
4 years, 2 months ago (2016-10-12 12:20:20 UTC) #10
ulan
lgtm https://codereview.chromium.org/2416563002/diff/1/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/2416563002/diff/1/src/heap/mark-compact.cc#newcode3645 src/heap/mark-compact.cc:3645: map_word.ToRawValue() >= Page::kPageSize) { On 2016/10/12 12:18:10, ulan ...
4 years, 2 months ago (2016-10-12 12:21:10 UTC) #11
Hannes Payer (out of office)
https://codereview.chromium.org/2416563002/diff/1/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/2416563002/diff/1/src/heap/mark-compact.cc#newcode3645 src/heap/mark-compact.cc:3645: map_word.ToRawValue() >= Page::kPageSize) { On 2016/10/12 12:21:10, ulan wrote: ...
4 years, 2 months ago (2016-10-12 12:31:51 UTC) #14
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/2416563002/20001
4 years, 2 months ago (2016-10-12 12:32:15 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-10-12 12:54:36 UTC) #19
commit-bot: I haz the power
4 years, 2 months ago (2016-10-12 12:54:55 UTC) #21
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/13488842de6a672dffe102a4a6eb414dd1fb25e0
Cr-Commit-Position: refs/heads/master@{#40218}

Powered by Google App Engine
This is Rietveld 408576698