ghc 6.4 x86_64 appears to be interpreting foreign import "&foo" as importing the value of foo rather than the address of foo.
I wrote a test case that demonstrates this problem here http://repetae.net/john/ghc-bug.tar.gz correct output: ;./foo () 0x080774f0 0x080774f4 0xdeadbeef incorrect output: ;./foo () 0x00000000deadbeef 0xffffffffdeadbeef zsh: segmentation fault (core dumped) ./foo This is a pretty major bug. I don't know how the libraries are even working. John -- John Meacham - ârepetae.netâjohnâ _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users