[PATCH] D112098: [ASan] Added stack safety support in address sanitizer.

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 26 16:46:12 PDT 2021


vitalybuka accepted this revision.
vitalybuka added a comment.
This revision is now accepted and ready to land.

Can you please fix in a separate patch llvm::runPassPipeline: it runs ModulePass after the function pass for -passes=asan-pipeline



================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1509
 
+  if (ClUseStackSafety && SSGI != nullptr && findAllocaForValue(Ptr) &&
+      SSGI->stackAccessIsSafe(*Inst)) {
----------------



================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1528
   if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
-    if (!ClInstrumentReads || ignoreAccess(LI->getPointerOperand()))
+    if (!ClInstrumentReads || ignoreAccess(I, LI->getPointerOperand()))
       return;
----------------
using poiter after the cast looks cleaner to me
"ignoreAccess(LI, LI->"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112098



More information about the cfe-commits mailing list