Ticket #7715 (new bug)
threadDelay causes segfault on Mac if compiled by 32bit GHC
| Reported by: | kazu-yamamoto | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 7.8.1 |
| Component: | Compiler | Version: | 7.7 |
| Keywords: | Cc: | pho@… | |
| Operating System: | MacOS X | Architecture: | x86 |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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 ()
Change History
Note: See
TracTickets for help on using
tickets.
