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

Issue 547903002: Oilpan: blink_heap_unittests: asan check failed. HeapObjectHeader::finalize zap a wrong memory for … (Closed)

Created:
6 years, 3 months ago by Daniel Chow
Modified:
6 years, 3 months ago
CC:
blink-reviews, kouhei+heap_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Oilpan: blink_heap_unittests: asan check failed. HeapObjectHeader::finalize zap a wrong memory for object without VTable 1. In the HeapObjectHeader::finalize, we zap the primary vTable entry, but we have not checked if the object has vTable. R=ager@chromium.org, oilpan-reviews@chromium.org BUG=411204 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181596

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -1 line) Patch
M Source/platform/heap/Heap.cpp View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 19 (5 generated)
Daniel Chow
6 years, 3 months ago (2014-09-06 05:59:06 UTC) #1
haraken
Just help me understand: Why is it OK to zap the primary vtable, but not ...
6 years, 3 months ago (2014-09-06 06:46:12 UTC) #2
Daniel Chow
On 2014/09/06 06:46:12, haraken wrote: > Just help me understand: Why is it OK to ...
6 years, 3 months ago (2014-09-06 07:36:54 UTC) #3
haraken
On 2014/09/06 07:36:54, Daniel Chow wrote: > On 2014/09/06 06:46:12, haraken wrote: > > Just ...
6 years, 3 months ago (2014-09-06 07:51:10 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zhishun.zhou@samsung.com/547903002/1
6 years, 3 months ago (2014-09-06 08:31:08 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/25868)
6 years, 3 months ago (2014-09-06 10:34:47 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zhishun.zhou@samsung.com/547903002/1
6 years, 3 months ago (2014-09-08 05:45:02 UTC) #10
zerny-chromium
Thanks and lgtm. Checking CQ again after unrelated win failures.
6 years, 3 months ago (2014-09-08 05:45:46 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/25975)
6 years, 3 months ago (2014-09-08 07:34:29 UTC) #13
Mads Ager (chromium)
I'm fine with landing this change. However, I would like to understand better what is ...
6 years, 3 months ago (2014-09-08 08:59:46 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zhishun.zhou@samsung.com/547903002/1
6 years, 3 months ago (2014-09-09 02:27:58 UTC) #16
commit-bot: I haz the power
Committed patchset #1 (id:1) as 181596
6 years, 3 months ago (2014-09-09 03:01:43 UTC) #17
Daniel Chow
On 2014/09/08 08:59:46, Mads Ager (chromium) wrote: > I'm fine with landing this change. However, ...
6 years, 3 months ago (2014-09-09 03:33:31 UTC) #18
Mads Ager (chromium)
6 years, 3 months ago (2014-09-09 07:41:27 UTC) #19
Message was sent while issue was closed.
On 2014/09/09 03:33:31, Daniel Chow wrote:
> On 2014/09/08 08:59:46, Mads Ager (chromium) wrote:
> > I'm fine with landing this change. However, I would like to understand
better
> > what is going on. We always round up allocations to the allocation
granularity
> > which is 8-bytes. Therefore, we should never have objects allocated that are
> > less than 8 bytes in size. I'll see if I can reproduce this and inspect the
> > object for which this is happening.
> 
> it's happened in this situation: 
> our 8-bytes allocation granularity is for (size of object + size of Header).  
> when size of object is 4, and size of HeapObjectHeader is 4, the sum meets the
> 8-bytes allocation granularity.
> for Release version on my 64-bit systems, size of BasicObjectHeader is 4 and
> size of HeapObjectHeader is 4, because  sizeof(unsigned) is 4:
> in class PLATFORM_EXPORT BasicObjectHeader :
> protected:
>     volatile unsigned m_size;   // ----> now it's 4 bytes; in old version we
use
> size_t, that's 8-bytes.

Thanks for the follow-up. That makes perfect sense. Thanks for this fix. :)

Powered by Google App Engine
This is Rietveld 408576698