[gwp-asan] Initialize AllocatorVersionMagic at runtime
GWP-ASan's `AllocatorState` was recently extended with a `AllocatorVersionMagic` structure required so that GWP-ASan bug reports can be understood by tools at different versions. On Fuchsia, this in included in the `scudo::Allocator` structure, and by having non-zero initializers, this effectively moved the static allocator structure from the `.bss` segment to the `.data` segment, thus increasing (significantly) the size of the libc. This CL proposes to initialize the structure with its magic numbers at runtime, allowing for the allocator to go back into the `.bss` segment. I will work on adding a test on the Scudo side to ensure that this type of changes get detected early on. Additional work is also needed to reduce the footprint of the (large) memory-tagging related structures that are currently part of the allocator. Differential Revision: https://reviews.llvm.org/D110575
Loading
Please sign in to comment