[mlir] -test-alias-analysis bug report. Testing : <<NULL ATTRIBUTE>>
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
git version: 81a8c66fdc96a7bf6927bf3f88d4b2e24a5c71e7
system: `Ubuntu 18.04.6 LTS`
reproduce with: `mlir-opt -test-alias-analysis a.mlir`
a.mlir:
```mlir
module {
func.func @test(%arg0: memref<100xf32>, %arg1: index) -> f32 attributes {test.ptr = {llvm.ptr = "ptr_a", test.a = 123 : i64}} {
%0 = memref.load %arg0[%arg1] {sibling = 0 : i64} : memref<100xf32>
return %0 : f32
}
}
```
stack trace:
```
Testing : <>
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt -test-alias-analysis 90.mlir
#0 0x000055c4d986b0c8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x20360c8)
#1 0x000055c4d9867f61 llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2032f61)
#2 0x000055c4d986c1e6 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f43f25f3420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x000055c4e24b00d3 mlir::StringAttr::getValue() const (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xac7b0d3)
#5 0x000055c4d9979370 printAliasOperand(mlir::Value) TestAliasAnalysis.cpp:0:0
#6 0x000055c4d997982a mlir::test::TestAliasAnalysisBase::runAliasAnalysisOnOperation(mlir::Operation*, mlir::AliasAnalysis&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x214482a)
#7 0x000055c4d997b252 (anonymous namespace)::TestAliasAnalysisPass::runOnOperation() TestAliasAnalysis.cpp:0:0
#8 0x000055c4e2253662 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xaa1e662)
#9 0x000055c4e22544a4 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xaa1f4a4)
#10 0x000055c4e225b3ba mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xaa263ba)
#11 0x000055c4e225acef mlir::PassManager::run(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xaa25cef)
#12 0x000055c4d991a3c0 performActions(llvm::raw_ostream&, std::shared_ptr const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#13 0x000055c4d99195f6 llvm::LogicalResult llvm::function_ref>, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>::callback_fn>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#14 0x000055c4e25a6e55 mlir::splitAndProcessBuffer(std::unique_ptr>, llvm::function_ref>, llvm::MemoryBufferRef const&, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xad71e55)
#15 0x000055c4d9910656 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x20db656)
#16 0x000055c4d9910a35 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x20dba35)
#17 0x000055c4d9910d95 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x20dbd95)
#18 0x000055c4d9850b52 main (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x201bb52)
#19 0x00007f43f1c11083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#20 0x000055c4d985068e _start (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x201b68e)
Segmentation fault (core dumped)
```
Contributor guide
Research direction
Reproduce the crash with mlir-opt -test-alias-analysis using the supplied a.mlir input. Start in TestAliasAnalysis.cpp at printAliasOperand, as indicated by the stack trace. Done means the reproducer no longer segfaults and a regression test covers the NULL ATTRIBUTE case.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100