- ASSERT(tso->_link == END_TSO_QUEUE || get_itbl(tso->_link)->type == TSO);
- ASSERT(LOOKS_LIKE_CLOSURE_PTR(tso->block_info.closure));
+ ASSERT(tso->_link == END_TSO_QUEUE ||
+ tso->_link->header.info == &stg_MVAR_TSO_QUEUE_info ||
+ tso->_link->header.info == &stg_TSO_info);
+
+ if ( tso->why_blocked == BlockedOnMVar
+ || tso->why_blocked == BlockedOnBlackHole
+ || tso->why_blocked == BlockedOnMsgThrowTo
+ || tso->why_blocked == NotBlocked
+ ) {
+ ASSERT(LOOKS_LIKE_CLOSURE_PTR(tso->block_info.closure));
+ }
+