[PATCH] D56470: [NewPM] Second attempt at porting ASan

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 4 12:59:37 PST 2019


philip.pfaffe requested changes to this revision.
philip.pfaffe added a comment.
This revision now requires changes to proceed.

Sorry, there's something I missed, comment inline.

It also sounds like we should enable inserting asan at O0, and as a followup probably do the same for msan and tsan as well.



================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:1047
+      if (LangOpts.Sanitize.has(SanitizerKind::Address)) {
+        MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
+        bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::Address);
----------------
This is wrong! Sorry I overlooked that. This pass needs to go into the last Module EP before the sanitizer is inserted.

You can't add it to MPM, it's being overwritten below.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56470





More information about the llvm-commits mailing list