[compiler-rt] r269834 - [esan] Fix isShadowMem endpoint bug
Derek Bruening via llvm-commits
llvm-commits at lists.llvm.org
Tue May 17 13:44:09 PDT 2016
Author: bruening
Date: Tue May 17 15:44:09 2016
New Revision: 269834
URL: http://llvm.org/viewvc/llvm-project?rev=269834&view=rev
Log:
[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).
Modified:
compiler-rt/trunk/lib/esan/esan_shadow.h
Modified: compiler-rt/trunk/lib/esan/esan_shadow.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/esan/esan_shadow.h?rev=269834&r1=269833&r2=269834&view=diff
==============================================================================
--- compiler-rt/trunk/lib/esan/esan_shadow.h (original)
+++ compiler-rt/trunk/lib/esan/esan_shadow.h Tue May 17 15:44:09 2016
@@ -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;
More information about the llvm-commits
mailing list