[GHC] #8291: unloadObj doesn't work, unloaded_objects list keeps growing in size

GHC ghc-devs at haskell.org
Sat Sep 14 22:26:32 CEST 2013


#8291: unloadObj doesn't work, unloaded_objects list keeps growing in size
------------------------------------------------+--------------------------
        Reporter:  ezyang                       |            Owner:
            Type:  bug                          |  simonmar
        Priority:  highest                      |           Status:
       Component:  Runtime System               |  infoneeded
      Resolution:                               |        Milestone:  7.8.1
Operating System:  Unknown/Multiple             |          Version:  7.7
 Type of failure:  Incorrect result at runtime  |         Keywords:
       Test Case:  linker_unload                |     Architecture:
        Blocking:                               |  Unknown/Multiple
                                                |       Difficulty:
                                                |  Unknown
                                                |       Blocked By:
                                                |  Related Tickets:
------------------------------------------------+--------------------------

Comment (by ezyang):

 No, I don't think there's anything special. For good measure, I reproduced
 on my laptop.

 Anyway, I've tracked it down; recall that foreign export code produces an
 initializer (`compiler/deSugar/DsForeign.lhs`), which registers the
 foreign export in Test.hs as a stable pointer. Well, stable pointers
 constitute roots, so since the foreign export stable pointers are not
 getting cleaned up, it is retaining a reference to the object, preventing
 it from being freed.

 I don't know why the error is not triggering on your box.

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



More information about the ghc-tickets mailing list