[PATCH] D50655: [scudo] Fix race condition in deallocation path when Quarantine is bypassed

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 14 11:32:59 PDT 2018


eugenis accepted this revision.
eugenis added a comment.

LGTM



================
Comment at: lib/scudo/scudo_allocator.cpp:392
                                    uptr Size) {
-    const bool BypassQuarantine = (Quarantine.GetCacheSize() == 0) ||
-        (Size > QuarantineChunksUpToSize);
----------------
cryptoad wrote:
> cryptoad wrote:
> > eugenis wrote:
> > > why are you removing this condition?
> > > 
> > > (Quarantine.GetCacheSize() == 0)
> > So I moved `(Quarantine.GetCacheSize() == 0)` higher (in `init`), effectively setting `QuarantineChunksUpToSize` to 0 in that case.
> > It was something I intended to do before to consolidate the conditions into a single memory read.
> Does the answer address your concerns?
Yes it does!
Sorry I missed it.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D50655





More information about the llvm-commits mailing list