]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix assertion failure in decode_V8_instruction. Fixes #372794.
authorJulian Seward <jseward@acm.org>
Tue, 10 Jan 2017 16:05:14 +0000 (16:05 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 10 Jan 2017 16:05:14 +0000 (16:05 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@3289

VEX/priv/guest_arm_toIR.c

index ef5a79b263992934746f3a6ee1c23407a5c84067..6005a3adf2a4782bd7c41ca2d66a231bb26dc4a3 100644 (file)
@@ -13348,12 +13348,14 @@ static Bool decode_V8_instruction (
         }
         else /*NOTREACHED*/vassert(0);
      }
-     // Paranoia ..
-     vassert(szBlg2 <= 3);
-     if (szBlg2 < 3) { vassert(tt2 == 16/*invalid*/); }
-                else { vassert(tt2 <= 14); }
-     if (isLoad) { vassert(dd == 16/*invalid*/); }
-            else { vassert(dd <= 14); }
+     if (gate) {
+        // Paranoia ..
+        vassert(szBlg2 <= 3);
+        if (szBlg2 < 3) { vassert(tt2 == 16/*invalid*/); }
+                   else { vassert(tt2 <= 14); }
+        if (isLoad) { vassert(dd == 16/*invalid*/); }
+               else { vassert(dd <= 14); }
+     }
      // If we're still good even after all that, generate the IR.
      if (gate) {
         /* First, go unconditional.  Staying in-line is too complex. */