[PATCH] D60593: [GwpAsan] Introduce GWP-ASan.
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 30 14:24:41 PDT 2019
hctim added inline comments.
================
Comment at: compiler-rt/lib/gwp_asan/options.inc:28
+GWP_ASAN_OPTION(
+ unsigned long, SampleRate, 5000,
+ "The probability (1 / SampleRate) that an allocation is selected for "
----------------
vlad.tsyrklevich wrote:
> morehouse wrote:
> > I think this needs to be `uint64` or `unsigned long long`.
> Feels like this should still be uint64/ULL (2^63 comment is otherwise not right on 32-bit platforms.)
Was trying to work out a solution around the fact that the sanitizer flag parser doesn't support uint64_t. I've created a patch to support `long long` in sanitizer_common which we can then truncate if > 64bits.
Signed-ness of this doesn't really matter as we multiply by two in `init()` anyway. We can't directly convert to an unsigned 64-bit value as `internal_strtoll` doesn't support unsigned 64-bit values (they internally use `s64` and typedef it to `long long`).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60593/new/
https://reviews.llvm.org/D60593
More information about the llvm-commits
mailing list