Revert "[GWP-ASan] Move random-related code in the allocator"
This reverts commit 9903b058. Causes build failures (on GCC 10.2) with the following error: In file included from /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/combined.h:29, from /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/allocator_config.h:12, from /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp:14: /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/../../gwp_asan/guarded_pool_allocator.h: In member function ‘bool gwp_asan::GuardedPoolAllocator::shouldSample()’: /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/../../gwp_asan/guarded_pool_allocator.h:82:69: error: conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘unsigned int:31’ may change value [-Werror=conversion] 82 | (getRandomUnsigned32() % (AdjustedSampleRatePlusOne - 1)) + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Loading
Please sign in to comment