add a MAYBE_GC() in killThread#, fixes throwto003(threaded2) looping
[ghc-hetmet.git] / rts / Exception.cmm
index 55c79ce..af84692 100644 (file)
@@ -218,6 +218,8 @@ stg_killThreadzh
     
     /* Needs 3 words because throwToSingleThreaded uses some stack */
     STK_CHK_GEN( WDS(3), R1_PTR & R2_PTR, stg_killThreadzh);
+    /* We call allocate in throwTo(), so better check for GC */
+    MAYBE_GC(R1_PTR & R2_PTR, stg_killThreadzh);
 
     /* 
      * We might have killed ourselves.  In which case, better be *very*