[GHC] #8839: 64 bit windows executables compiled with ghc-7.8rc2 segfault when allocate more than 4G of memory

GHC ghc-devs at haskell.org
Mon Mar 3 08:25:07 UTC 2014


#8839: 64 bit windows executables compiled with ghc-7.8rc2 segfault when allocate
more than 4G of memory
----------------------------------+----------------------------------
       Reporter:  awson           |             Owner:  simonmar
           Type:  bug             |            Status:  new
       Priority:  highest         |         Milestone:  7.8.2
      Component:  Runtime System  |           Version:  7.8.1-rc2
       Keywords:                  |  Operating System:  Windows
   Architecture:  x86_64 (amd64)  |   Type of failure:  Runtime crash
     Difficulty:  Unknown         |         Test Case:
     Blocked By:                  |          Blocking:
Related Tickets:                  |
----------------------------------+----------------------------------
 Consider this:
 {{{
 -- t.hs
 import System.Environment

 main :: IO ()
 main = do
    n <- fmap (read . head) getArgs
    print $ foldr (+) (0::Int) [0 .. n]
 }}}

 Compiled with ghc-7.6.3 and ran thus:
 {{{
 ghc -O2 -rtsopts --make -o t.exe t.hs

 t.exe +RTS -K4G -RTS 250000000
 }}}
 it works fine!

 But compiled with 7.8rc2 it segfaults when amount of memory allocated
 crosses 4G mark.

 I've discovered this trying to use Agda built with ghc-7.8rc2 but quickly
 understood this is a general problem and extremely nasty one.

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


More information about the ghc-tickets mailing list