[compiler-rt] 1510668 - [asan] Add missing #include of sanitizer_platform.h
Roland McGrath via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 26 18:19:16 PST 2022
Author: Roland McGrath
Date: 2022-01-26T18:19:08-08:00
New Revision: 1510668fb007c448cefb2190bf0558c63cdd5382
URL: https://github.com/llvm/llvm-project/commit/1510668fb007c448cefb2190bf0558c63cdd5382
DIFF: https://github.com/llvm/llvm-project/commit/1510668fb007c448cefb2190bf0558c63cdd5382.diff
LOG: [asan] Add missing #include of sanitizer_platform.h
The "asan/asan_mapping.h" header relies on sanitizer_platform.h
macros, but doesn't directly include the header. All the existing
uses until recently happened to be in places where some other header
had indirectly included sanitizer_platform.h first. The addition of
asan_rtl_x86_64.S was the first place to use "asan/asan_mapping.h"
alone. It so happens that its uses of the macros make having no
macros defined equivalent to SANITIZER_LINUX, so this did not affect
Linux builds. But the assembly constants in asan_rtl_x86_64.S were
wrong for Fuchsia when SANITIZER_FUCHSIA was not properly defined.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D118296
Added:
Modified:
compiler-rt/lib/asan/asan_mapping.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_mapping.h b/compiler-rt/lib/asan/asan_mapping.h
index 6ca6ee00e5c98..4ff09b103d5f2 100644
--- a/compiler-rt/lib/asan/asan_mapping.h
+++ b/compiler-rt/lib/asan/asan_mapping.h
@@ -13,6 +13,8 @@
#ifndef ASAN_MAPPING_H
#define ASAN_MAPPING_H
+#include "sanitizer_common/sanitizer_platform.h"
+
// The full explanation of the memory mapping could be found here:
// https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm
//
More information about the llvm-commits
mailing list