From c88e235f6082a3cb67b420cd4a055fc70d7f4f23 Mon Sep 17 00:00:00 2001
From: simonmar <unknown>
Date: Tue, 23 May 2000 13:57:53 +0000
Subject: [PATCH] [project @ 2000-05-23 13:57:53 by simonmar] Fix a Real
 Bug(TM) in the new code for detecting dead threads: we weren't taking into
 account the case when a ThreadRelocated is found on the all_threads list.

---
 ghc/rts/GC.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c
index 448b43bd2805..5ad4d540dca6 100644
--- a/ghc/rts/GC.c
+++ b/ghc/rts/GC.c
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: GC.c,v 1.81 2000/04/27 16:31:46 sewardj Exp $
+ * $Id: GC.c,v 1.82 2000/05/23 13:57:53 simonmar Exp $
  *
  * (c) The GHC Team 1998-1999
  *
@@ -860,11 +860,15 @@ traverse_weak_ptr_list(void)
        * the list.
        */
       switch (t->what_next) {
+      case ThreadRelocated:
+	  next = t->link;
+	  *prev = next;
+	  continue;
       case ThreadKilled:
       case ThreadComplete:
-	next = t->global_link;
-	*prev = next;
-	continue;
+	  next = t->global_link;
+	  *prev = next;
+	  continue;
       default:
       }
 
-- 
GitLab