Commit 4e1f1196 authored by Simon Marlow's avatar Simon Marlow

FIX #2554: GHC.TopHandler.{runIO,runNonIO} should be GC roots

parent 880a6b90
......@@ -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();
......
......@@ -110,6 +110,8 @@ ld-options:
, "-u", "_base_GHCziIOBase_blockedIndefinitely_closure"
, "-u", "_base_ControlziExceptionziBase_nestedAtomically_closure"
, "-u", "_base_GHCziWeak_runFinalizzerBatch_closure"
, "-u", "_base_GHCziTopHandler_runIO_closure"
, "-u", "_base_GHCziTopHandler_runNonIO_closure"
#else
"-u", "ghczmprim_GHCziTypes_Izh_static_info"
, "-u", "ghczmprim_GHCziTypes_Czh_static_info"
......@@ -143,6 +145,8 @@ ld-options:
, "-u", "base_GHCziIOBase_blockedIndefinitely_closure"
, "-u", "base_ControlziExceptionziBase_nestedAtomically_closure"
, "-u", "base_GHCziWeak_runFinalizzerBatch_closure"
, "-u", "base_GHCziTopHandler_runIO_closure"
, "-u", "base_GHCziTopHandler_runNonIO_closure"
#endif
#ifdef LEADING_UNDERSCORE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment