DescriptionAvoid data race on CrossThreadPersistents during thread detachment.
As part of detaching a thread from Oilpan and emptying its heap, the
CrossThreadPersistent<>s pointing into that heap are cleared. Doing
so entails traversing the collection of such persistents and checking
their heap membership -- that traversal might race with other threads
who are not at any safepoint.
To avoid the race, insist that updates to CrossThreadPersistent<>s are
atomic along with the corresponding read when doing the above
traversal.
R=haraken
BUG=584250
Committed: https://crrev.com/09e769ad8f46553a3833223269c8b5d43db60199
Cr-Commit-Position: refs/heads/master@{#373814}
Patch Set 1 #
Messages
Total messages: 10 (5 generated)
|