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

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 14 11:10:02 PDT 2018


cryptoad added inline comments.


================
Comment at: lib/scudo/scudo_allocator.cpp:392
                                    uptr Size) {
-    const bool BypassQuarantine = (Quarantine.GetCacheSize() == 0) ||
-        (Size > QuarantineChunksUpToSize);
----------------
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?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D50655





More information about the llvm-commits mailing list