New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 792520 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

FreeLists are evicted twice for evacuation candidates

Project Member Reported by u...@chromium.org, Dec 6 2017

Issue description

When a page is selected as an evacuation candidate, we evict its free list, which invalidate all free list categories.

Later on in the finalization pause of GC, we may decide to release the evacuation candidate. Releasing a page also evicts page free list.

This can result in out-of-bounds read in:
void FreeList::RemoveCategory(FreeListCategory* category) {
  FreeListCategoryType type = category->type_;
  FreeListCategory* top = categories_[type]; // type = kInvalidCategory.

This is uncovered by 
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.v8%2FV8_Linux_-_arm64_-_sim_-_MSAN%2F18598%2F%2B%2Frecipes%2Fsteps%2FCheck%2F0%2Flogs%2FArrayBuffer_Compaction%2F0


 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/75c1c6c68291e9ae20a4ee23cd4375d30e00ab72

commit 75c1c6c68291e9ae20a4ee23cd4375d30e00ab72
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Wed Dec 06 19:03:53 2017

[heap] Do not evict invalidated free list category.

Bug:  chromium:792520 
Change-Id: Ibc030a08898434c1b5c7a2e8dd14730bfebc7309
Reviewed-on: https://chromium-review.googlesource.com/811504
Reviewed-by: Ali Ijaz Sheikh <ofrobots@google.com>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49910}
[modify] https://crrev.com/75c1c6c68291e9ae20a4ee23cd4375d30e00ab72/src/heap/spaces.cc

Comment 2 by u...@chromium.org, Dec 7 2017

 Issue 792513  has been merged into this issue.

Comment 3 by u...@chromium.org, Dec 12 2017

Status: Fixed (was: Assigned)

Sign in to add a comment