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

Issue 2815663002: Disable collection backing reallocation during pre finalizer (Closed)

Created:
3 years, 8 months ago by keishi
Modified:
3 years, 8 months ago
CC:
chromium-reviews, oilpan-reviews, Mads Ager (chromium), blink-reviews, kinuko+watch, kouhei+heap_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Disable collection backing reallocation during pre finalization If a collection backing is reallocated during pre finalization, the backing containing stale pointers ends up uncollected for one cycle. If conservative GC ends up tracing this buffer by accident, the stale pointers gets traced. This CL disallows collection backing reallocation during pre finalizers. The backing size will end up being adjusted later. BUG=709201 Review-Url: https://codereview.chromium.org/2815663002 Cr-Commit-Position: refs/heads/master@{#464359} Committed: https://chromium.googlesource.com/chromium/src/+/0820c8882ec4691521bb7767877abc30123177d4

Patch Set 1 #

Patch Set 2 : fix #

Total comments: 12

Patch Set 3 : fix #

Total comments: 6

Patch Set 4 : fix #

Patch Set 5 : fix #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -1 line) Patch
M third_party/WebKit/Source/platform/heap/Heap.cpp View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/HeapAllocator.h View 1 2 3 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/HeapTest.cpp View 1 2 3 4 1 chunk +111 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.h View 1 2 3 4 3 chunks +31 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.cpp View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/wtf/HashTable.h View 1 2 3 2 chunks +2 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/platform/wtf/Vector.h View 1 2 3 2 chunks +6 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/platform/wtf/allocator/PartitionAllocator.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 31 (17 generated)
keishi
PTAL
3 years, 8 months ago (2017-04-12 06:07:39 UTC) #5
kouhei (in TOK)
https://codereview.chromium.org/2815663002/diff/20001/third_party/WebKit/Source/platform/heap/HeapAllocator.h File third_party/WebKit/Source/platform/heap/HeapAllocator.h (right): https://codereview.chromium.org/2815663002/diff/20001/third_party/WebKit/Source/platform/heap/HeapAllocator.h#newcode154 third_party/WebKit/Source/platform/heap/HeapAllocator.h:154: static bool IsBackingReallocationAllowed() { Can we make it clear ...
3 years, 8 months ago (2017-04-12 06:14:01 UTC) #7
haraken
https://codereview.chromium.org/2815663002/diff/20001/third_party/WebKit/Source/platform/heap/HeapAllocator.h File third_party/WebKit/Source/platform/heap/HeapAllocator.h (right): https://codereview.chromium.org/2815663002/diff/20001/third_party/WebKit/Source/platform/heap/HeapAllocator.h#newcode154 third_party/WebKit/Source/platform/heap/HeapAllocator.h:154: static bool IsBackingReallocationAllowed() { On 2017/04/12 06:14:01, kouhei wrote: ...
3 years, 8 months ago (2017-04-12 06:44:34 UTC) #8
keishi
https://codereview.chromium.org/2815663002/diff/20001/third_party/WebKit/Source/platform/heap/HeapAllocator.h File third_party/WebKit/Source/platform/heap/HeapAllocator.h (right): https://codereview.chromium.org/2815663002/diff/20001/third_party/WebKit/Source/platform/heap/HeapAllocator.h#newcode154 third_party/WebKit/Source/platform/heap/HeapAllocator.h:154: static bool IsBackingReallocationAllowed() { On 2017/04/12 06:44:34, haraken wrote: ...
3 years, 8 months ago (2017-04-12 09:43:54 UTC) #12
kouhei (in TOK)
lgtm
3 years, 8 months ago (2017-04-12 09:49:28 UTC) #13
haraken
LGTM https://codereview.chromium.org/2815663002/diff/60001/third_party/WebKit/Source/platform/heap/HeapAllocator.h File third_party/WebKit/Source/platform/heap/HeapAllocator.h (right): https://codereview.chromium.org/2815663002/diff/60001/third_party/WebKit/Source/platform/heap/HeapAllocator.h#newcode152 third_party/WebKit/Source/platform/heap/HeapAllocator.h:152: !ThreadState::Current()->IsObjectRessurectionForbidden(); Hmm, it looks confusing to change the ...
3 years, 8 months ago (2017-04-12 11:03:37 UTC) #14
keishi
Added backing expand death test. https://codereview.chromium.org/2815663002/diff/60001/third_party/WebKit/Source/platform/heap/HeapAllocator.h File third_party/WebKit/Source/platform/heap/HeapAllocator.h (right): https://codereview.chromium.org/2815663002/diff/60001/third_party/WebKit/Source/platform/heap/HeapAllocator.h#newcode152 third_party/WebKit/Source/platform/heap/HeapAllocator.h:152: !ThreadState::Current()->IsObjectRessurectionForbidden(); On 2017/04/12 11:03:37, ...
3 years, 8 months ago (2017-04-13 05:22:43 UTC) #17
haraken
LGTM
3 years, 8 months ago (2017-04-13 06:45:32 UTC) #18
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/2815663002/100001
3 years, 8 months ago (2017-04-13 06:56:31 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/361660)
3 years, 8 months ago (2017-04-13 08:37:19 UTC) #23
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/2815663002/100001
3 years, 8 months ago (2017-04-13 09:07:00 UTC) #25
commit-bot: I haz the power
Committed patchset #5 (id:100001) as https://chromium.googlesource.com/chromium/src/+/0820c8882ec4691521bb7767877abc30123177d4
3 years, 8 months ago (2017-04-13 09:38:06 UTC) #28
sof
https://codereview.chromium.org/2815663002/diff/100001/third_party/WebKit/Source/platform/wtf/HashTable.h File third_party/WebKit/Source/platform/wtf/HashTable.h (right): https://codereview.chromium.org/2815663002/diff/100001/third_party/WebKit/Source/platform/wtf/HashTable.h#newcode839 third_party/WebKit/Source/platform/wtf/HashTable.h:839: !Allocator::IsObjectResurrectionForbidden() && Isn't this redundant (as IsAllocationAllowed() also checks)? ...
3 years, 8 months ago (2017-04-15 18:57:31 UTC) #30
keishi
3 years, 8 months ago (2017-04-17 06:37:55 UTC) #31
Message was sent while issue was closed.
https://codereview.chromium.org/2815663002/diff/100001/third_party/WebKit/Sou...
File third_party/WebKit/Source/platform/wtf/HashTable.h (right):

https://codereview.chromium.org/2815663002/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/platform/wtf/HashTable.h:839:
!Allocator::IsObjectResurrectionForbidden() &&
On 2017/04/15 18:57:31, sof wrote:
> Isn't this redundant (as IsAllocationAllowed() also checks)?

Oops I modified HeapAllocator::IsAllocationAllowed by mistake. Made 
https://codereview.chromium.org/2818413002/

https://codereview.chromium.org/2815663002/diff/100001/third_party/WebKit/Sou...
File third_party/WebKit/Source/platform/wtf/Vector.h (right):

https://codereview.chromium.org/2815663002/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/platform/wtf/Vector.h:1629: if
(Allocator::IsObjectResurrectionForbidden())
On 2017/04/15 18:57:31, sof wrote:
> Why leave early for the new_capacity == 0 case?

Created fix at https://codereview.chromium.org/2816373003/

Powered by Google App Engine
This is Rietveld 408576698