bgamari / ghc-debug

Moved to Haskell.org GitLab.
https://gitlab.haskell.org/ghc/ghc-debug
62 stars 10 forks source link

ConstrClosure dereferences pointer to find pkg/modl/name #13

Closed mpickering closed 5 years ago

mpickering commented 5 years ago

getClosureData dereferences some additional pointers in the ConstrClosure case to work out the pkg/modl/name combination. This results in garbage when used out-of-process as the pointers point to uninitialised memory.

The correct fix is probably to change ghc-heap so that it doesn't eagerly decode these fields but returns pointers to them.

mpickering commented 5 years ago

It seems like the only decent way to implement this is to add another type parameter but I'm not that eager to do that. Perhaps because we have DWARF information it's ok to not have this.

mpickering commented 5 years ago

Now fixed.