getEnvironment segfaults under ghci 6.6 x86_64
I know this is a very old version of ghc, but thought it'd be worth reporting, since it's possible that some obscure set of circumstances may trigger it, and it seems possible that it's present in later versions of getEnvironment. The following file segfaults on two machines when I execute it with runghc:
import System.Environment ( getEnvironment )
main = do getEnvironment >>= (putStrLn . unlines . map show)
putStrLn "I'm still alive"
I'm not sure what triggers this, but it happens on two debian etch x86_64 machines, but not on my debian etch 32-bit machine. The script runs fine if I compile it with ghc --make on any of these machines. A quick shows that ghci also segfaults if I call getEnvironment.
I'd be very surprised if this isn't already fixed, but since I came across it, it seemed best to mention it. I find it somewhat puzzling that it only shows up in ghci.
David
Trac metadata
Trac field | Value |
---|---|
Version | 6.6 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |