RE: EVACUATED object entered! (when doing FFI)

It's certainly a bug of some kind. Please say what version of GHC you are using. If it's the latest one (5.04.1), please send us the source code. Thanks Simon | -----Original Message----- | From: Francis Girard [mailto:francis.girard@free.fr] | Sent: 24 October 2002 04:02 | To: glasgow-haskell-users@haskell.org | Subject: EVACUATED object entered! (when doing FFI) | | Good morning, | | I wrote a very small program, and it executed ok. | I wanted to export a function in "C", and therefore wrote a "C" wrapper | function over it to invoke peekCString and peekArray on the input; newCString | and newArray on the output. | | I then did a small "C" driver program. Everything compiled and linked | correctly. | | But at execution the program prints : | | EVACUATED object entered! | | as soon as "startupHaskell" is invoked (i.e. even before I call my foreign | exported function !) | | What is the meaning of this message ? | | Thank you | | Francis Girard | Le Conquet | France | | | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Good morning again, Thank you for answering. I am using ghc 5.04.1 I compiled myself on a linux box (Mandrake 8.2) . I'm sending you the source code. Compiled it with the following commands : ghc -ffi -c GetFNamesBckp.hs -o GetFNamesBckp.o gcc -I/opt/installed/ghc-5.04.1/lib/ghc-5.04.1/include -c cGetFNamesBckp.c -o cGetFNamesBckp.o ghc -no-hs-main GetFNamesBckp_stub.o GetFNamesBckp.o cGetFNamesBckp.o If you comment out the "foreign export" command on line 11 in GetFNamesBckp.hs and do : ghc --make Main.hs Then the executable works ! That's why I thought it had to do with FFI and memory allocation. Thank you Francis Girard Le Conquet France Le 24 Octobre 2002 09:28, Simon Peyton-Jones a écrit :
It's certainly a bug of some kind. Please say what version of GHC you are using. If it's the latest one (5.04.1), please send us the source code.
Thanks
Simon
| -----Original Message----- | From: Francis Girard [mailto:francis.girard@free.fr] | Sent: 24 October 2002 04:02 | To: glasgow-haskell-users@haskell.org | Subject: EVACUATED object entered! (when doing FFI) | | Good morning, | | I wrote a very small program, and it executed ok. | I wanted to export a function in "C", and therefore wrote a "C"
wrapper
| function over it to invoke peekCString and peekArray on the input;
newCString
| and newArray on the output. | | I then did a small "C" driver program. Everything compiled and linked | correctly. | | But at execution the program prints : | | EVACUATED object entered! | | as soon as "startupHaskell" is invoked (i.e. even before I call my
foreign
| exported function !) | | What is the meaning of this message ? | | Thank you | | Francis Girard | Le Conquet | France | | | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (2)
-
Francis Girard
-
Simon Peyton-Jones