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

Leonard Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 14:53:49 PST 2019


leonardchan marked an inline comment as done.
leonardchan added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1148
+  GlobalsMetadata &GlobalsMD =
+      AM.getResult<GlobalsMetadataAnalysis>(F).getGlobalsMD();
+  const TargetLibraryInfo *TLI = &AM.getResult<TargetLibraryAnalysis>(F);
----------------
philip.pfaffe wrote:
> When GlobalsMD stops being a function analysis, this won't work anymore. It might then happen that the result is not available, so you need to handle that case. IMHO that should be a hard error, but alternatively asan can either not run or compute the MD itself. In any case it should not be silent!
One question before continuing: so how can this function pass use the results of this module analysis if it's not a function pass? When turning on the debug pass manager with opt, the analysis does not actually get run. Wrapping it in a require wrapper with "-passed='require<asan-globals-md>'" allows it to run on the module pass manager, but still crashes when the function pass manager runs.

The crash is that `"This analysis pass was not registered prior to being queried"` (the GlobalsMetadataAnalysis).


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