Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/73b314432f9e062e9cf733a85b10f7efea52db20 >--------------------------------------------------------------- commit 73b314432f9e062e9cf733a85b10f7efea52db20 Author: Joey Adams <joeyadams3.14...@gmail.com> Date: Mon Dec 31 22:21:40 2012 -0500 Fix T7160 segfault by importing debugBelch2 >--------------------------------------------------------------- tests/rts/T7160.hs | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/rts/T7160.hs b/tests/rts/T7160.hs index 8f5ef43..a92ae2c 100644 --- a/tests/rts/T7160.hs +++ b/tests/rts/T7160.hs @@ -3,9 +3,10 @@ import GHC.ForeignPtr import GHC.Ptr import System.Mem --- one should really use own C function rather than this varargs one to avoid --- possible ABI issues -foreign import ccall "&debugBelch" fun :: FunPtr (Ptr () -> Ptr () -> IO ()) +-- Don't use debugBelch() directly, because we cannot call varargs functions +-- using the FFI (doing so produces a segfault on 64-bit Linux, for example). +-- See Debug.Trace.traceIO, which also uses debugBelch2. +foreign import ccall "&debugBelch2" fun :: FunPtr (Ptr () -> Ptr () -> IO ()) new name = do p <- newForeignPtr_ (Ptr name) _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc