FIX #1980: must check for ThreadRelocated in killThread#
authorSimon Marlow <simonmar@microsoft.com>
Mon, 17 Dec 2007 16:46:10 +0000 (16:46 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Mon, 17 Dec 2007 16:46:10 +0000 (16:46 +0000)
rts/Exception.cmm

index 6815b79..39a2aba 100644 (file)
@@ -214,6 +214,11 @@ killThreadzh_fast
      * If the exception went to a catch frame, we'll just continue from
      * the handler.
      */
+  loop:
+    if (StgTSO_what_next(target) == ThreadRelocated::I16) {
+        target = StgTSO_link(target);
+        goto loop;
+    }
     if (target == CurrentTSO) {
        SAVE_THREAD_STATE();
        /* ToDo: what if the current thread is blocking exceptions? */