|
From: <sv...@va...> - 2013-01-08 14:11:33
|
sewardj 2013-01-08 14:11:25 +0000 (Tue, 08 Jan 2013)
New Revision: 13216
Log:
Companion fix to r2629: removal of specifiable default return values
in conditional dirty helper calls.
Modified files:
branches/COMEM/memcheck/mc_translate.c
Modified: branches/COMEM/memcheck/mc_translate.c (+11 -2)
===================================================================
--- branches/COMEM/memcheck/mc_translate.c 2013-01-01 22:20:12 +00:00 (rev 13215)
+++ branches/COMEM/memcheck/mc_translate.c 2013-01-08 14:11:25 +00:00 (rev 13216)
@@ -4047,7 +4047,11 @@
setHelperAnns( mce, di );
if (guard) {
di->guard = guard;
- di->dflt = Idflt_Ones;
+ /* Ideally the didn't-happen return value here would be all-ones
+ (all-undefined), so it'd be obvious if it got used
+ inadvertantly. We can get by with the IR-mandated default
+ value (0b01 repeating, 0x55 etc) as that'll still look pretty
+ undefined if it ever leaks out. */
}
stmt( 'V', mce, IRStmt_Dirty(di) );
@@ -6115,7 +6119,12 @@
);
if (guard) {
di->guard = guard;
- di->dflt = Idflt_Zeroes;
+ /* Ideally the didn't-happen return value here would be
+ all-zeroes (unknown-origin), so it'd be harmless if it got
+ used inadvertantly. We slum it out with the IR-mandated
+ default value (0b01 repeating, 0x55 etc) as that'll probably
+ trump all legitimate otags via Max32, and it's pretty
+ obviously bogus. */
}
/* no need to mess with any annotations. This call accesses
neither guest state nor guest memory. */
|