• Benoit Lize's avatar
    [PartitionAlloc] Remove static locals used on the allocation path. · 9a868c7e
    Benoit Lize authored
    Threadsafe static local variables call into the C runtime on Windows,
    which may not be safe in the allocation path (see linked bug). Don't use
    them for code which is on this path.
    
    This is using base::LazyInstance. It currently fulfills our needs,
    though it is not ideal for a couple reasons:
    - Not guaranteed to stay independent from local statics.
    - Can allocate in some paths (mostly DCHECK()s)
    
    As such, this is temporary, and we should either make sure that
    LazyInstance is suitable, or have a replacement local to PartitionAlloc.
    
    Bug: 1126432
    Change-Id: I9cffed6f313c3fb380383a1607f0e6f27397c2a6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401469Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
    Commit-Queue: Benoit L <lizeb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#805698}
    9a868c7e
random.cc 1.78 KB