Commit e0e7d2bc authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

rts/Sanity: Allow DEAD_WEAKs in weak pointer list

The weak pointer check in `checkGenWeakPtrList` previously failed to 
account for dead weak pointers. This caused `fptr01` to fail in the
`sanity` way.

Fixes #19162.
parent 3b3fcc71
Pipeline #29611 canceled with stages
......@@ -330,7 +330,7 @@ checkGenWeakPtrList( uint32_t g )
{
for (StgWeak *w = generations[g].weak_ptr_list; w != NULL; w = w->link) {
ASSERT(LOOKS_LIKE_CLOSURE_PTR(w));
ASSERT(w->header.info == &stg_WEAK_info);
ASSERT(w->header.info == &stg_WEAK_info || w->header.info == &stg_DEAD_WEAK_info);
ASSERT(LOOKS_LIKE_CLOSURE_PTR(w->key));
ASSERT(LOOKS_LIKE_CLOSURE_PTR(w->value));
ASSERT(LOOKS_LIKE_CLOSURE_PTR(w->finalizer));
......
Markdown is supported
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