[all-commits] [llvm/llvm-project] 191e06: [JITLink][MachO][arm64] Don't lower ptrauth edges ...

Lang Hames via All-commits all-commits at lists.llvm.org
Tue Apr 1 04:18:45 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 191e0622e84a215c1d632412561c2fe6ccd86170
      https://github.com/llvm/llvm-project/commit/191e0622e84a215c1d632412561c2fe6ccd86170
  Author: Lang Hames <lhames at gmail.com>
  Date:   2025-04-01 (Tue, 01 Apr 2025)

  Changed paths:
    M llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
    A llvm/test/ExecutionEngine/JITLink/AArch64/MachO_ptrauth_noolloc_sections.yaml

  Log Message:
  -----------
  [JITLink][MachO][arm64] Don't lower ptrauth edges in noalloc-lifetime sections.

Ptrauth relocations can only be fixed up in the executing process, but noalloc
sections do not have any memory in the executing process. Failure to skip
ptrauth edges results in signing instructions that operate on invalid addresses,
leading to segfaults or data corruption.

Ignoring noalloc sections for ptrauth lowering purposes allows the ptrauth
edges to persist until they reach the applyFixup method, at which point they
raise a useful error and cleanly terminate linking.



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