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

Issue 1110853002: Oilpan: In ASan, poison all unmarked objects before start sweeping (Closed)

Created:
5 years, 8 months ago by haraken
Modified:
5 years, 7 months ago
Reviewers:
oilpan-reviews, sof1, sof
CC:
blink-reviews, oilpan-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: In ASan, poison all unmarked objects before start sweeping It seems we've disabled the verification at some point (by mistake). This CL enables the verification again. The idea is to poison all unmarked objects before start sweeping, unpoison a specific object before calling the object's finalizer. By doing this, ASan can detect an error if the finalizer touches any other on-heap object that die in the same GC cycle. BUG=420515 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194725

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 1

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -6 lines) Patch
M Source/platform/heap/Heap.h View 1 2 3 5 chunks +12 lines, -4 lines 0 comments Download
M Source/platform/heap/Heap.cpp View 1 2 3 4 chunks +44 lines, -2 lines 0 comments Download
M Source/platform/heap/ThreadState.cpp View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (3 generated)
haraken
PTAL BTW, what would happen if we poison all (not only unmarked but all) objects ...
5 years, 8 months ago (2015-04-28 02:11:17 UTC) #2
sof
https://codereview.chromium.org/1110853002/diff/1/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1110853002/diff/1/Source/platform/heap/Heap.cpp#newcode586 Source/platform/heap/Heap.cpp:586: for (BasePage* page = m_firstPage; page; page = page->next()) ...
5 years, 8 months ago (2015-04-28 06:12:24 UTC) #3
sof
If sweep happened along with marking previously & we poison on adding to the freelist, ...
5 years, 8 months ago (2015-04-28 06:17:46 UTC) #4
haraken
https://codereview.chromium.org/1110853002/diff/1/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1110853002/diff/1/Source/platform/heap/Heap.cpp#newcode586 Source/platform/heap/Heap.cpp:586: for (BasePage* page = m_firstPage; page; page = page->next()) ...
5 years, 8 months ago (2015-04-28 06:18:35 UTC) #5
haraken
On 2015/04/28 06:17:46, sof wrote: > If sweep happened along with marking previously & we ...
5 years, 8 months ago (2015-04-28 06:22:42 UTC) #6
sof
On 2015/04/28 06:22:42, haraken wrote: > On 2015/04/28 06:17:46, sof wrote: > > If sweep ...
5 years, 8 months ago (2015-04-28 06:26:18 UTC) #7
sof
lgtm. https://codereview.chromium.org/1110853002/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1110853002/diff/20001/Source/platform/heap/Heap.cpp#newcode1516 Source/platform/heap/Heap.cpp:1516: // objects are poisoned, ASan will detech an ...
5 years, 8 months ago (2015-04-28 09:15:25 UTC) #8
haraken
> https://codereview.chromium.org/1110853002/diff/20001/Source/platform/heap/Heap.cpp > File Source/platform/heap/Heap.cpp (right): > > https://codereview.chromium.org/1110853002/diff/20001/Source/platform/heap/Heap.cpp#newcode1516 > Source/platform/heap/Heap.cpp:1516: // objects are poisoned, ...
5 years, 7 months ago (2015-04-28 10:51:35 UTC) #9
haraken
On 2015/04/28 10:51:35, haraken wrote: > > > https://codereview.chromium.org/1110853002/diff/20001/Source/platform/heap/Heap.cpp > > File Source/platform/heap/Heap.cpp (right): > ...
5 years, 7 months ago (2015-04-29 16:23:31 UTC) #10
haraken
Updated the CL. I moved the poisonUnmarkedObjects() from Heap::prepareForSweep() to ThreadState::preSweep(). Because thread-local weak processing ...
5 years, 7 months ago (2015-04-30 06:21:04 UTC) #11
sof1
Den 4/30/2015 08:21, haraken@chromium.org skreiv: > Updated the CL. I moved the poisonUnmarkedObjects() from > ...
5 years, 7 months ago (2015-04-30 06:40:15 UTC) #12
haraken
On Thu, Apr 30, 2015 at 3:40 PM, Sigbjorn Finne <sof@opera.com> wrote: > Den 4/30/2015 ...
5 years, 7 months ago (2015-04-30 07:22:15 UTC) #13
haraken
I added #if 0 to the poisoning code. For our convenience to fix the bugs, ...
5 years, 7 months ago (2015-04-30 08:05:54 UTC) #14
sof
On 2015/04/30 08:05:54, haraken wrote: > I added #if 0 to the poisoning code. For ...
5 years, 7 months ago (2015-04-30 08:10:46 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1110853002/80001
5 years, 7 months ago (2015-04-30 08:17:14 UTC) #18
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://src.chromium.org/viewvc/blink?view=rev&revision=194725
5 years, 7 months ago (2015-04-30 10:43:41 UTC) #19
sof1
Den 4/30/2015 08:21, haraken@chromium.org skreiv: > ... > > Here are a couple of examples: ...
5 years, 7 months ago (2015-04-30 14:17:41 UTC) #20
haraken
> > While removing a stopping timer when finalizing a heap object, the timer > ...
5 years, 7 months ago (2015-04-30 14:22:41 UTC) #21
sof1
Den 4/30/2015 16:22, Kentaro Hara skreiv: > While removing a stopping timer when finalizing a ...
5 years, 7 months ago (2015-04-30 14:28:07 UTC) #22
haraken
> > Not all timers are on the Oilpan heap? Hmm, I'm a bit confused. ...
5 years, 7 months ago (2015-04-30 14:32:07 UTC) #23
sof1
Den 4/30/2015 16:31, Kentaro Hara skreiv: > Not all timers are on the Oilpan heap? ...
5 years, 7 months ago (2015-04-30 14:33:33 UTC) #24
haraken
5 years, 7 months ago (2015-04-30 15:48:51 UTC) #25
Message was sent while issue was closed.
Thanks, I understand the problem. Let me think about it a bit more.


On Thu, Apr 30, 2015 at 11:33 PM, Sigbjorn Finne <sof@opera.com> wrote:

> Den 4/30/2015 16:31, Kentaro Hara skreiv:
>
>>     Not all timers are on the Oilpan heap?
>>
>>
>> Hmm, I'm a bit confused. For timers that are not on the Oilpan heap,
>> that is no problem (i.e., it is just safe to touch them during
>> destructing some timer on the heap), isn't it?
>>
>>
> You'd be turning off ASan checks involving those non-heap ones, though?
>
> --sigbjorn
>



-- 
Kentaro Hara, Tokyo, Japan

To unsubscribe from this group and stop receiving emails from it, send an email
to blink-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698