]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mc_LOADVn_slow: When loading from invalid addresses, mark loaded data
authorJulian Seward <jseward@acm.org>
Fri, 22 Apr 2005 20:23:27 +0000 (20:23 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 22 Apr 2005 20:23:27 +0000 (20:23 +0000)
as defined.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3542

memcheck/mc_main.c

index 12d96a3cb15e1d79b5a5617a4da43d98380597b1..1cf794e2f612514e03b8ac312d70369d4eb2a38f 100644 (file)
@@ -322,9 +322,9 @@ static
 ULong mc_LOADVn_slow ( Addr a, SizeT szB, Bool bigendian )
 {
    /* Make up a result V word, which contains the loaded data for
-      valid addresses and Undefined for invalid addresses.  Iterate
-      over the bytes in the word, from the most significant down to
-      the least. */
+      valid addresses and Defined for invalid addresses.  Iterate over
+      the bytes in the word, from the most significant down to the
+      least. */
    ULong vw          = VGM_WORD64_INVALID;
    SizeT i           = szB-1;
    SizeT n_addrs_bad = 0;
@@ -343,7 +343,7 @@ ULong mc_LOADVn_slow ( Addr a, SizeT szB, Bool bigendian )
       if (!aok)
          n_addrs_bad++;
       vw <<= 8; 
-      vw |= 0xFF & (aok ? vbyte : VGM_BYTE_INVALID);
+      vw |= 0xFF & (aok ? vbyte : VGM_BYTE_VALID);
       if (i == 0) break;
       i--;
    }
@@ -351,8 +351,6 @@ ULong mc_LOADVn_slow ( Addr a, SizeT szB, Bool bigendian )
    if (n_addrs_bad > 0)
       MAC_(record_address_error)( VG_(get_running_tid)(), a, szB, False );
 
-   //if (n_addrs_bad == n)
-   //   vw = VGM_WORD64_VALID;
    return vw;
 }