Internal error/segfault when profiling ghc
I've encountered ghc: internal error: LDV_recordDead: Failed to find counter for closure
when profiling ghci on a large project.
Minimized reproducer:
- Build a profiled GHC:
./hadrian/build -j --flavour=perf+profiled_ghc+no_dynamic_ghc
I've reproduced on current master dd88a260.
-
Unpack profiling_bug.zip.
-
Run
cabal repl bug -w <PATH_TO_PROFILED_GHC> --repl-options='+RTS -hm -hbdrag -RTS' < /dev/null
It is also possible to get a segfault instead, by uncommenting code in A.hs
.