<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114751>114751</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
reference llvm::SmallVectorTemplateCommon<llvm::StringRef>::operator[](size_type) [T = llvm::StringRef]: Assertion `idx < size()' failed.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
xisang0
</td>
</tr>
</table>
<pre>
Test on commit:https://github.com/llvm/llvm-project/commit/efd8938d575d1f8058bfe220e4c672d969c82be0
step to produce:
```
mlir-opt test.mlir --one-shot-bufferize="bufferize-function-boundaries=1 test-analysis-only analysis-fuzzer-seed=23"
```
test case:
```
module {
func.func @main(%arg0: tensor<1x4x4x4xf32> , %arg1: tensor<1x1x4x2xf32> , %arg2: tensor<8xf32>, %arg4: tensor<?x1xf32>) -> (tensor<1x4x4x4xf32>, tensor<1x1x4x2xf32>, tensor<8xf32>, tensor<?x1xf32>){
return {__inplace_operands_attr__ = ["true", "true", "true"]} %arg0, %arg1, %arg2, %arg4 : tensor<1x4x4x4xf32>, tensor<1x1x4x2xf32>, tensor<8xf32>, tensor<?x1xf32>
}
}
```
crash trace:
```
mlir-opt: /home/workdir/llvm-project-19/llvm/include/llvm/ADT/SmallVector.h:291: reference llvm::SmallVectorTemplateCommon<llvm::StringRef>::operator[](size_type) [T = llvm::StringRef]: Assertion `idx < size()' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: ./mlir-opt /home/workdir/test3.mlir "--one-shot-bufferize=bufferize-function-boundaries=1 test-analysis-only analysis-fuzzer-seed=23"
#0 0x00005efa0c252998 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./mlir-opt+0x105e998)
#1 0x00005efa0c2504be llvm::sys::RunSignalHandlers() (./mlir-opt+0x105c4be)
#2 0x00005efa0c2533a8 SignalHandler(int) Signals.cpp:0:0
#3 0x00007bf353f15520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007bf353f699fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x00007bf353f15476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x00007bf353efb7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x00007bf353efb71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x00007bf353f0ce96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x00005efa0c7be1a5 void llvm::function_ref<void (mlir::Operation*)>::callback_fn<annotateOpsWithBufferizationMarkers(mlir::Operation*, mlir::bufferization::OneShotAnalysisState const&)::$_0>(long, mlir::Operation*) OneShotAnalysis.cpp:0:0
#10 0x00005efa0c35925e void mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<void (mlir::Operation*)>, mlir::WalkOrder) (./mlir-opt+0x116525e)
#11 0x00005efa0c7b7970 mlir::bufferization::analyzeOp(mlir::Operation*, mlir::bufferization::OneShotAnalysisState&, mlir::bufferization::BufferizationStatistics*) (./mlir-opt+0x15c3970)
#12 0x00005efa0c7c0401 mlir::bufferization::analyzeModuleOp(mlir::ModuleOp, mlir::bufferization::OneShotAnalysisState&, mlir::bufferization::BufferizationStatistics*) (./mlir-opt+0x15cc401)
#13 0x00005efa0c7ce8eb mlir::bufferization::insertTensorCopies(mlir::Operation*, mlir::bufferization::OneShotBufferizationOptions const&, mlir::bufferization::BufferizationStatistics*) (./mlir-opt+0x15da8eb)
#14 0x00005efa0c7c2b52 mlir::bufferization::runOneShotModuleBufferize(mlir::ModuleOp, mlir::bufferization::OneShotBufferizationOptions const&, mlir::bufferization::BufferizationStatistics*) (./mlir-opt+0x15ceb52)
#15 0x00005efa0c78b30f (anonymous namespace)::OneShotBufferizePass::runOnOperation() Bufferize.cpp:0:0
#16 0x00005efa0f4778bf mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./mlir-opt+0x42838bf)
#17 0x00005efa0f4780a2 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./mlir-opt+0x42840a2)
#18 0x00005efa0f47a84e mlir::PassManager::run(mlir::Operation*) (./mlir-opt+0x428684e)
#19 0x00005efa0f473372 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#20 0x00005efa0f472fdb llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#21 0x00005efa0f51c9b5 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (./mlir-opt+0x43289b5)
#22 0x00005efa0f46e1d2 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./mlir-opt+0x427a1d2)
#23 0x00005efa0f46e483 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x427a483)
#24 0x00005efa0f46e692 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x427a692)
#25 0x00005efa0c231b77 main (./mlir-opt+0x103db77)
#26 0x00007bf353efcd90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#27 0x00007bf353efce40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#28 0x00005efa0c2316f5 _start (./mlir-opt+0x103d6f5)
Aborted (core dumped)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzcWVtz4ygW_jXkhbILga4PfnDsdm1XTSqpTmrn0YXEkc1GBi2g6aR__RaSExvFSk9mundnti-2JQ7nfOf2gRC3Vu4UwAIl1yhZX_HO7bVZPEnL1Y5clVo8Lx7AOqwVrvThIB1iy71zrUVsiegG0c1Oun1Xzit9QHTTNL-9fM1ao_8FlUN0c5xJN1CLvGC5SLJERHVOkrysgVICcZVmVBRpUeW0BILIGpGlddBip3FrtOgq8Bb7-yglx3_95aGRZqZbhx1YN_dXeDbTCmZ2r92s7OoajPwGiK0Rpa-Xs7pTlZNazUrdKcGNBIvYOuq1zLjizbOVdqZV84xfr-ru2zcwMwsgEFtThii9CMnrwBW305i16BrAKLserrFHM_cfGMXkwKVCNEc04WZHEFtiB8pqg9gqeor7vzWjiH3CiK7wIBaNxLwgfStGA7H8KHAaj4NxxDZP0atMgWeDsnwCjlczASEYyi_dHNlC2TXGGB_DgzE24DqjfMi2W6nahlew1S0YroTdcufMdosRW2NfyZQ604HPTu_YxFWyRtkav0T5LJJn0ToFBr-Thx_n-NFdlK2PdfP6IyygynC7x87w7_eFx43oZq8PgOjmqzaPQppRk86i4tS9UlVNJ-B0Y7l-QHRzf-BN80-onDbzPWJLWvQ1Z6AGA6oC3EuzJWLLM9EHOLQNd7DSh4NWiK3OpJyRavcFau94f6fPp9NmYCNEcyu_wdY9t-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