From e877852408abce08ce25a2171c830012cec46fb9 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 21 Jan 2010 10:19:46 +0000 Subject: [PATCH] DW_OP_mod should do unsigned arithmetic. Closes #223656. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11028 --- coregrind/m_debuginfo/d3basics.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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: \ -- 2.47.2