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

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


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:


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


More information about the ghc-devs mailing list