Skip to content

GHC doesn't work with Data Execution Prevention on Windows

ghci crashes just after startup, usually after displaying:

"Loading package base-1.0 ... linking ... done."

I get this message:

<<< ghc.exe - Application Error

The instruction at "0x1169f890" referenced memory at "0x1169f890". The memory could not be written

I've got a debugger that shows a dissassmbly. This is an extract (I can show send more if you want, I'm guessing it's not very useful).

1169F884 add al,0 1169F886 add al,byte ptr [eax] 1169F888 add byte ptr [eax],al 1169F88A add byte ptr [eax],al 1169F88C adc dword ptr [eax],eax 1169F88E add byte ptr [eax],al 1169F890 mov esi,dword ptr [ebp] <-- break point here 1169F893 add ebp,4 1169F896 jmp dword ptr [ebp]

My computer is an AMD Athlon 64 X2 Dual, Core Processor 4400+, 2.22 GHz, 2.00 Gb RAM. If I turn off Data Execution Prevention for the ghci process (under System Properties -> Advanced -> Performance -> Settings -> Data Execution Prevention) , ghci continues as normal and works.

I have noticed sometimes that even with the Data Execution Prevention enabled, it doesn't crash. It seems to go in phases. I think I've seen the same thing with ghc, as well as ghci, I can test more if required.

My version of ghc is 6.4.2, from the Windows .msi installer, http://haskell.org/ghc/download_ghc_642.html#windows

Trac metadata
Trac field Value
Version 6.4.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information