FFI: passing 6 FD arguments doesn't work
George Russell
ger at tzi.de
Tue Sep 3 11:34:45 EDT 2002
uname -a:
SunOS titania 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-1
ghc --version:
The Glorious Glasgow Haskell Compilation System, version 5.04
gcc --version:
2.95.3
With the files in the attached archive unpacked:
ghc hw5.c TestHW5.hs -ffi -package posix -o hw5 -Wall
./hw5
produces output
"Hello World"
(it works).
ghc hw.c TestHW.hs -ffi -package posix -o hw -Wall
./hw
produces output
"Illegal Instruction"
(it doesn't work).
However the only difference between the two is that the C function
called by TestHW.hs has 6 arguments of type Fd, while that called
by TestHW5.hs has only 5.
I hope this gets fixed soon; I have just spent an embarassing amount of
time tracking down this bug, and I wouldn't like it to bit anyone else.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hw.tar.gz
Type: application/octet-stream
Size: 479 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20020903/8e71ea79/hw.tar.obj
More information about the Glasgow-haskell-bugs
mailing list