|
[GHC] #677: segfault with C<->Haskell ping-pong, should be stack overflow: msg#00172lang.haskell.glasgow.bugs
#677: segfault with C<->Haskell ping-pong, should be stack overflow --------------------------------+------------------------------------------- Reporter: as49@xxxxxxxxxx | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 6.4 Severity: normal | Keywords: GC FFI Os: Linux | Difficulty: Unknown Architecture: x86 | --------------------------------+------------------------------------------- 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. The three files [http://www.cs.kent.ac.uk/people/staff/as49/membug.h membug.h] [http://www.cs.kent.ac.uk/people/staff/as49/membug.c membug.c] [http://www.cs.kent.ac.uk/people/staff/as49/MemBug.hs MemBug.hs] show this behaviour (nothing deep, but saves typing). Compile with: `ghc-6.4 -fffi -c MemBug.hs membug.c` Link with: `ghc-6.4 MemBug.o membug.o MemBug_stub.o` Run with: `./a.out +RTS -H5m -G1` Note that any other opetions would do, too. Axel. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/677> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler_______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [GHC] #608: Make the NCG able to compile the RTS, GHC |
|---|---|
| Next by Date: | CGI problem, Adrián Siles |
| Previous by Thread: | Re: [GHC] #608: Make the NCG able to compile the RTS, GHC |
| Next by Thread: | Re: [GHC] #677: segfault with C<->Haskell ping-pong, should be stack overflow, GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |