Re: Hugs on Windows, FFI

Neil Mitchell <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.hugs
Message-ID <404396ef0509111138cc658c5__831.723857163702$1126463968$gmane$org@mail.gmail.com>
http://blogs.msdn.com/oldnewthing/archive/2003/11/04/55560.aspx

Disabling DEP is definately a workaround, if you call VirtualProtect
with the appropriate constants then it doesn't need DEP disabling.
This is definatley a better solution!

I am running an Intel machine at work, but I don't have admin so
figuring out whether DEP is enabled or not, and changing it, is
probably not going to be easy.

Thanks

Neil

On 9/11/05, Brian Smith <[email protected]> wrote:
> On 9/9/05, Neil Mitchell <[email protected]> wrote: 
> > Hi,
> > 
> > Running "make check" I get the following, dropping most of the
> > begining since it seems sensible enough. Apparently this should show
> > if FFI works on Windows?
> 
>  I noticed that your test results didn't include failures for
> Sparc.hs/Callback.hs/Sin.hs. After more investigation, I found that these
> tests only fail when Windows Data Execution Prevention (DEP) [1] is enabled.
> When I disable DEP for hugs.exe, these tests pass; when I enabled DEP then
> the tests fail. So, apparently the code that builds the thunks used for
> callbacks does not correctly set the executable/non-writable flags on the
> thunk after it is created. There was a very similar bug in GHCi/runghc that
> was fixed just a few weeks ago. 
>  
>  I think the solution to this problem is probably simple for somebody
> familiar with the GHCi solution, or somebody familiar with the Windows
> memory management API's. But, failing a fix, we should at least note this
> problem in the release notes, and the installer should automatically disable
> DEP for hugs.exe, runhugs.exe, and WinHugs.exe.
>  
> [1] http://support.microsoft.com/kb/875352
>  
>  - Brian
>  
>  
> _______________________________________________
> Cvs-hugs mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/cvs-hugs
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.