[GHC] #6130: Weak pointer to MVar is finalized, even though MVar is still accessible
GHC
cvs-ghc at haskell.org
Mon Jun 4 11:23:38 CEST 2012
#6130: Weak pointer to MVar is finalized, even though MVar is still accessible
---------------------------------+------------------------------------------
Reporter: jmillikin | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.4.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by simonmar):
* difficulty: => Unknown
Comment:
I suspect this is just because the weak pointer is attached to the box,
and not the primitive `MVar#` object underneath, and when optimisation is
turned on GHC eliminates the box. We should really have a `mkWeakMVar`
operation, just like we have `mkWeakIORef` and `mkWeakThreadId`.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6130#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list