DescriptionMake copyToVector() robust against conservative GCs.
When resizing copyToVector()'s incoming vector to match the size of
the collection being copied from, do this in a manner that locks out
GCs across that vector backing store allocation.
If not, there's a risk that the collection's size might shrink across
that GC, and leave the vector as having an overestimated size.
copyToVector() will in that case unexpectedly encounter empty
elements in the tail, and fail.
This can only happen for Oilpan heap collections having weak references..
and that collection is not directly stack-reachable when a conservative
GC triggers. Rare, but copyToVector()'s obligation to make that safe
rather than its callers.
R=haraken
BUG=581698
Committed: https://crrev.com/f7ecadae84cdc1271ba7420844f143ea0e961590
Cr-Commit-Position: refs/heads/master@{#372693}
Patch Set 1 #Patch Set 2 : remove unnecessary 'template' use #
Messages
Total messages: 19 (10 generated)
|