Issue 174319
Summary mlir-opt after transform-interpreter have problem about scf.forall to scf.for
Labels
Assignees
Reporter Confen
    ### Description

`mlir-opt` crashes with a segmentation fault while running a transform dialect interpreter pipeline.
The crash happens during verification of `tensor.extract_slice` (`ExtractSliceOp::verifyInvariantsImpl`).

This appears to be triggered by the transform sequence (or by invalid IR produced by the transform), but the crash is a hard segfault instead of a clean verifier failure.

---

### Steps to Reproduce

Run:

```bash
mlir-opt transform_interpreter.mlir --scf-forall-to-for

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
 #0 0x00005e8bf5801632 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/llvm-21/bin/mlir-opt+0x1d3c632)
 #1 0x00005e8bf57fe312 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #2 0x0000714642c45330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #3 0x00005e8bf7c3dae5 mlir::tensor::__mlir_ods_local_type_constraint_TensorOps4(mlir::Operation*, mlir::Type, llvm::StringRef, unsigned int) TensorOps.cpp:0:0
 #4 0x00005e8bf7c4061b mlir::tensor::ExtractSliceOp::verifyInvariantsImpl() (/opt/llvm-21/bin/mlir-opt+0x417b61b)
 #5 0x00005e8bf7be4648 mlir::Op<mlir::tensor::ExtractSliceOp, mlir::OpTrait::ZeroRegions, mlir::OpTrait::OneResult, mlir::OpTrait::OneTypedResult<mlir::RankedTensorType>::Impl, mlir::OpTrait::ZeroSuccessors, mlir::OpTrait::AtLeastNOperands<1u>::Impl, mlir::OpTrait::AttrSizedOperandSegments, mlir::OpTrait::OpInvariants, mlir::BytecodeOpInterface::Trait, mlir::OpAsmOpInterface::Trait, mlir::ReifyRankedShapedTypeOpInterface::Trait, mlir::ConditionallySpeculatable::Trait, mlir::OpTrait::AlwaysSpeculatableImplTrait, mlir::MemoryEffectOpInterface::Trait, mlir::OffsetSizeAndStrideOpInterface::Trait>::verifyInvariants(mlir::Operation*) (/opt/llvm-21/bin/mlir-opt+0x411f648)
 #6 0x00005e8bf7be9be7 mlir::RegisteredOperationName::Model<mlir::tensor::ExtractSliceOp>::verifyInvariants(mlir::Operation*) (/opt/llvm-21/bin/mlir-opt+0x4124be7)
 #7 0x00005e8bf88fa43c (anonymous namespace)::OperationVerifier::verifyOperation(mlir::Operation&) Verifier.cpp:0:0
 #8 0x00005e8bf88fb662 std::_Function_handler<void (), llvm::LogicalResult mlir::failableParallelForEach<mlir::Operation**, void mlir::parallelForEach<mlir::Operation**, (anonymous namespace)::OperationVerifier::verifyOnExit(mlir::Operation&)::'lambda'(mlir::Operation*)>(mlir::MLIRContext*, mlir::Operation**, mlir::Operation**, (anonymous namespace)::OperationVerifier::verifyOnExit(mlir::Operation&)::'lambda'(mlir::Operation*)&&)::'lambda'(mlir::Operation**&&)>(mlir::MLIRContext*, mlir::Operation**, mlir::Operation**, (anonymous namespace)::OperationVerifier::verifyOnExit(mlir::Operation&)::'lambda'(mlir::Operation*)&&)::'lambda'()>::_M_invoke(std::_Any_data const&) Verifier.cpp:0:0
 #9 0x00005e8bf86d5841 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>>::_M_invoke(std::_Any_data const&) (/opt/llvm-21/bin/mlir-opt+0x4c10841)
#10 0x00005e8bf86d66ad std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) (/opt/llvm-21/bin/mlir-opt+0x4c116ad)
#11 0x0000714642ca1ed3 __pthread_once_slow ./nptl/pthread_once.c:118:7
#12 0x00005e8bf86d649e std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>::_M_complete_async() (/opt/llvm-21/bin/mlir-opt+0x4c1149e)
#13 0x00005e8bf86d61c3 std::_Function_handler<void (), std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()>::_M_invoke(std::_Any_data const&) (/opt/llvm-21/bin/mlir-opt+0x4c111c3)
#14 0x00005e8bfb40abd5 llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/opt/llvm-21/bin/mlir-opt+0x7945bd5)
#15 0x00005e8bfb40b5c1 void* llvm::thread::ThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::'lambda'()>>(void*) ThreadPool.cpp:0:0
#16 0x0000714642c9caa4 start_thread ./nptl/pthread_create.c:447:8
#17 0x0000714642d29c6c clone3 ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:80:0
Segmentation fault (core dumped)


_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to