[PATCH] D87739: scudo: Add an API for disabling memory initialization per-thread.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 17 14:47:57 PDT 2020
pcc added inline comments.
================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:410
resizeTaggedChunk(PrevEnd, TaggedUserPtr + Size, BlockEnd);
- if (Size) {
+ if (UNLIKELY(FillContents != NoFill && !Header.OriginOrWasZeroed)) {
+ // If an allocation needs to be zeroed (i.e. calloc) we can normally
----------------
eugenis wrote:
> This implies that MTE mode does not support pattern init - and it's also clear from the rest of the code. Should we have setFillContents do something about that? It does not have a return value, but it could complain in stderr (not sure it's a good idea) or fall back to zero-init.
I think it would be fine to allow setting it to `PatternOrZeroFill` to go through without warning. As the name implies, it would be valid to implement it using zero init.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87739/new/
https://reviews.llvm.org/D87739
More information about the llvm-commits
mailing list