EVACUATED object entered! (when doing FFI)

Simon Marlow simonmar@microsoft.com
Fri, 25 Oct 2002 10:43:08 +0100


> Good morning again,
>=20
> Thank you for answering.
>=20
> I am using ghc 5.04.1 I compiled myself on a linux box=20
> (Mandrake 8.2) .
>=20
> I'm sending you the source code. Compiled it with the=20
> following commands :
>=20
> ghc -ffi -c GetFNamesBckp.hs -o GetFNamesBckp.o
>=20
> gcc -I/opt/installed/ghc-5.04.1/lib/ghc-5.04.1/include -c=20
> cGetFNamesBckp.c -o=20
> cGetFNamesBckp.o
>=20
> ghc -no-hs-main GetFNamesBckp_stub.o GetFNamesBckp.o cGetFNamesBckp.o

Good bug!  In fact, it has nothing to do with the FFI, but it is a bug
in the garbage collector introduced in 5.04.1.  The fix will be in
5.04.2.

BTW, an easier way to compile your program is

    ghc -ffi -no-hs-main cGetFNamesBckp.c GetFNamesBckp.hs

Cheers,
	Simon