From fd316eba4747cf8bb9381e06c7afc3c024e1e5c1 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 23 Aug 2010 10:46:54 +0000 Subject: [PATCH] Add a couple of missing tests for EAGER_BLACKHOLE This was leading to looping and excessive allocation, when the computation should have just blocked on the black hole. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by Christian Höner zu Siederdissen on glasgow-haskell-users. --- rts/Messages.c | 1 + rts/Threads.c | 1 + 2 files changed, 2 insertions(+) diff --git a/rts/Messages.c b/rts/Messages.c index f7cb809..5e0fa25 100644 --- a/rts/Messages.c +++ b/rts/Messages.c @@ -175,6 +175,7 @@ nat messageBlackHole(Capability *cap, MessageBlackHole *msg) // all. if (info != &stg_BLACKHOLE_info && info != &stg_CAF_BLACKHOLE_info && + info != &__stg_EAGER_BLACKHOLE_info && info != &stg_WHITEHOLE_info) { // if it is a WHITEHOLE, then a thread is in the process of // trying to BLACKHOLE it. But we know that it was once a diff --git a/rts/Threads.c b/rts/Threads.c index 25241c7..6635ed5 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -388,6 +388,7 @@ updateThunk (Capability *cap, StgTSO *tso, StgClosure *thunk, StgClosure *val) i = thunk->header.info; if (i != &stg_BLACKHOLE_info && i != &stg_CAF_BLACKHOLE_info && + i != &__stg_EAGER_BLACKHOLE_info && i != &stg_WHITEHOLE_info) { updateWithIndirection(cap, thunk, val); return; -- 1.7.10.4