summaryrefslogtreecommitdiff
path: root/rts/Sanity.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-11-26 16:04:20 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-11-26 16:04:20 +0000
commit770dd8113b313be8c1db889e82c4a8bf8a553ad5 (patch)
tree3672a82f9bff5317a91d274d1b1a9fac9cd729ca /rts/Sanity.c
parentfc3ed3199e11aa4b9434e52436d98083ddac0cd0 (diff)
downloadhaskell-770dd8113b313be8c1db889e82c4a8bf8a553ad5.tar.gz
Check tag bits on the fun pointer of a PAP
Diffstat (limited to 'rts/Sanity.c')
-rw-r--r--rts/Sanity.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rts/Sanity.c b/rts/Sanity.c
index dcb6e5b5ea..25a76c0000 100644
--- a/rts/Sanity.c
+++ b/rts/Sanity.c
@@ -235,6 +235,9 @@ checkPAP (StgClosure *fun, StgClosure** payload, StgWord n_args)
n_args );
break;
}
+
+ ASSERT(fun_info->f.arity > TAG_MASK ? GET_CLOSURE_TAG(fun) == 1
+ : GET_CLOSURE_TAG(fun) == fun_info->f.arity);
}