[GHC] #3215: Valgrind support

GHC trac at galois.com
Sun May 17 11:58:43 EDT 2009


#3215: Valgrind support
-----------------------------+----------------------------------------------
 Reporter:  cmcq             |          Owner:          
     Type:  feature request  |         Status:  reopened
 Priority:  normal           |      Milestone:          
Component:  Runtime System   |        Version:  6.10.3  
 Severity:  trivial          |     Resolution:          
 Keywords:  valgrind         |       Testcase:  yes     
       Os:  Linux            |   Architecture:  x86     
-----------------------------+----------------------------------------------
Comment (by cmcq):

 On x86 Linux, libffi is only used for allocating code. From "darcs changes
 rts/Adjustor.c":
 {{{
 Tue Apr  8 19:34:34 BST 2008  Simon Marlow <simonmar at microsoft.com>
   * Import libffi-3.0.4, and use it to provide FFI support in GHCi
   ...
   There is also code in the RTS to use libffi in place of
   rts/Adjustor.c, but it is currently not enabled if we already have
   support in Adjustor.c for the current platform.  We need to assess the
   performance impact before using libffi here too (in GHCi we don't care
   too much about performance).
 }}}

 The libffi source doesn't mention Valgrind so there's no explicit support.
 I couldn't get a test that fails. From a quick look at its source, a
 libffi trampoline's code is based on its address. Hence the only way
 Valgrind's code cache could become incoherent is if ffi_closure_alloc
 returns addresses such that a trampoline overlaps previous trampolines.

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


More information about the Glasgow-haskell-bugs mailing list