[GHC] #7715: threadDelay causes segfault on Mac if compiled by 32bit GHC

GHC cvs-ghc at haskell.org
Sun Feb 24 14:34:31 CET 2013


#7715: threadDelay causes segfault on Mac if compiled by 32bit GHC
-----------------------------+----------------------------------------------
Reporter:  kazu-yamamoto     |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  7.6.2             |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown      |      Blockedby:                  
Blocking:                    |        Related:                  
-----------------------------+----------------------------------------------
 The following code causes segfault
 {{{
 main :: IO ()
 main = do
     replicateM_ 100 $ forkIO $ do
         threadDelay 1000000
         putStrLn "Hello, world!"
     threadDelay 5000000
 }}}
 if compiled with 32bit GHC head on Mac.

 64bit GHC head does not cause this problem. 32bit GHC 7.4.2 does not,
 either. I don't see this bug both on FreeBSD and Linux.

 "gdb" caught the following on each run:

 {{{
 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_PROTECTION_FAILURE at address: 0x00000005
 [Switching to process 51076 thread 0x20b]
 0x00000005 in ?? ()
 }}}

 {{{
 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_PROTECTION_FAILURE at address: 0x00000019
 [Switching to process 50933 thread 0x20b]
 0x00000019 in ?? ()
 }}}

 {{{
 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_INVALID_ADDRESS at address: 0x40e40348
 [Switching to process 51004 thread 0x20b]
 0x00f28aa5 in base_GHCziEventziPSQ_atMostzuzdszdwatMosts_info ()
 }}}

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



More information about the ghc-tickets mailing list