#5371: GHCi crashes calling a C function imported from a static library on 
Windows
---------------------------------+------------------------------------------
    Reporter:  simonmar          |        Owner:            
        Type:  bug               |       Status:  new       
    Priority:  high              |    Milestone:  7.4.1     
   Component:  GHCi              |      Version:  7.3       
    Keywords:                    |     Testcase:            
   Blockedby:                    |   Difficulty:            
          Os:  Unknown/Multiple  |     Blocking:            
Architecture:  Unknown/Multiple  |      Failure:  GHCi crash
---------------------------------+------------------------------------------
 Script to reproduce:

 {{{
 cat >f.c <<EOF
 int f(int x) { return x*2; }
 EOF
 cat >TestLink.hs <<EOF
 module TestLink where
 import Foreign.C
 foreign import ccall "f" f :: CInt -> IO CInt
 test :: IO ()
 test = f 42 >>= print
 EOF
 ghc -c f.c -o f.o
 ar cqs libfoo.a f.o
 echo "test" | ghci libfoo.a TestLink.hs
 }}}

 (which is also the test `ghcilink001` I shall be adding shortly as part of
 the fix for #5289).

 Note that this bug only becomes visible after the fix for #5289, because
 before that GHCi would not load static libraries specified on the command
 line.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to