[PATCH] D60593: [GwpAsan] Introduce GWP-ASan.
Vlad Tsyrklevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 20:52:27 PDT 2019
vlad.tsyrklevich added inline comments.
================
Comment at: compiler-rt/lib/gwp_asan/guarded_pool_allocator.h:67
+ case 1:
+ NextSampleCounter = (Random::getRandomUnsigned64() % SampleRate) + 1;
+ return true;
----------------
vlad.tsyrklevich wrote:
> Random::getRandomUnsigned64() % SampleRate means we are sampling more often than the actual sampling rate. This should be % (SampleRate * 2), or, even better, sample from a geometric distribution
Woops, seems I made the same mistake in http://crrev.com/c/1400050
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