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

Issue 2588943002: Disallow heap objects containing unsafe on-heap iterators. (Closed)

Created:
4 years ago by sof
Modified:
4 years ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disallow heap objects containing unsafe on-heap iterators. Do not allow BlinkGC managed objects to include unsafe iterators of other heap objects; that is, do not allow them to keep iterator part objects as fields. These iterators contain untraced references, which is in general unsafe practice and breaks the general rule that all heap references must be known to the GC infrastructure, and be marked and traced through. This applies to all heap collection iterators but HeapListHashSet<>'s, which can be safely traced. It is also the only collection iterator which is kept as a field of an on-heap object (CSSSegmentedFontFace.) R=haraken BUG=672030 Committed: https://crrev.com/1fb76ab1b86a2c6f1c2b8512b7bf39701a2a756f Cr-Commit-Position: refs/heads/master@{#439784}

Patch Set 1 #

Patch Set 2 : remove comment #

Patch Set 3 : insist that safe iterators are traced #

Patch Set 4 : formatting #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -59 lines) Patch
M tools/clang/blink_gc_plugin/CheckFieldsVisitor.h View 2 chunks +3 lines, -1 line 0 comments Download
M tools/clang/blink_gc_plugin/CheckFieldsVisitor.cpp View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/Config.h View 1 2 3 3 chunks +19 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/DiagnosticsReporter.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tools/clang/blink_gc_plugin/DiagnosticsReporter.cpp View 3 chunks +7 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/Edge.h View 1 2 5 chunks +30 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/Edge.cpp View 2 chunks +5 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/RecordInfo.h View 1 chunk +1 line, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/RecordInfo.cpp View 1 2 4 chunks +52 lines, -14 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/fields_illegal_tracing.h View 2 chunks +7 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/fields_illegal_tracing.txt View 1 2 2 chunks +25 lines, -7 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/heap/stubs.h View 1 2 3 2 chunks +64 lines, -35 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/stack_allocated.txt View 1 chunk +1 line, -1 line 2 comments Download

Messages

Total messages: 25 (14 generated)
sof
please take a look.
4 years ago (2016-12-19 22:24:13 UTC) #4
haraken
LGTM
4 years ago (2016-12-20 02:47:45 UTC) #5
haraken
(We could also try to remove the iterator on CSSSegmentedFontFace.)
4 years ago (2016-12-20 02:55:16 UTC) #6
sof
On 2016/12/20 02:55:16, haraken wrote: > (We could also try to remove the iterator on ...
4 years ago (2016-12-20 08:26:21 UTC) #7
sof
Updated; the GC plugin will now also check that "safe" iterators are indeed trace()d.
4 years ago (2016-12-20 11:50:55 UTC) #10
sof
Verified to build ToT (r439759) cleanly; landing.
4 years ago (2016-12-20 12:53:31 UTC) #14
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/2588943002/60001
4 years ago (2016-12-20 12:53:52 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-20 13:22:53 UTC) #20
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/1fb76ab1b86a2c6f1c2b8512b7bf39701a2a756f Cr-Commit-Position: refs/heads/master@{#439784}
4 years ago (2016-12-20 13:24:25 UTC) #22
dcheng
https://codereview.chromium.org/2588943002/diff/60001/tools/clang/blink_gc_plugin/tests/stack_allocated.txt File tools/clang/blink_gc_plugin/tests/stack_allocated.txt (right): https://codereview.chromium.org/2588943002/diff/60001/tools/clang/blink_gc_plugin/tests/stack_allocated.txt#newcode23 tools/clang/blink_gc_plugin/tests/stack_allocated.txt:23: ./heap/stubs.h:184:5: note: expanded from macro 'STACK_ALLOCATED' I think the ...
4 years ago (2016-12-20 21:23:46 UTC) #24
sof
4 years ago (2016-12-20 21:30:28 UTC) #25
Message was sent while issue was closed.
https://codereview.chromium.org/2588943002/diff/60001/tools/clang/blink_gc_pl...
File tools/clang/blink_gc_plugin/tests/stack_allocated.txt (right):

https://codereview.chromium.org/2588943002/diff/60001/tools/clang/blink_gc_pl...
tools/clang/blink_gc_plugin/tests/stack_allocated.txt:23: ./heap/stubs.h:184:5:
note: expanded from macro 'STACK_ALLOCATED'
On 2016/12/20 21:23:46, dcheng wrote:
> I think the test expectation is wrong. This is on line 178 of stubs.h, not
line
> 184, which is causing me issues for rebasing my CL. I'm just going to update
> this expectation.
> 

Thanks, please do. "git cl format" is a mixed blessing.

Powered by Google App Engine
This is Rietveld 408576698