[compiler-rt] b270c3f - [NFC][compiler-rt][hwasan] Move shadow bound variables to hwasan.cpp

Leonard Chan via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 12 10:16:40 PDT 2021


Author: Leonard Chan
Date: 2021-07-12T10:16:28-07:00
New Revision: b270c3fbdeae62d4e1aeb90d848eec4fdd22b5de

URL: https://github.com/llvm/llvm-project/commit/b270c3fbdeae62d4e1aeb90d848eec4fdd22b5de
DIFF: https://github.com/llvm/llvm-project/commit/b270c3fbdeae62d4e1aeb90d848eec4fdd22b5de.diff

LOG: [NFC][compiler-rt][hwasan] Move shadow bound variables to hwasan.cpp

This way, other platforms can define these values.

Differential Revision: https://reviews.llvm.org/D105744

Added: 
    

Modified: 
    compiler-rt/lib/hwasan/hwasan.cpp
    compiler-rt/lib/hwasan/hwasan_linux.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/hwasan/hwasan.cpp b/compiler-rt/lib/hwasan/hwasan.cpp
index 8be2ff2ae2401..cbe0dee66dcda 100644
--- a/compiler-rt/lib/hwasan/hwasan.cpp
+++ b/compiler-rt/lib/hwasan/hwasan.cpp
@@ -50,6 +50,11 @@ bool hwasan_init_is_running;
 
 int hwasan_report_count = 0;
 
+uptr kLowShadowStart;
+uptr kLowShadowEnd;
+uptr kHighShadowStart;
+uptr kHighShadowEnd;
+
 void Flags::SetDefaults() {
 #define HWASAN_FLAG(Type, Name, DefaultValue, Description) Name = DefaultValue;
 #include "hwasan_flags.inc"

diff  --git a/compiler-rt/lib/hwasan/hwasan_linux.cpp b/compiler-rt/lib/hwasan/hwasan_linux.cpp
index 01d316c0a9ff9..c1569b90a9e4b 100644
--- a/compiler-rt/lib/hwasan/hwasan_linux.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_linux.cpp
@@ -69,10 +69,6 @@ static void ProtectGap(uptr addr, uptr size) {
 
 uptr kLowMemStart;
 uptr kLowMemEnd;
-uptr kLowShadowEnd;
-uptr kLowShadowStart;
-uptr kHighShadowStart;
-uptr kHighShadowEnd;
 uptr kHighMemStart;
 uptr kHighMemEnd;
 


        


More information about the llvm-commits mailing list