[heap] Fix a data race in a DCHECK in FreeLinearAllocationArea
The function was using an non-atomic marking state to check the color of the object. This is incorrect because concurrent marking may be running while the linear allocation area is freed. Bug: chromium:1139165 Change-Id: I20ef22908dfd8dcd75858707e884e87658dcb1cb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2526391 Auto-Submit: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#71057}
This commit is contained in:
parent
4d97ff5900
commit
f7e484ee29
@ -435,10 +435,9 @@ void PagedSpace::FreeLinearAllocationArea() {
|
||||
MemoryChunk::FromAddress(current_top));
|
||||
}
|
||||
|
||||
DCHECK_IMPLIES(
|
||||
current_limit - current_top >= 2 * kTaggedSize,
|
||||
heap()->incremental_marking()->non_atomic_marking_state()->IsWhite(
|
||||
HeapObject::FromAddress(current_top)));
|
||||
DCHECK_IMPLIES(current_limit - current_top >= 2 * kTaggedSize,
|
||||
heap()->incremental_marking()->marking_state()->IsWhite(
|
||||
HeapObject::FromAddress(current_top)));
|
||||
Free(current_top, current_limit - current_top,
|
||||
SpaceAccountingMode::kSpaceAccounted);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user