[PATCH] D63231: [scudo][standalone] Introduce the combined allocator
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 15:46:10 PDT 2019
morehouse added inline comments.
================
Comment at: lib/scudo/standalone/combined.h:114
+
+ if (UNLIKELY(!getRandom(reinterpret_cast<void *>(&Cookie), sizeof(Cookie))))
+ Cookie = static_cast<u32>(getMonotonicTime() ^
----------------
cryptoad wrote:
> morehouse wrote:
> > Is this reinterpret_cast required?
> So indeed, I tried on a few platforms and it appears not to be.
> At this point I am a bit wary about extra warning inducing compiler flags, and I am actually not certain if one would trip on that.
> I am open to removing it if that feels safe "enough". WDYT?
I think it's pretty common to not worry about casting pointers to `void*`. For example, Scudo already does this on every `memset(this, ...)`.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63231/new/
https://reviews.llvm.org/D63231
More information about the llvm-commits
mailing list