[PATCH] D46291: [ASan] Fix range check in AddrIsInHighShadow

David Major via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 11 07:27:19 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL332092: [ASan] Fix range check in AddrIsInHighShadow (authored by dmajor, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D46291?vs=144773&id=146323#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D46291

Files:
  compiler-rt/trunk/lib/asan/asan_mapping.h


Index: compiler-rt/trunk/lib/asan/asan_mapping.h
===================================================================
--- compiler-rt/trunk/lib/asan/asan_mapping.h
+++ compiler-rt/trunk/lib/asan/asan_mapping.h
@@ -329,12 +329,12 @@
 
 static inline bool AddrIsInHighShadow(uptr a) {
   PROFILE_ASAN_MAPPING();
-  return a >= kHighShadowBeg && a <= kHighMemEnd;
+  return a >= kHighShadowBeg && a <= kHighShadowEnd;
 }
 
 static inline bool AddrIsInMidShadow(uptr a) {
   PROFILE_ASAN_MAPPING();
-  return kMidMemBeg && a >= kMidShadowBeg && a <= kMidMemEnd;
+  return kMidMemBeg && a >= kMidShadowBeg && a <= kMidShadowEnd;
 }
 
 static inline bool AddrIsInShadow(uptr a) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46291.146323.patch
Type: text/x-patch
Size: 673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180511/e4c0e951/attachment.bin>


More information about the llvm-commits mailing list