• Omer Katz's avatar
    heap: Merge atomic loads of member types · 51b0a814
    Omer Katz authored
    Tracing a Member or a WeakMember first checks whether the member is
    deleted. If the check passes, the member is traced. The check and
    the trace both use atomic loads, but not the same load. This can
    result in time-of-check vs time-of-use data races. This CL merges
    both loads to a single load to avoid such issues.
    
    Furthermore, members in hash tables now might be deleted while the
    relevant entry is deleted. Since the is deleted check is performed
    on a copy, member types need to bail out on deleted values (used to
    be a DCHECK before).
    
    Bug: 986235
    Change-Id: I4307361af94081b62d159af67cdbde5666378550
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2012285
    Commit-Queue: Omer Katz <omerkatz@chromium.org>
    Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#735356}
    51b0a814
member.h 14.1 KB