Printf's in foreign code segfault on registerised amd64 ghc-6.4

Gabriel Ebner ge at gabrielebner.at
Sat Mar 12 10:09:40 EST 2005


A non-text attachment was scrubbed...
Name: Frobnicate.hs
Type: text/x-haskell
Size: 97 bytes
Desc: Frobnicate.hs
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20050312/6092a8c0/Frobnicate.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: frobnicate.c
Type: text/x-csrc
Size: 79 bytes
Desc: frobnicate.c
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20050312/6092a8c0/frobnicate.bin
-------------- next part --------------

If I compile that on amd64 (gentoo, gcc-3.4.3, glibc-2.3.4,
binutils-2.15.92.0.2) using registerised ghc-6.4 and run it, it
segfaults.  According to gdb, printf's segfaulting:

#0  0x00002aaaaafcb515 in printf () from /lib/libc.so.6
#1  0x0000000000402f3c in frobnicate () at frobnicate.c:4
#2  0x0000000000402d2d in s1oH_info ()
#3  0x0000000000000000 in ?? ()
#4  0x0000000000000000 in ?? ()

If I compile it using unregisterised ghc-6.2.2 on the same box or
using ghc-6.4 in a i386 chroot, it runs fine and prints 6378137.

      Gabriel.


More information about the Glasgow-haskell-bugs mailing list