From: Julian Seward Date: Tue, 10 Jan 2017 16:05:14 +0000 (+0000) Subject: Fix assertion failure in decode_V8_instruction. Fixes #372794. X-Git-Tag: svn/VALGRIND_3_13_0^2~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b18fa9c9b33eec7d27b6c05dec33706877318826;p=thirdparty%2Fvalgrind.git Fix assertion failure in decode_V8_instruction. Fixes #372794. git-svn-id: svn://svn.valgrind.org/vex/trunk@3289 --- diff --git a/VEX/priv/guest_arm_toIR.c b/VEX/priv/guest_arm_toIR.c index ef5a79b263..6005a3adf2 100644 --- a/VEX/priv/guest_arm_toIR.c +++ b/VEX/priv/guest_arm_toIR.c @@ -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. */