[all-commits] [llvm/llvm-project] ba31ed: Disable memtag sanitization for global fnptrs goin...
Mitch Phillips via All-commits
all-commits at lists.llvm.org
Wed Nov 1 03:43:42 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ba31ed472577aea1f4b5d6669bb1e717aaf1fb4f
https://github.com/llvm/llvm-project/commit/ba31ed472577aea1f4b5d6669bb1e717aaf1fb4f
Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
Date: 2023-11-01 (Wed, 01 Nov 2023)
Changed paths:
M clang/test/CodeGen/memtag-globals-asm.cpp
M llvm/lib/Target/AArch64/AArch64GlobalsTagging.cpp
Log Message:
-----------
Disable memtag sanitization for global fnptrs going into .ctors (#70186)
Looks like there's code out there that, instead of using
'__attribute__((constructor(x)))' to add constructor functions, they
just declare a global function pointer and use
'__attribute__((section('.ctors')))' instead.
Problem is, with memtag-globals, we pad the global function pointer to
be 16 bytes large. This of course means we have an 8-byte real function
pointer, then 8 bytes of zero padding, and this trips up the loader when
it processes this section.
Fixes #69939
More information about the All-commits
mailing list