#3215: Calling freeHaskellFunPtr on the current function
-------------------+--------------------------------------------------------
Reporter:  cmcq    |          Owner:                
    Type:  bug     |         Status:  new           
Priority:  normal  |      Component:  Runtime System
 Version:  6.10.3  |       Severity:  normal        
Keywords:          |       Testcase:                
      Os:  Linux   |   Architecture:  x86           
-------------------+--------------------------------------------------------
 This is based on code in gtk2hs.

 $ valgrind -q ./finalizer_queue

 finalizer_queue: internal error: stg_ap_v_ret
     (GHC version 6.10.3 for i386_unknown_linux)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
 Killed

 Unfortunately this test doesn't crash without Valgrind.

 My guess is that this bit is the problem:

     finalizer <- fixIO $ \dPtr -> mkThunk $ do
         freeHaskellFunPtr callback
         freeHaskellFunPtr dPtr

 Perhaps the documentation should say not to do this?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3215>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to