[all-commits] [llvm/llvm-project] e8cc4d: [ORC][MachO] Fix deferred action handling during M...

Lang Hames via All-commits all-commits at lists.llvm.org
Thu Jan 9 23:13:20 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e8cc4d24bce8e12023c460ff7f11495cb42d5315
      https://github.com/llvm/llvm-project/commit/e8cc4d24bce8e12023c460ff7f11495cb42d5315
  Author: Lang Hames <lhames at gmail.com>
  Date:   2025-01-10 (Fri, 10 Jan 2025)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
    M llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp

  Log Message:
  -----------
  [ORC][MachO] Fix deferred action handling during MachOPlatform bootstrap.

DeferredAAs should only capture bootstrap actions, but after 30b73ed7bd it was
capturing all actions, including those from other plugins. This is problematic
as other plugins may introduce actions that need to run before the platform
actions (e.g. on arm64e we need pointer signing to run before we access any
global pointers in the graph).

Note that this effectively undoes 30b73ed7bd, which was a buggy attempt to
synchronize writes to the DeferredAAs vector. This patch fixes that issue the
obvious way by locking the bootstrap mutex while accessing the DeferredAAs
vector.

No testcase yet: So far I've only seen this fail during bootstrap of arm64e
JIT'd programs.



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