Remove 'no_sanitize_memtag'. Add 'sanitize_memtag'.
For MTE globals, we should have clang emit the attribute for all GV's that it creates, and then use that in the upcoming AArch64 global tagging IR pass. We need a positive attribute for this sanitizer (rather than implicit sanitization of all globals) because it needs to interact with other parts of LLVM, including: 1. Suppressing certain global optimisations (like merging), 2. Emitting extra directives by the ASM writer, and 3. Putting extra information in the symbol table entries. While this does technically make the LLVM IR / bitcode format non-backwards-compatible, nobody should have used this attribute yet, because it's a no-op. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D128950
This commit is contained in:
@@ -1234,7 +1234,7 @@ static_assert(sizeof(GlobalValue::SanitizerMetadata) <= sizeof(unsigned),
|
||||
static unsigned
|
||||
serializeSanitizerMetadata(const GlobalValue::SanitizerMetadata &Meta) {
|
||||
return Meta.NoAddress | (Meta.NoHWAddress << 1) |
|
||||
(Meta.NoMemtag << 2) | (Meta.IsDynInit << 3);
|
||||
(Meta.Memtag << 2) | (Meta.IsDynInit << 3);
|
||||
}
|
||||
|
||||
/// Emit top-level description of module, including target triple, inline asm,
|
||||
|
||||
Reference in New Issue
Block a user