X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FSanity.c;h=3df5aef413cdf29b3341ff1936cdb05cbb56381f;hb=bbc583766a08678d03740354bed216e268306356;hp=e90a5736e5d9e60564eff67c706b0f9bf5448c1e;hpb=04cddd339c000df6d02c90ce59dbffa58d2fe166;p=ghc-hetmet.git diff --git a/rts/Sanity.c b/rts/Sanity.c index e90a573..3df5aef 100644 --- a/rts/Sanity.c +++ b/rts/Sanity.c @@ -257,7 +257,13 @@ checkClosure( StgClosure* p ) ASSERT(!closure_STATIC(p)); } - info = get_itbl(p); + info = p->header.info; + + if (IS_FORWARDING_PTR(info)) { + barf("checkClosure: found EVACUATED closure %d", info->type); + } + info = INFO_PTR_TO_STRUCT(info); + switch (info->type) { case MVAR_CLEAN: @@ -506,10 +512,6 @@ checkClosure( StgClosure* p ) return sizeofW(StgTRecHeader); } - - case EVACUATED: - barf("checkClosure: found EVACUATED closure %d", - info->type); default: barf("checkClosure (closure type %d)", info->type); } @@ -781,13 +783,17 @@ checkThreadQsSanity (rtsBool check_TSO_too) void checkGlobalTSOList (rtsBool checkTSOs) { - extern StgTSO *all_threads; StgTSO *tso; - for (tso=all_threads; tso != END_TSO_QUEUE; tso = tso->global_link) { - ASSERT(LOOKS_LIKE_CLOSURE_PTR(tso)); - ASSERT(get_itbl(tso)->type == TSO); - if (checkTSOs) - checkTSO(tso); + nat s; + + for (s = 0; s < total_steps; s++) { + for (tso=all_steps[s].threads; tso != END_TSO_QUEUE; + tso = tso->global_link) { + ASSERT(LOOKS_LIKE_CLOSURE_PTR(tso)); + ASSERT(get_itbl(tso)->type == TSO); + if (checkTSOs) + checkTSO(tso); + } } }