summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonmar <unknown>2001-03-02 14:25:04 +0000
committersimonmar <unknown>2001-03-02 14:25:04 +0000
commit2efbfc25ca8c9b79cc74a470c49a3cb73016d410 (patch)
tree85ff5af896136dddf71b4649e5548fd626b5b1a4
parentac76dbc441fa9d716109d107e27187c12e7d1946 (diff)
downloadhaskell-2efbfc25ca8c9b79cc74a470c49a3cb73016d410.tar.gz
[project @ 2001-03-02 14:25:04 by simonmar]
A good bug: detectBlackHoles wasn't checking for ThreadRelocated, which is why we sometimes get "no threads to run: infinite loop or deadlock?" when we should get a NonTermination exception. To be merged into the 4.08 branch.
-rw-r--r--ghc/rts/Schedule.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c
index 18efd8e443..a835c7e643 100644
--- a/ghc/rts/Schedule.c
+++ b/ghc/rts/Schedule.c
@@ -1,5 +1,5 @@
/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.91 2001/02/12 13:14:13 simonmar Exp $
+ * $Id: Schedule.c,v 1.92 2001/03/02 14:25:04 simonmar Exp $
*
* (c) The GHC Team, 1998-2000
*
@@ -2978,6 +2978,11 @@ detectBlackHoles( void )
for (t = all_threads; t != END_TSO_QUEUE; t = t->global_link) {
+ while (t->what_next == ThreadRelocated) {
+ t = t->link;
+ ASSERT(get_itbl(t)->type == TSO);
+ }
+
if (t->why_blocked != BlockedOnBlackHole) {
continue;
}