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

Issue 1259893002: Fix FreeList::zapFreedMemory to fail "use-of-uninitialized-value" on MSAN (Closed)

Created:
5 years, 5 months ago by kojii
Modified:
5 years, 3 months ago
CC:
blink-reviews, Mads Ager (chromium), oilpan-reviews, blink-reviews-wtf_chromium.org, kouhei+heap_chromium.org, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix FreeList::zapFreedMemory to fail "use-of-uninitialized-value" on MSAN A CL for fallback font collection[1] broke MSAN bots[2] and was reverted. Another try to fix[2] also fails on MSAN bots at FreeList::zapFreeMemory[3]. This patch allows zapFreeMemory to write to uninitialized memory. [1] https://codereview.chromium.org/1241613006/ [2] https://codereview.chromium.org/1244973003/ [3] http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_msan_rel_ng/builds/84 BUG=514099 Committed: https://crrev.com/021efec808267f79934050714f4732961fe14c47 git-svn-id: svn://svn.chromium.org/blink/trunk@199701 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add 3 defined(MEMORY_SANITIZER) #

Patch Set 3 : Not to addToFreeList #

Total comments: 2

Patch Set 4 : Use msan_poison #

Patch Set 5 : Revert to PS3 #

Patch Set 6 : PS4 without __msan_[un]poison #

Total comments: 4

Patch Set 7 : Add TODO comments #

Patch Set 8 : Changed TODO with name #

Total comments: 1

Patch Set 9 : Change TODO name #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -2 lines) Patch
M Source/platform/heap/Heap.h View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -1 line 0 comments Download
M Source/platform/heap/Heap.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M Source/wtf/AddressSanitizer.h View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 62 (11 generated)
kojii
PTAL. Got an advice from yutak@, but I'm not familiar with these code.
5 years, 5 months ago (2015-07-27 04:13:44 UTC) #2
haraken
On 2015/07/27 04:13:44, kojii wrote: > PTAL. Got an advice from yutak@, but I'm not ...
5 years, 5 months ago (2015-07-27 05:05:44 UTC) #4
Yuta Kitamura
In my understanding, MSAN detects the read access for "address[i] != reuseAllowedZapValue" as it reads ...
5 years, 5 months ago (2015-07-27 05:46:25 UTC) #6
haraken
On 2015/07/27 05:46:25, Yuta Kitamura wrote: > In my understanding, MSAN detects the read access ...
5 years, 5 months ago (2015-07-27 05:47:58 UTC) #7
Yuta Kitamura
On 2015/07/27 05:47:58, haraken wrote: > I'm wondering why _only_ this pace needs NO_SANITIZE_MSAN. In ...
5 years, 5 months ago (2015-07-27 05:54:21 UTC) #8
haraken
On 2015/07/27 05:54:21, Yuta Kitamura wrote: > On 2015/07/27 05:47:58, haraken wrote: > > I'm ...
5 years, 5 months ago (2015-07-27 06:08:45 UTC) #9
sof
Why does this only fail with the CL reverted?
5 years, 5 months ago (2015-07-27 06:26:42 UTC) #11
kojii
On 2015/07/27 05:46:25, Yuta Kitamura wrote: > > https://codereview.chromium.org/1259893002/diff/1/Source/platform/heap/Heap.cpp > File Source/platform/heap/Heap.cpp (right): > > ...
5 years, 5 months ago (2015-07-27 06:26:45 UTC) #12
kojii
On 2015/07/27 06:26:42, sof wrote: > Why does this only fail with the CL reverted? ...
5 years, 5 months ago (2015-07-27 06:52:45 UTC) #13
kojii
Looks like it does not help the flakiness in addToFreeList, I'll leave it from this ...
5 years, 4 months ago (2015-07-27 08:16:56 UTC) #14
Alexander Potapenko
Looks like you're fine, any other insight needed? https://codereview.chromium.org/1259893002/diff/40001/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/1259893002/diff/40001/Source/platform/heap/Heap.h#newcode81 Source/platform/heap/Heap.h:81: #if ...
5 years, 4 months ago (2015-07-27 09:39:20 UTC) #15
Alexander Potapenko
https://codereview.chromium.org/1259893002/diff/40001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1259893002/diff/40001/Source/platform/heap/Heap.cpp#newcode1177 Source/platform/heap/Heap.cpp:1177: // See the comment in addToFreeList(). NO_SANITIZE_MEMORY will remove ...
5 years, 4 months ago (2015-07-27 09:45:00 UTC) #16
kojii
On 2015/07/27 09:45:00, Alexander Potapenko wrote: > https://codereview.chromium.org/1259893002/diff/40001/Source/platform/heap/Heap.cpp > File Source/platform/heap/Heap.cpp (right): > > https://codereview.chromium.org/1259893002/diff/40001/Source/platform/heap/Heap.cpp#newcode1177 ...
5 years, 4 months ago (2015-07-27 11:08:56 UTC) #17
Alexander Potapenko
First, I assume you need to zap the freed memory despite ASan and MSan are ...
5 years, 4 months ago (2015-07-27 11:32:48 UTC) #18
kojii
On 2015/07/27 11:32:48, Alexander Potapenko wrote: > First, I assume you need to zap the ...
5 years, 4 months ago (2015-07-28 00:21:13 UTC) #19
sof
haraken@: what benefit does freed-mem zapping bring if *San is enabled? (i.e., would it be ...
5 years, 4 months ago (2015-07-28 05:41:13 UTC) #20
haraken
On 2015/07/28 05:41:13, sof wrote: > haraken@: what benefit does freed-mem zapping bring if *San ...
5 years, 4 months ago (2015-07-28 06:02:06 UTC) #21
sof
On 2015/07/28 06:02:06, haraken wrote: > On 2015/07/28 05:41:13, sof wrote: > > haraken@: what ...
5 years, 4 months ago (2015-07-28 06:07:11 UTC) #22
haraken
On 2015/07/28 06:07:11, sof wrote: > On 2015/07/28 06:02:06, haraken wrote: > > On 2015/07/28 ...
5 years, 4 months ago (2015-07-28 06:11:18 UTC) #23
sof
On 2015/07/28 06:11:18, haraken wrote: > On 2015/07/28 06:07:11, sof wrote: > > On 2015/07/28 ...
5 years, 4 months ago (2015-07-28 06:18:36 UTC) #24
haraken
On 2015/07/28 06:18:36, sof wrote: > On 2015/07/28 06:11:18, haraken wrote: > > On 2015/07/28 ...
5 years, 4 months ago (2015-07-28 06:33:26 UTC) #25
sof
On 2015/07/28 06:33:26, haraken wrote: > On 2015/07/28 06:18:36, sof wrote: > > On 2015/07/28 ...
5 years, 4 months ago (2015-07-28 06:39:20 UTC) #26
haraken
On 2015/07/28 06:39:20, sof wrote: > On 2015/07/28 06:33:26, haraken wrote: > > On 2015/07/28 ...
5 years, 4 months ago (2015-07-28 06:48:58 UTC) #27
sof
On 2015/07/28 06:48:58, haraken wrote: > On 2015/07/28 06:39:20, sof wrote: > > On 2015/07/28 ...
5 years, 4 months ago (2015-07-28 06:51:22 UTC) #28
haraken
On 2015/07/28 06:51:22, sof wrote: > On 2015/07/28 06:48:58, haraken wrote: > > On 2015/07/28 ...
5 years, 4 months ago (2015-07-28 06:56:35 UTC) #29
sof
On 2015/07/28 06:56:35, haraken wrote: > On 2015/07/28 06:51:22, sof wrote: > > On 2015/07/28 ...
5 years, 4 months ago (2015-07-28 07:02:33 UTC) #30
kojii
PTAL. Reverted to PS3. This CL: 1. is likely a "harmless though not ideal". 2. ...
5 years, 4 months ago (2015-07-29 06:42:15 UTC) #31
Alexander Potapenko
Can you please elaborate which problem this CL fixes? The description says "Fix FreeList::zapFreedMemory to ...
5 years, 4 months ago (2015-07-29 08:51:05 UTC) #32
Alexander Potapenko
Can you please elaborate which problem this CL fixes? The description says "Fix FreeList::zapFreedMemory to ...
5 years, 4 months ago (2015-07-29 08:51:07 UTC) #33
kojii
On 2015/07/29 08:51:07, Alexander Potapenko wrote: > Can you please elaborate which problem this CL ...
5 years, 4 months ago (2015-07-29 08:57:23 UTC) #34
Alexander Potapenko
On 2015/07/29 08:57:23, kojii wrote: > On 2015/07/29 08:51:07, Alexander Potapenko wrote: > > Can ...
5 years, 4 months ago (2015-07-29 09:14:14 UTC) #35
kojii
On 2015/07/29 09:14:14, Alexander Potapenko wrote: > On 2015/07/29 08:57:23, kojii wrote: > > On ...
5 years, 4 months ago (2015-07-29 09:36:45 UTC) #36
Alexander Potapenko
On 2015/07/29 09:36:45, kojii wrote: > On 2015/07/29 09:14:14, Alexander Potapenko wrote: > > On ...
5 years, 4 months ago (2015-07-29 10:05:10 UTC) #37
kojii
On 2015/07/29 10:05:10, Alexander Potapenko wrote: > > > > I have to admit that ...
5 years, 4 months ago (2015-07-29 10:30:53 UTC) #38
kojii
PTAL. All bots passed, including ASAN and MSAN. Hope I understand what you meant correctly.
5 years, 4 months ago (2015-07-29 13:36:17 UTC) #39
Alexander Potapenko
LGTM (please add a TODO before submitting) https://codereview.chromium.org/1259893002/diff/100001/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/1259893002/diff/100001/Source/platform/heap/Heap.h#newcode83 Source/platform/heap/Heap.h:83: FreeList::zapFreedMemory(address, size); ...
5 years, 4 months ago (2015-07-29 13:39:42 UTC) #40
kojii
Added TODO comments. Thank you so much for this long and deep support. On behalf ...
5 years, 4 months ago (2015-07-29 14:30:06 UTC) #41
haraken
Thanks for driving this effort! platform/heap/ LGTM. TODO => TODO(someone's name)
5 years, 4 months ago (2015-07-29 14:40:50 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259893002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259893002/140001
5 years, 4 months ago (2015-07-29 16:35:35 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/38706)
5 years, 4 months ago (2015-07-29 16:40:28 UTC) #47
kojii
tkent@, could you PTAL for Source/wtf/AddressSanitizer.h?
5 years, 4 months ago (2015-07-29 16:46:02 UTC) #49
tkent
https://codereview.chromium.org/1259893002/diff/140001/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/1259893002/diff/140001/Source/platform/heap/Heap.h#newcode82 Source/platform/heap/Heap.h:82: // TODO(tkent): We actually need __msan_poison/unpoison here, but it'll ...
5 years, 4 months ago (2015-07-29 22:28:15 UTC) #50
kojii
On 2015/07/29 22:28:15, tkent wrote: > https://codereview.chromium.org/1259893002/diff/140001/Source/platform/heap/Heap.h > File Source/platform/heap/Heap.h (right): > > https://codereview.chromium.org/1259893002/diff/140001/Source/platform/heap/Heap.h#newcode82 > ...
5 years, 4 months ago (2015-07-30 02:08:35 UTC) #51
tkent
lgtm
5 years, 4 months ago (2015-07-30 02:26:07 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259893002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259893002/160001
5 years, 4 months ago (2015-07-30 02:26:16 UTC) #55
commit-bot: I haz the power
Committed patchset #9 (id:160001) as https://src.chromium.org/viewvc/blink?view=rev&revision=199701
5 years, 4 months ago (2015-07-30 03:22:54 UTC) #56
kojii
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/1257303003/ by kojii@chromium.org. ...
5 years, 4 months ago (2015-07-30 04:27:58 UTC) #57
kojii
FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/WebKit/Source/platform/heap/blink_platform.Heap.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DCHROMIUM_BUILD -DCR_CLANG_REVISION=242792-1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 ...
5 years, 4 months ago (2015-07-30 04:30:57 UTC) #58
Alexander Potapenko
> Fixed. Learned TODO name is who wrote it, not who signed up to do ...
5 years, 4 months ago (2015-07-30 08:53:49 UTC) #60
kojii
On 2015/07/30 08:53:49, Alexander Potapenko wrote: > > Fixed. Learned TODO name is who wrote ...
5 years, 4 months ago (2015-07-30 12:54:50 UTC) #61
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 11:55:01 UTC) #62
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/021efec808267f79934050714f4732961fe14c47

Powered by Google App Engine
This is Rietveld 408576698