X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsStartup.c;h=fbebdb9c41d2513a12a3163a0a627cc74b0885d0;hb=5892af0e08fdb890b5a0b9a64346d9f7773a6ed8;hp=f221ad8b13b34b813d3a09c57c9384a09511a8cb;hpb=addff19a9c6ee89e36cb966988aa9f868ae2e4a6;p=ghc-hetmet.git diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index f221ad8..fbebdb9 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -225,6 +225,20 @@ hs_init(int *argc, char **argv[]) /* initialise the stable pointer table */ initStablePtrTable(); + /* Add some GC roots for things in the base package that the RTS + * knows about. We don't know whether these turn out to be CAFs + * or refer to CAFs, but we have to assume that they might. + */ + getStablePtr((StgPtr)base_GHCziTopHandler_runIO_closure); + getStablePtr((StgPtr)base_GHCziTopHandler_runNonIO_closure); + getStablePtr((StgPtr)stackOverflow_closure); + getStablePtr((StgPtr)heapOverflow_closure); + getStablePtr((StgPtr)runFinalizerBatch_closure); + getStablePtr((StgPtr)unpackCString_closure); + getStablePtr((StgPtr)blockedOnDeadMVar_closure); + getStablePtr((StgPtr)nonTermination_closure); + getStablePtr((StgPtr)blockedIndefinitely_closure); + /* initialise the shared Typeable store */ initTypeableStore();