[PATCH] D110575: [gwp-asan] Initialize AllocatorVersionMagic at runtime

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 13:14:56 PDT 2021


hctim added inline comments.


================
Comment at: compiler-rt/lib/gwp_asan/common.h:38
+// Constants for the AllocatorVersionMagic initialization.
+static constexpr uint8_t kAllocatorVersionMagic[4] = {'A', 'S', 'A', 'N'};
+static constexpr uint16_t kAllocatorVersion = 1;
----------------
Can you hoist these inside the struct (next to their declarations), and add a note that the values are copied into the struct at runtime, during `GuardedPoolAllocator::initialize()` so that GWP-ASan remains completely in the `.bss` segment?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110575/new/

https://reviews.llvm.org/D110575



More information about the llvm-commits mailing list