X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsStartup.c;h=fd84000bba48b3d3b402ce713286164296a1edbd;hb=e0ff87e4c56e8caf94b95e927ebd743ad3995a31;hp=f221ad8b13b34b813d3a09c57c9384a09511a8cb;hpb=addff19a9c6ee89e36cb966988aa9f868ae2e4a6;p=ghc-hetmet.git diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index f221ad8..fd84000 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -225,6 +225,12 @@ hs_init(int *argc, char **argv[]) /* initialise the stable pointer table */ initStablePtrTable(); + /* Add some GC roots (using stable pointers): these are needed by + * all foreign export stubs, so they have to be treated as + */ + getStablePtr((StgPtr)base_GHCziTopHandler_runIO_closure); + getStablePtr((StgPtr)base_GHCziTopHandler_runNonIO_closure); + /* initialise the shared Typeable store */ initTypeableStore();