FFI problems on 64-bit Windows

Yitzchak Gale gale at sefer.org
Wed May 20 11:12:49 UTC 2015


As I am sure many people have noticed, there is
currently a serious problem with FFI on 64-bit
Windows. It often happens that when you link
in FFI against a standard DLL, the resulting
application segfaults as soon as any function
from the DLL is called.

I experienced this problem with Bryan's text-icu
library when I linked it against the standard
Windows 64-bit DLLs provided by the ICU
project.

In this case, the workaround I found is to link
instead against DLLs built using mingw-w64 and
provided as part of MSYS2:

https://mail.haskell.org/pipermail/haskell-cafe/2015-May/119737.html

On reddit, /u/awson (is that Kyra?) pointed out that
this issue is probably caused by a serious bug in
GNU binutils that was fixed about two months ago:

https://sourceware.org/bugzilla/show_bug.cgi?id=16598

Is it possible to update the MSYS2/mingw-w64 toolchain
used by GHC to a recent version that includes this
fix?

Thanks,
Yitz


More information about the ghc-devs mailing list