Re-land: [MTE] Add AArch64GlobalsTagging Pass
Adds an IR pass for -fsanitize=memtag-globals. This pass goes over the tag-capable global variables, and replaces them with a tagged global variable of the same contents. This new global variable will have its size and alignment adjusted if neccesary so that they're both a multiple of the tag granule size (16 bytes). Global merge must also be suppressed for tagged globals, as each global variable must have a unique tag. This can possibly be relaxed in future; globals that are identical in size, alignment, and content can possibly be merged. The major problem comes from tail- or head-merging, which if left unchecked, could have partially-overlapping global variables with different memory tags, leading to crashes at runtime. Reviewed By: fmayer, eugenis Differential Revision: https://reviews.llvm.org/D133392
Loading
Please sign in to comment