[esan] Fix isShadowMem endpoint bug
Fixes a bug in checking the endpoint of a shadow region and removes an invalid check (both introduced in http://reviews.llvm.org/rL269198). llvm-svn: 269834
This commit is contained in:
parent
759af30109
commit
1f6d861ac2
|
@ -149,7 +149,6 @@ bool isAppMem(uptr Mem) {
|
|||
|
||||
ALWAYS_INLINE
|
||||
uptr appToShadow(uptr App) {
|
||||
DCHECK(isAppMem(App));
|
||||
return (((App & ShadowMapping::Mask) + Mapping.Offset) >> Mapping.Scale);
|
||||
}
|
||||
|
||||
|
@ -186,7 +185,7 @@ bool isShadowMem(uptr Mem) {
|
|||
// no need to hardcode the mapping results.
|
||||
for (uptr i = 0; i < NumAppRegions; ++i) {
|
||||
if (Mem >= appToShadow(AppRegions[i].Start) &&
|
||||
Mem < appToShadow(AppRegions[i].End))
|
||||
Mem < appToShadow(AppRegions[i].End - 1) + 1)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue