]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
DW_OP_mod should do unsigned arithmetic. Closes #223656.
authorTom Hughes <tom@compton.nu>
Thu, 21 Jan 2010 10:19:46 +0000 (10:19 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 21 Jan 2010 10:19:46 +0000 (10:19 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11028

coregrind/m_debuginfo/d3basics.c

index 4585894c945828099da6218e1779662963dc4642..e4d4ed1c36802c236911c20bcc14322ad4419156 100644 (file)
@@ -770,12 +770,12 @@ GXResult ML_(evaluate_Dwarf3_Expr) ( UChar* expr, UWord exprszB,
             PUSH(sw1);
             break;
          case DW_OP_mod:
-            POP(sw2);
-            if (sw2 == 0)
+            POP(uw2);
+            if (uw2 == 0)
                FAIL("evaluate_Dwarf3_Expr: division by zero");
-            POP(sw1);
-            sw1 %= sw2;
-            PUSH(sw1);
+            POP(uw1);
+            uw1 %= uw2;
+            PUSH(uw1);
             break;
 #define BINARY(name, op, s) \
          case DW_OP_##name:            \