kstoimenov added inline comments.

================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:812
   bool runOnFunction(Function &F) override {
+    if (ClUseStackSafety) {
+      report_fatal_error("Stack safety analysis is not supported "
----------------
fmayer wrote:
> kstoimenov wrote:
> > vitalybuka wrote:
> > > functionality of the pass should be the same, so I don't see why this is 
> > > the fatal error. so just ignore it?
> > > 
> > > btw, why don't you want to support it?
> > I would like to support it, but I am not sure how to get an instance of 
> > StackSafetyGlobalAnalysis, because in the legacy pass manger I don't have 
> > access to AnalysisManager<Function> &AM. If you know how to make this work, 
> > please let me know. 
> > 
> > As far as the report_fatal_error my logic is that if someone sets 
> > ClUseStackSafety flag they expect it to work and if it silently doesn't it 
> > is a bad user experience. 
> Maybe it would help to look at the HWASan instrumentation pass, which uses 
> the stack safety analysis for both old and new pass managers.
Thanks for the hint. I've used the HWAsan approach. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112098

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to