]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Document and assert that needs_self_check of VexTranslateArgs
authorFlorian Krohm <florian@eich-krohm.de>
Fri, 23 Sep 2011 18:03:21 +0000 (18:03 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Fri, 23 Sep 2011 18:03:21 +0000 (18:03 +0000)
must not be NULL.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2207

VEX/priv/main_main.c
VEX/pub/libvex.h

index 79685a2cd8b8c4f6a26c7702f129cdb5df75a4d1..9f6379aebc01cabcc02a4fd4cbc36fefee18e189 100644 (file)
@@ -228,6 +228,8 @@ VexTranslateResult LibVEX_Translate ( VexTranslateArgs* vta )
    vex_traceflags = vta->traceflags;
 
    vassert(vex_initdone);
+   vassert(vta->needs_self_check != NULL);
+
    vexSetAllocModeTEMP_and_clear();
    vexAllocSanityCheck();
 
index ea8248b49dc1e2f5fdbc9c1b7a0bf6e610ab8fbe..f40340af93da7a63da920570ed65543906edf04d 100644 (file)
@@ -539,10 +539,10 @@ typedef
       IRSB* (*finaltidy) ( IRSB* );
 
       /* IN: a callback used to ask the caller which of the extents,
-         if any, a self check is required for.  The returned value is
-         a bitmask with a 1 in position i indicating that the i'th
-         extent needs a check.  Since there can be at most 3 extents,
-         the returned values must be between 0 and 7. */
+         if any, a self check is required for.  Must not be NULL.
+         The returned value is a bitmask with a 1 in position i indicating
+         that the i'th extent needs a check.  Since there can be at most
+         3 extents, the returned values must be between 0 and 7. */
       UInt (*needs_self_check)( /*callback_opaque*/void*,
                                 VexGuestExtents* );