foreign import "wrapper" bug on x86 platforms

Sven Panne Sven.Panne@informatik.uni-muenchen.de
Mon, 21 Jul 2003 00:09:24 +0200


FYI: I've found the reason why tests/ffi/Callback.hs fails on Intel
platforms: The x86 part of mkThunk in src/builtin.c is broken. It
simply squeezes an additional argument below the return address (the
stable pointer for calling back later), but this word is never popped.
We should probably include something like __obscure_ccall_ret_code
from GHC's fptools/ghc/rts/Adjustor.c, but it is a bit late now for
such severe stack juggling...

Cheers,
    S.