llvm / llvm/circt

Segfault when running firtool 1.60.0, standalone example included

Open
#6,557 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

```
$ firtool --version
LLVM (http://llvm.org/):
LLVM version 18.0.0git
Optimized build.
CIRCT firtool-1.60.0
```

untar [firtool-crash.tar.gz](https://github.com/llvm/circt/files/13859206/firtool-crash.tar.gz)

Run:

```
firtool --format=fir --export-module-hierarchy --verify-each=true --warn-on-unprocessed-annotations --disable-annotation-classless --disable-annotation-unknown --mlir-timing --lowering-options=emittedLineLength=2048,noAlwaysComb,disallowLocalVariables,verifLabels,locationInfoStyle=wrapInAtSquareBracket,disallowPackedArrays,omitVersionComment --repl-seq-mem-file=megaboom/mems.conf --annotation-file=anno.json --strip-debug-info --strip-fir-debug-info --extract-test-code --split-verilog --disable-all-randomization -o megaboom/ ChipLikeMegaBoomConfig.sfc.fir
```

Output:

```
ChipLikeMegaBoomConfig.sfc.fir:2:1: warning: unprocessed annotation:'firrtl.transforms.NoCircuitDedupAnnotation$' still remaining after LowerToHW
circuit TestHarness :
^
ChipLikeMegaBoomConfig.sfc.fir:2:1: warning: unprocessed annotation:'logger.LogLevelAnnotation' still remaining after LowerToHW
circuit TestHarness :
^
ChipLikeMegaBoomConfig.sfc.fir:43120:3: warning: unprocessed annotation:'freechips.rocketchip.util.RegFieldDescMappingAnnotation' still remaining after LowerToHW
module PeripheryBus :
^
ChipLikeMegaBoomConfig.sfc.fir:282740:3: warning: unprocessed annotation:'freechips.rocketchip.util.RetimeModuleAnnotation' still remaining after LowerToHW
module IntToFP :
^
ChipLikeMegaBoomConfig.sfc.fir:557900:3: warning: unprocessed annotation:'freechips.rocketchip.util.ParamsAnnotation' still remaining after LowerToHW
module BoomTile :
^
ChipLikeMegaBoomConfig.sfc.fir:696542:3: warning: unprocessed annotation:'freechips.rocketchip.util.AddressMapAnnotation' still remaining after LowerToHW
module DigitalTop :
^
generators/rocket-chip/src/main/scala/util/DescribedSRAM.scala:17:26: warning: unprocessed annotation:'freechips.rocketchip.util.SRAMAnnotation' still remaining after LowerToHW
PLEASE submit a bug report to https://github.com/llvm/circt and include the crash backtrace.
Segmentation fault (core dumped)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Extract firtool-crash.tar.gz and run the provided firtool command against ChipLikeMegaBoomConfig.sfc.fir, including the referenced megaboom/mems.conf and anno.json. Start by capturing the crash backtrace after the warnings. Done means the standalone example no longer segfaults and the command completes successfully.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.