[all-commits] [llvm/llvm-project] 849346: [JITLink][AArch64] Ensure that nulls remain null d...
Lang Hames via All-commits
all-commits at lists.llvm.org
Thu Feb 27 20:20:06 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 84934674907781c50494a125889ed16e23de2b9f
https://github.com/llvm/llvm-project/commit/84934674907781c50494a125889ed16e23de2b9f
Author: Lang Hames <lhames at gmail.com>
Date: 2025-02-28 (Fri, 28 Feb 2025)
Changed paths:
M llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
A llvm/test/ExecutionEngine/JITLink/AArch64/MachO_ptrauth-null-global.s
Log Message:
-----------
[JITLink][AArch64] Ensure that nulls remain null during ptrauth signing.
Signing a null pointer value can, and usually will, result in some high bits
being set, causing null checks to fail. E.g. in
extern void __attribute__((weak_import)) f(void);
void (*p) = &f;
if f is undefined then p should be null (left unsigned).
This patch updates lowerPointer64AuthEdgesToSigningFunction to check for
Pointer64Authenticated edges to null targets. Where found, these edges are
turned into plain Pointer64 edges (which we know from context will write a null
value to the fixup location), and signing instructions for these locations are
omitted from the signing function.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list