File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,14 @@ LogicalResult mlir::applyPassManagerCLOptions(PassManager &pm) {
146
146
if (!options.isConstructed ())
147
147
return failure ();
148
148
149
+ if (options->reproducerFile .getNumOccurrences () && options->localReproducer &&
150
+ pm.getContext ()->isMultithreadingEnabled ()) {
151
+ emitError (UnknownLoc::get (pm.getContext ()))
152
+ << " Local crash reproduction may not be used without disabling "
153
+ " mutli-threading first." ;
154
+ return failure ();
155
+ }
156
+
149
157
// Generate a reproducer on crash/failure.
150
158
if (options->reproducerFile .getNumOccurrences ())
151
159
pm.enableCrashReproducerGeneration (options->reproducerFile ,
Original file line number Diff line number Diff line change
1
+ // Test that attempting to create a local crash reproducer without disabling threading
2
+ // prints an error from the pass manager (as opposed to crashing with a stack trace).
3
+
4
+ // RUN: mlir-opt --verify-diagnostics --mlir-pass-pipeline-local-reproducer \
5
+ // RUN: --mlir-pass-pipeline-crash-reproducer=%t %s
6
+
7
+ // expected-error@unknown {{Local crash reproduction may not be used without disabling mutli-threading first.}}
You can’t perform that action at this time.
0 commit comments