• erikchen's avatar
    OOP HP accounting fix for thread destruction frees. · 26b06001
    erikchen authored
    Previously, OOP HP relied on base TLS to implement its re-entrancy bit. Base TLS
    cannot be used after thread destruction has started. This means that frees that
    occurred during thread destruction were not being logged.
    
    This CL implements a very simple cross-platform TLS re-entrancy bit. Since it's
    only a single bit, the data can be stored in the TLS value without needing any
    additional allocations. This means that it can be safely used during thread
    destruction.
    
    With this CL, frees that occur in thread destruction will be correctly recorded.
    Allocations still depend on base TLS, so they will be missed.
    
    Bug: 839416
    Change-Id: I2e1aab9de73122f234a4b11b826e491c347dcfd5
    TBR: gab@chromium.org
    Reviewed-on: https://chromium-review.googlesource.com/1076448Reviewed-by: default avatarRichard Coles <torne@chromium.org>
    Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#563033}
    26b06001
thread_local_storage.h 6.15 KB