[GHC] #985: Memory Leak in freeHaskellFunPtr

GHC trac at galois.com
Mon Nov 6 06:22:01 EST 2006


#985: Memory Leak in freeHaskellFunPtr
----------------------------------------------+-----------------------------
 Reporter:  mattcbro at earthlink.net            |          Owner:          
     Type:  bug                               |         Status:  new     
 Priority:  normal                            |      Milestone:          
Component:  Compiler                          |        Version:  6.6     
 Severity:  normal                            |     Resolution:          
 Keywords:  callback, FFI, freeHaskellFunPtr  |     Difficulty:  Unknown 
 Testcase:  provided                          |   Architecture:  Multiple
       Os:  Windows                           |  
----------------------------------------------+-----------------------------
Comment (by simonpj):

 Matthew adds (later email): by the way, why can't I get the callback to
 actually work in
 this example?  If I for example uncomment the line
 {{{
         -- pd <- cfunc pcf
 }}}
 and say print out the value of `pd`,  I get garbage values.

 Should I have used `CDouble`?  I think for windows `HsDouble` = double in
 C
 land.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/985>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list