GHCi fails when Windows XP SP2 "Data Execution Prevention" is enabled.
This happens on my system with GHCi 6.2.2, 6.5, and CVS HEAD (from two
weeks ago). Upon failure, the error message that Windows gives is:
    "To help protected your computer, Windows has closed this program."
and then:
    "ghc.exe has encountered a problem and needs to close. We are
sorry for the inconvenience." Then, the user can choose whether or not
to send an error report to Microsoft (using the same error-reporting
mechanism that is used when Internet Explorer crashes.)

Data Execution Prevention is controlled in the System Properties
(Control Panel -> System -> Advanced -> Performance -> Settings ->
Data Execution Prevention). I have mine set to "Turn on DEP for all
programs and services except...."

Workaround: If ghc.exe is added to the list of exeptions for DEP, then
the command runs without failure. Similarly, if DEP is set to "Turn on
DEP for essential Windows programs and services only," no failure is
observed.

The failure can be observed whenever GHC is run with either the (-e)
flag or the (--interactive) flag.

Using --interactive, the failure occurs after GHCi links the base package:
c:\software\ghc-6.2.2\bin\ghc --interactive:
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.2.2, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.

<failure occurs here>


The sample program illustrates the failure for (-e). The failure
occurs immediately, before Cabal even starts earching for a .cabal
file, so you should be able to experience it without needing a valid
.cabal file:

(from cmd.exe):
c:\software\ghc-6.2.2\bin\ghc -e Setup.main
c:\software\ghc-6.5\bin\runghc -fc:\software\ghc-6.5\bin\ghc.exe Setup.hs

(from MSYS 1.0 bash, with CVS HEAD of GHC installed into /usr/local):
runghc ./Setup.hs

Setup.hs:
import Distribution.Simple
main = defaultMain


- Brian
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to