From 770dd8113b313be8c1db889e82c4a8bf8a553ad5 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 26 Nov 2007 16:04:20 +0000 Subject: [PATCH] Check tag bits on the fun pointer of a PAP --- rts/Sanity.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rts/Sanity.c b/rts/Sanity.c index dcb6e5b..25a76c0 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); } -- 1.7.10.4