summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-18 00:05:42 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-23 13:43:20 -0400
commitf214349ac9a9114e564f660d0618d683e2a4f74e (patch)
tree22102a699479e9192fba3a9e5ab2b3232bdbdfe4
parentdb32bb8c704f83ef6dfe839b733274505ded6a08 (diff)
downloadhaskell-f214349ac9a9114e564f660d0618d683e2a4f74e.tar.gz
rts: Untag function field in scavenge_PAP_payload
Previously we failed to untag the function closure when scavenging the payload of a PAP, resulting in an invalid closure pointer being passed to scavenge_large_bitmap and consequently #21254. Fix this. Fixes #21254
-rw-r--r--rts/sm/Scav.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c
index b121c010ca..69ccea7bc3 100644
--- a/rts/sm/Scav.c
+++ b/rts/sm/Scav.c
@@ -337,7 +337,8 @@ scavenge_PAP_payload (StgClosure *fun, StgClosure **payload, StgWord size)
StgWord bitmap;
const StgFunInfoTable *fun_info;
- fun_info = get_fun_itbl(UNTAG_CONST_CLOSURE(fun));
+ fun = UNTAG_CLOSURE(fun);
+ fun_info = get_fun_itbl(fun);
ASSERT(fun_info->i.type != PAP);
p = (StgPtr)payload;