[all-commits] [llvm/llvm-project] 9fa5f8: [llvm] Fix crash with -ir-dump-directory & analysi...
Miguel A. Arroyo via All-commits
all-commits at lists.llvm.org
Wed Jun 10 11:08:52 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9fa5f887d051c0ab63cfdd41dd15f0b350b20f93
https://github.com/llvm/llvm-project/commit/9fa5f887d051c0ab63cfdd41dd15f0b350b20f93
Author: Miguel A. Arroyo <miguel.arroyo at rockstargames.com>
Date: 2026-06-10 (Wed, 10 Jun 2026)
Changed paths:
M llvm/lib/Passes/StandardInstrumentations.cpp
M llvm/test/Other/dump-before-after.ll
Log Message:
-----------
[llvm] Fix crash with -ir-dump-directory & analysis passes (#202477)
The `StandardInstrumentations` were not filtering out analysis passes
(e.g. `-print-after-all`, etc).
* When printing to `stdout`, this results in additional output that is
unnecessary.
* When using `-ir-dump-directory` because the `PassID` is used for the
filename it results in an invalid file path causing the compiler to
crash. This becomes apparent with `-O1` or higher (e.g. `clang++ -mllvm
-print-before-all -mllvm -ir-dump-directory=dumpdir -O1 -S test.cpp`).
An example of the crash is shown below:
```
fatal error: error in backend: Failed to open dumpdir\18-a1a2011b35962283-module-RequireAnalysisPass<llvm::GlobalsAA, llvm::Module,
llvm::AnalysisManager<Module>>-before.ll to support -ir-dump-directory: invalid argument
```
Note that with `LLVM_ENABLE_IO_SANDBOX` the error is more ambiguous
showing up as `fatal error: error in backend: IO sandbox violation`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list