Check tag bits on the fun pointer of a PAP
authorSimon Marlow <simonmar@microsoft.com>
Mon, 26 Nov 2007 16:04:20 +0000 (16:04 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Mon, 26 Nov 2007 16:04:20 +0000 (16:04 +0000)
rts/Sanity.c

index dcb6e5b..25a76c0 100644 (file)
@@ -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);
 }