[PATCH] D69675: [scudo][standalone] Fix Secondary bug w/ freelist
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 31 11:47:32 PDT 2019
cryptoad added inline comments.
================
Comment at: compiler-rt/lib/scudo/standalone/secondary.h:141
+ if (ZeroContents)
+ memset(Ptr, 0, H.BlockEnd - reinterpret_cast<uptr>(Ptr));
+ return Ptr;
----------------
morehouse wrote:
> We currently release unconditionally in `deallocate`. Does this zero-out the memory?
>
> If so, we might only need to zero the first page here, not the whole allocation.
You are correct, we could technically `memset` only the portion before the first page boundary.
As you also said it's the current as I want to move the release to abide by `release_to_os_interval_ms`
This would mean that eventually it could not have been released prior to reallocation.
At this point I'd rather not take a shortcut because I feel it's going to come back to me later on.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69675/new/
https://reviews.llvm.org/D69675
More information about the llvm-commits
mailing list