[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
Mon Aug 13 14:30:06 PDT 2018
cryptoad added inline comments.
================
Comment at: lib/scudo/scudo_allocator.cpp:392
uptr Size) {
- const bool BypassQuarantine = (Quarantine.GetCacheSize() == 0) ||
- (Size > QuarantineChunksUpToSize);
----------------
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.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D50655
More information about the llvm-commits
mailing list