diff options
author | Simon Marlow <marlowsd@gmail.com> | 2008-09-02 12:45:04 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2008-09-02 12:45:04 +0000 |
commit | 4e1f1196f1349286c1480c19bd3a000346a120f4 (patch) | |
tree | 7c40f147d6be47a65a8f617135389de0c9dae9ac /rts | |
parent | 880a6b90ba6d93e55a464bea585f9d7c5e4abfb3 (diff) | |
download | haskell-4e1f1196f1349286c1480c19bd3a000346a120f4.tar.gz |
FIX #2554: GHC.TopHandler.{runIO,runNonIO} should be GC roots
Diffstat (limited to 'rts')
-rw-r--r-- | rts/RtsStartup.c | 6 | ||||
-rw-r--r-- | rts/package.conf.in | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index f221ad8b13..fd84000bba 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(); diff --git a/rts/package.conf.in b/rts/package.conf.in index 7ebcbc6d22..bae12f8fc2 100644 --- a/rts/package.conf.in +++ b/rts/package.conf.in @@ -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 |