diff options
author | Ben Gamari <ben@well-typed.com> | 2021-01-03 17:50:43 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-07 00:13:59 -0500 |
commit | e0e7d2bc0bbf279bef78469892421a23e25082d8 (patch) | |
tree | 9c77811488624a53a1eb40a3a7d8e066f5ea9082 /rts/sm | |
parent | 3b3fcc71bec389adbe7f6545ccb4765d7da5ea65 (diff) | |
download | haskell-e0e7d2bc0bbf279bef78469892421a23e25082d8.tar.gz |
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.
Diffstat (limited to 'rts/sm')
-rw-r--r-- | rts/sm/Sanity.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c index d3c18adbd5..193a1a884c 100644 --- a/rts/sm/Sanity.c +++ b/rts/sm/Sanity.c @@ -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)); |