#5003: test 4038 (ghci) fails on OS X 64 bit.
-------------------------------+--------------------------------------------
    Reporter:  gwright         |       Owner:  gwright      
        Type:  bug             |      Status:  new          
    Priority:  normal          |   Component:  GHCi         
     Version:  7.0.2           |    Keywords:               
    Testcase:                  |   Blockedby:               
          Os:  MacOS X         |    Blocking:               
Architecture:  x86_64 (amd64)  |     Failure:  Runtime crash
-------------------------------+--------------------------------------------
Changes (by michalt):

 * cc: michal.terepeta@… (added)


Comment:

 I've got similar problem on x86-64 Linux but only with ghc compiled code,
 not
 ghci. For me `4038` simply segfaults when compiled. The interesting thing
 is
 that if I change the test to
 {{{
 f :: Int -> IO Int
 f 0 = return 42
 f n = do
   putStrLn $ "first: " ++ show n
   f' <- wrap_f_io f
   putStrLn $ "second: " ++ show n
   f_io f' (n-1)
 }}}
 Then the result is:
 {{{
  ~/develop/ghc/inplace/bin/ghc-stage2 --make -fforce-recomp 4038 -rtsopts
 -debug && ./4038
 [1 of 1] Compiling Main             ( 4038.hs, 4038.o )
 Linking 4038 ...
 first: 1000
 second: 1000
 first: 999
 second: 999
 first: 998
 second: 998
 [...]
 first: 501
 second: 501
 first: 500
 second: 500
 Segmentation fault
 }}}
 When running gdb on it
 {{{
 [...]
 first: 501
 second: 501
 first: 500
 second: 500

 Program received signal SIGSEGV, Segmentation fault.
 0x00000000006e5ce3 in stg_ap_p_info ()
 }}}
 So it segfaults also in `stg_ap_p_info`.

 This seems a bit too similar to be unrelated, so maybe the issue is not
 limited
 to OS X? Or am I just hitting different bug?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5003#comment:5>
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