[Haskell-cafe] Getting a segmentation fault when starting/stopping the RTS, from C, several times.

Brandon Allbery allbery.b at gmail.com
Wed Jul 11 05:35:32 CEST 2012


On Tue, Jul 10, 2012 at 10:55 PM, Captain Freako <capn.freako at gmail.com>wrote:

> Hi experts,
>
> Should I expect the following C code to run to completion, or am I trying
> to do something that was never intended?
>

Quoth the Fine Manual (8.2.1.1. Using your own
main()<http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#using-own-main>
):

There can be multiple calls to hs_init(), but each one should be matched by
one (and only one) call to
hs_exit()[14<http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#ftn.id740774>
].

So this should theoretically work.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120710/0d12e0d0/attachment.htm>


More information about the Haskell-Cafe mailing list