[PATCH] D97409: [dfsan] Record dfsan metadata in globals

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 10:20:49 PST 2021


morehouse added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1224
+  (void)Mod->getOrInsertGlobal(
+      "__dfsan_shadow_width_bits", PrimitiveShadowTy, [&] {
+        auto *GV = new GlobalVariable(
----------------
If these globals have `PrimitiveShadowTy` type, will we have to declare multiple weak globals in the runtime (i.e. one that's int8 and one thats int16)?

Why not make it an `int` or `size_t` to simplify the runtime side?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97409



More information about the llvm-commits mailing list