]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix 389373 - exp-sgcheck the 'impossible' happened as Ist_LoadG is not instrumented
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 11 Mar 2018 14:57:46 +0000 (15:57 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 11 Mar 2018 14:57:46 +0000 (15:57 +0100)
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).

NEWS
exp-sgcheck/sg_main.c

diff --git a/NEWS b/NEWS
index 5b33424a04a9ce8689fc87343d57982c0b11b999..bbcb9625ee26e01ebbdb1f6689b4434ff236aaf1 100644 (file)
--- 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
 
index d504afe35808fa722ecda30e115a4924fc47ce3a..9b81dceff98ba3d94fba232c0ea2d00428b2110e 100644 (file)
@@ -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);