Hugs on Windows, FFI

Brian Smith <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.hugs
Message-ID <[email protected]>
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.