From: Tom Hughes Date: Thu, 21 Jan 2010 10:19:46 +0000 (+0000) Subject: DW_OP_mod should do unsigned arithmetic. Closes #223656. X-Git-Tag: svn/VALGRIND_3_6_0~396 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e877852408abce08ce25a2171c830012cec46fb9;p=thirdparty%2Fvalgrind.git DW_OP_mod should do unsigned arithmetic. Closes #223656. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11028 --- diff --git a/coregrind/m_debuginfo/d3basics.c b/coregrind/m_debuginfo/d3basics.c index 4585894c94..e4d4ed1c36 100644 --- a/coregrind/m_debuginfo/d3basics.c +++ b/coregrind/m_debuginfo/d3basics.c @@ -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: \