[llvm] 6016455 - [JITLink][aarch64] Pointer jump stubs should have 4-byte alignment.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 6 15:30:58 PST 2023
Author: Lang Hames
Date: 2023-12-06T15:30:53-08:00
New Revision: 6016455d8810f5b19a275f3a149ab523f1821fb3
URL: https://github.com/llvm/llvm-project/commit/6016455d8810f5b19a275f3a149ab523f1821fb3
DIFF: https://github.com/llvm/llvm-project/commit/6016455d8810f5b19a275f3a149ab523f1821fb3.diff
LOG: [JITLink][aarch64] Pointer jump stubs should have 4-byte alignment.
Pointer jump stubs content was incorrectly using 1-byte alignment. This bug
flew under the radar because the ordinary instruction streams (and aligned
section starts) usually left the block 4-byte aligned anyway. The bug was
observed when an out-of-tree pass introduced new content with arbitrary sizes
into the text section.
No testcase yet: We don't have a good way to replicate the perturbation that
was caused by the out-of-tree pass.
Added:
Modified:
llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h b/llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h
index 27a90ebef3d6d6..40b9339eb5316d 100644
--- a/llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h
+++ b/llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h
@@ -646,7 +646,7 @@ inline Symbol &createAnonymousPointer(LinkGraph &G, Section &PointerSection,
inline Block &createPointerJumpStubBlock(LinkGraph &G, Section &StubSection,
Symbol &PointerSymbol) {
auto &B = G.createContentBlock(StubSection, PointerJumpStubContent,
- orc::ExecutorAddr(~uint64_t(11)), 1, 0);
+ orc::ExecutorAddr(~uint64_t(11)), 4, 0);
B.addEdge(Page21, 0, PointerSymbol, 0);
B.addEdge(PageOffset12, 4, PointerSymbol, 0);
return B;
More information about the llvm-commits
mailing list