Fix object unloading in GHCi
Previously when checking for unloading object code we would skip pointers in the payload, which causes missing references to closures in dynamically loaded code. We now check all pointers in closure payloads.
This basically implements yet another heap traversal -- very similar to the ones we have in
NonMovingMark.c. Unfortunately we don't have a generic traversal code parametric over how to visit a payload location, so I had to duplicate code ... Would be good to eliminate this somehow.
- Enables unloading in
- Adds a regression test. The test looks very similar to T16525a, but it actually triggers a segfault in GHC HEAD while T16525a doesn't.
- Removes an incorrect
Linker.cin debug builds.