From: Philippe Waroquiers Date: Sun, 11 Mar 2018 14:57:46 +0000 (+0100) Subject: Fix 389373 - exp-sgcheck the 'impossible' happened as Ist_LoadG is not instrumented X-Git-Tag: VALGRIND_3_14_0~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88a591de86e76864249a6e21adbf32774b0695bf;p=thirdparty%2Fvalgrind.git Fix 389373 - exp-sgcheck the 'impossible' happened as Ist_LoadG is not instrumented So, (try to) instrument a guarded load. (there was a discussion about dropping exp-sgcheck but this was causing all tests to fail, so doing a quick fix in the meantime). --- diff --git a/NEWS b/NEWS index 5b33424a04..bbcb9625ee 100644 --- a/NEWS +++ b/NEWS @@ -90,6 +90,7 @@ where XXXXXX is the bug number as listed below. 387712 s390x cgijnl reports Conditional jump depends on uninitialised value 387773 .gnu_debugaltlink paths resolve relative to .debug file, not symlink 388862 Add replacements for wmemchr and wcsnlen on Linux +389373 exp-sgcheck the 'impossible' happened as st_LoadG is not instrumented 389065 valgrind meets gcc flag -Wlogical-op 390723 make xtree dump files world wide readable, similar to log files diff --git a/exp-sgcheck/sg_main.c b/exp-sgcheck/sg_main.c index d504afe358..9b81dceff9 100644 --- a/exp-sgcheck/sg_main.c +++ b/exp-sgcheck/sg_main.c @@ -2329,6 +2329,20 @@ void sg_instrument_IRStmt ( /*MOD*/struct _SGEnv * env, break; } + case Ist_LoadG: { + IRLoadG* lg = st->Ist.LoadG.details; + IRType type = Ity_INVALID; /* loaded type */ + IRType typeWide = Ity_INVALID; /* after implicit widening */ + IRExpr* addr = lg->addr; + typeOfIRLoadGOp(lg->cvt, &typeWide, &type); + tl_assert(type != Ity_INVALID); + instrument_mem_access( + env, sbOut, addr, sizeofIRType(type), False/*isStore*/, + sizeofIRType(hWordTy), env->curr_IP, layout + ); + break; + } + default: tl_assert(0);