[compiler-rt] 14362bf - [scudo] Don't enabled MTE for small alignment
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 14 12:04:36 PDT 2021
Author: Vitaly Buka
Date: 2021-07-14T12:04:16-07:00
New Revision: 14362bf1b2589f8a769709be599f24ab7eee6d6e
URL: https://github.com/llvm/llvm-project/commit/14362bf1b2589f8a769709be599f24ab7eee6d6e
DIFF: https://github.com/llvm/llvm-project/commit/14362bf1b2589f8a769709be599f24ab7eee6d6e.diff
LOG: [scudo] Don't enabled MTE for small alignment
Differential Revision: https://reviews.llvm.org/D105954
Added:
Modified:
compiler-rt/lib/scudo/standalone/memtag.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/scudo/standalone/memtag.h b/compiler-rt/lib/scudo/standalone/memtag.h
index cd8d95a3f7563..c48e228fbe44f 100644
--- a/compiler-rt/lib/scudo/standalone/memtag.h
+++ b/compiler-rt/lib/scudo/standalone/memtag.h
@@ -319,7 +319,8 @@ inline void *addFixedTag(void *Ptr, uptr Tag) {
template <typename Config>
inline constexpr bool allocatorSupportsMemoryTagging() {
- return archSupportsMemoryTagging() && Config::MaySupportMemoryTagging;
+ return archSupportsMemoryTagging() && Config::MaySupportMemoryTagging &&
+ (1 << SCUDO_MIN_ALIGNMENT_LOG) >= archMemoryTagGranuleSize();
}
} // namespace scudo
More information about the llvm-commits
mailing list