Commit fd316eba authored by Simon Marlow's avatar Simon Marlow
Browse files

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.  

Reported by Christian Höner zu Siederdissen <>
on glasgow-haskell-users.
parent eff182c3
......@@ -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
......@@ -388,6 +388,7 @@ updateThunk (Capability *cap, StgTSO *tso, StgClosure *thunk, StgClosure *val)
i = thunk->;
if (i != &stg_BLACKHOLE_info &&
i != &stg_CAF_BLACKHOLE_info &&
i != &__stg_EAGER_BLACKHOLE_info &&
i != &stg_WHITEHOLE_info) {
updateWithIndirection(cap, thunk, val);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment