[GHC] #9765: Strange behavior of GC under ghci

GHC ghc-devs at haskell.org
Wed Nov 5 09:36:38 UTC 2014


#9765: Strange behavior of GC under ghci
-------------------------------------+-------------------------------------
              Reporter:  remdezx     |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  GHCi        |          Version:  7.8.3
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  Incorrect   |       Blocked By:
  result at runtime                  |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 I did some analysis in http://stackoverflow.com/a/26734895/946226 and it
 is the `ClosureEnv` in the `Linker` module that keeps hold of the bound
 `HValues`, even when the binding is shadowed. The `ClosureEnv` is a
 `NameEnv`, so its keys are `Uniques`, and obviously new bindings get new
 uniques, so the interpreter code should, upon adding a new binding to it,
 check if some other names are out of scope now and remove them from the
 `ClosureEnv`. This would allow them to be GC’ed (if nothing else
 references them, of course).

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9765#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list