segfault with C<->Haskell ping-pong, should be stack overflow
|Reported by:||as49@…||Owned by:|
|Type of failure:||Test Case:|
|Related Tickets:||Differential Revisions:|
Maybe this relates to bug #370. In the infinite sequence:
Haskell function f: alloca memory then call C func g C function g: call Haskell function f
The program terminates with a segmentation fault, rather than a stack overflow. I think I experience this problem in a real program which has a finite ping-pong sequence. I think there is actually a bug in the GC, since the segfault occurs after a very varying number of steps. It works with both, 6.2.2 and 6.4.
ghc-6.4 -fffi -c MemBug.hs membug.c
ghc-6.4 MemBug.o membug.o MemBug_stub.o
./a.out +RTS -H5m -G1
Note that any other opetions would do, too.