summaryrefslogtreecommitdiff
path: root/rts/Sanity.c
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-04-26 11:01:15 +0000
committerIan Lynagh <igloo@earth.li>2008-04-26 11:01:15 +0000
commitbaca788631cfc07ca46ebffc538ff49e51a800b0 (patch)
treeef884be1e1b9d44d8734b0a121f3a59aa3f8fa4c /rts/Sanity.c
parent6ee9554a738c442719ded861504acb729fd3d431 (diff)
downloadhaskell-baca788631cfc07ca46ebffc538ff49e51a800b0.tar.gz
Fix an assertion
We were checking that a pointer was correctly tagged, but after we had untagged it.
Diffstat (limited to 'rts/Sanity.c')
-rw-r--r--rts/Sanity.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/rts/Sanity.c b/rts/Sanity.c
index 25a76c0000..c9a0772543 100644
--- a/rts/Sanity.c
+++ b/rts/Sanity.c
@@ -204,12 +204,13 @@ checkStackChunk( StgPtr sp, StgPtr stack_end )
}
static void
-checkPAP (StgClosure *fun, StgClosure** payload, StgWord n_args)
+checkPAP (StgClosure *tagged_fun, StgClosure** payload, StgWord n_args)
{
+ StgClosure *fun;
StgClosure *p;
StgFunInfoTable *fun_info;
- fun = UNTAG_CLOSURE(fun);
+ fun = UNTAG_CLOSURE(tagged_fun);
ASSERT(LOOKS_LIKE_CLOSURE_PTR(fun));
fun_info = get_fun_itbl(fun);
@@ -236,8 +237,8 @@ checkPAP (StgClosure *fun, StgClosure** payload, StgWord n_args)
break;
}
- ASSERT(fun_info->f.arity > TAG_MASK ? GET_CLOSURE_TAG(fun) == 1
- : GET_CLOSURE_TAG(fun) == fun_info->f.arity);
+ ASSERT(fun_info->f.arity > TAG_MASK ? GET_CLOSURE_TAG(tagged_fun) == 1
+ : GET_CLOSURE_TAG(tagged_fun) == fun_info->f.arity);
}