
#11108: Weak references related crash -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.10.2 Resolution: | Keywords: Operating System: Linux | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Saulzar): This seems to be the culprit - putting a Weak reference inside the original object by way of lazy evalution and do rec. {{{#!hs makePull :: (Weak Pull -> IO Int) -> IO Pull makePull f = do rec foo <- Pull weak f <$> newIORef [] <*> newIORef Nothing weak <- mkWeakPtr foo (Just $ print "died") return foo }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11108#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler