[PATCH] D120993: [PassManager] Add pretty stack entries before P->run() call.

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 09:52:58 PST 2022


aeubanks added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopPassManager.cpp:297
       TimeTraceScope TimeScope(Pass->name());
+      NewPassManagerPrettyStackEntry StackEntry(Pass->name(), L->getName());
       PassPA = Pass->run(*L, LAM, LAR, Updater);
----------------
this might be UAF if `L` is deleted in the loop pass before we crash (see `runAfterPassInvalidated` below where we don't reference `L` for this reason), but given that this is for crash stack traces, it probably doesn't matter


================
Comment at: llvm/test/Other/crash-module.ll:7
+; CHECK:      Stack dump:
+; CHECK-NEXT: 0. Program arguments: {{.+}}opt -passes=crash-module
+; CHECK-NEXT: 1. Running pass 'CrashingModulePass' on module
----------------
fhahn wrote:
> aeubanks wrote:
> > this is failing on windows, I don't think we need to be so strict on checking this line
> Was the issue that part after `Program arguments:`? I dropped that from the checks.
the presubmit said the test was failing, likely due to `opt` vs `opt.exe`, but I didn't look too closely
I think this works


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120993



More information about the llvm-commits mailing list