[LowerToHW] Crash involving `TestBenchDirAnnotation`
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
I came across the following crash when running some experiments:
``` firrtl
FIRRTL version 4.0.0
circuit Foo: %[[
{
"class": "sifive.enterprise.firrtl.TestBenchDirAnnotation",
"target": "verification"
}
]]
public module Foo:
input a: UInt<1>
```
This produces the following stack trace:
```
PLEASE submit a bug report to https://github.com/llvm/circt and include the crash backtrace.
Stack dump:
0. Program arguments: firtool crash.fir -mlir-print-ir-before=lower-firrtl-to-hw
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 firtool 0x0000000105058e9c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 firtool 0x000000010505739c llvm::sys::RunSignalHandlers() + 112
2 firtool 0x0000000105059524 SignalHandler(int) + 332
3 libsystem_platform.dylib 0x000000018d9df584 _sigtramp + 56
4 firtool 0x000000010546a450 (anonymous namespace)::FIRRTLModuleLowering::runOnOperation() + 784
5 firtool 0x0000000105a217c0 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 576
6 firtool 0x0000000105a23b20 mlir::PassManager::run(mlir::Operation*) + 1036
7 firtool 0x0000000104f8b34c processBuffer(mlir::MLIRContext&, circt::firtool::FirtoolOptions&, mlir::TimingScope&, llvm::SourceMgr&, std::__1::optional>>&) + 3796
8 firtool 0x0000000104f8a3a8 processInputSplit(mlir::MLIRContext&, circt::firtool::FirtoolOptions&, mlir::TimingScope&, std::__1::unique_ptr>, std::__1::optional>>&) + 372
9 firtool 0x0000000104f85f7c executeFirtool(mlir::MLIRContext&, circt::firtool::FirtoolOptions&) + 956
10 firtool 0x0000000104f83a68 main + 332
11 dyld 0x000000018d6260e0 start + 2360
zsh: segmentation fault firtool crash.fir -mlir-print-ir-before=lower-firrtl-to-hw
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the crash with the FIRRTL input in the issue using `firtool crash.fir -mlir-print-ir-before=lower-firrtl-to-hw`. Start at `FIRRTLModuleLowering::runOnOperation()`, the only project entry point identified by the stack trace. Done means this `TestBenchDirAnnotation` input no longer causes a segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100