Hugs on Windows, FFI

Neil Mitchell ndmitchell at gmail.com
Sun Sep 11 14:38:07 EDT 2005


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 <brianlsmith at gmail.com> wrote:
> On 9/9/05, Neil Mitchell <ndmitchell at gmail.com> 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
> Cvs-hugs at haskell.org
> http://www.haskell.org/mailman/listinfo/cvs-hugs
> 
> 
>


More information about the Cvs-hugs mailing list