wtf, heap: Safely reinitialize deleted hash table buckets
Initializing a bucket is non-atomic because the hash table is not yet visible to the GC during initialization. When trying to recycle a deleted bucket, the bucket is reinitialized. This introduces data races with concurrent marking. To resolve the data races, we should initialize atomically. For hash table where the empty value is zero, we can atomically memset the bucket to zero. For other cases, atomically initializing is more complicated. Instead, in such cases, we prohibit reusing deleted bucket while marking is in progress. Bug: 1166985 Change-Id: I42d03371388e7cd702d2aec6c5bdfd02e2a38d4f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643716 Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by:Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#846088}
Showing
Please register or sign in to comment