[GWP-ASan] Move random-related code in the allocator
We need to have all thread specific data packed into a single `uintptr_t` for the upcoming Fuchsia support. We can move the `RandomState` into the `ThreadLocalPackedVariables`, reducing the size of `NextSampleCounter` to 31 bits (or we could reduce `RandomState` to 31 bits). We move `getRandomUnsigned32` into the platform agnostic part of the class, and `initPRNG` in the platform specific part. `ScopedBoolean` is replaced by actual assignments since non-const references to bitfields are prohibited. `random.{h,cpp}` are removed. Differential Revision: https://reviews.llvm.org/D89908
Loading
Please sign in to comment