mut_list_size calculation is off
Program:
main = print (foldr (+) 0 [ 0 .. 10000 ] :: Int)
Compile:
$ ghc-stage2 Main.hs -debug -rtsopts -O0
Run:
$ ./Main +RTS -Dg
It prints something like
mut_list_size: 16 (0 vars, 0 arrays, 0 MVARs, 0 TVARs, 0 TVAR_WATCH_QUEUEs, 0 TREC_CHUNKs, 0 TREC_HEADERs, 0 ATOMIC_INVARIANTs, 0 INVARIANT_CHECK_QUEUEs, 0 others)
So there are two objects in the mut list, but scavenge_mutable_list wasn't able to find anything. This is curious, and it seems like a bug.
Pretty much any program has this bug, mut_list_size and sum of objects found in the mut list never match.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.5 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | lowest |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | bgamari, simonmar |
| Operating system | |
| Architecture |