|
From: Petar J. <pe...@so...> - 2017-10-17 15:32:05
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=cd1d7eb00c2a21fde127fadcd65ea91c535ac497 commit cd1d7eb00c2a21fde127fadcd65ea91c535ac497 Author: Petar Jovanovic <mip...@gm...> Date: Tue Oct 17 15:40:47 2017 +0200 mips: simplify handling of Iop_Max32U Use MIPSRH_Reg to get MIPSRH for Iop_Max32U. Without it, under specific circumstances, the code may explode and exceed Valgrind instruction buffer due to multiple calls to iselWordExpr_R through iselWordExpr_RH. Issue discovered while testing Valgrind on Android. Patch by Tamara Vlahovic. Diff: --- VEX/priv/host_mips_isel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/VEX/priv/host_mips_isel.c b/VEX/priv/host_mips_isel.c index 3f08e55..3d51919 100644 --- a/VEX/priv/host_mips_isel.c +++ b/VEX/priv/host_mips_isel.c @@ -1048,8 +1048,7 @@ static HReg iselWordExpr_R_wrk(ISelEnv * env, IRExpr * e) HReg r_dst = newVRegI(env); HReg argL = iselWordExpr_R(env, e->Iex.Binop.arg1); HReg argR = iselWordExpr_R(env, e->Iex.Binop.arg2); - MIPSRH *argRH = iselWordExpr_RH(env, False /*signed */ , - e->Iex.Binop.arg2); + MIPSRH *argRH = MIPSRH_Reg(argR); /* max (v0, s0) ------------ slt v1, v0, s0 |