[all-commits] [llvm/llvm-project] e2f86b: [ORC][MachO] Remove misused MachOPlatform::Bootstr...

Lang Hames via All-commits all-commits at lists.llvm.org
Thu May 29 00:35:51 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e2f86b5584959ec2b000d183841c8fb7c3402388
      https://github.com/llvm/llvm-project/commit/e2f86b5584959ec2b000d183841c8fb7c3402388
  Author: Lang Hames <lhames at gmail.com>
  Date:   2025-05-29 (Thu, 29 May 2025)

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

  Log Message:
  -----------
  [ORC][MachO] Remove misused MachOPlatform::BootstrapInfo::Mutex member.

MachOPlatform::BootstrapInfo::Mutex was meant to be used to synchronize access
to the MachOPlatform::BootstrapInfo::ActiveGraphs member, but the latter was
also modified under the MachOPlatform::PlatformMutex (in
MachOPlatform::MachOPlatformPlugin::modifyPassConfig), leading to a data race.

There have been external reports (rdar://151041549) of deadlocks on the
MachOPlatform::BootstrapInfo::CV condition variable that are consistent with
corruption of the ActiveGraphs member (though alternative explanations for
the reported behavior exist, and it has been too rare in practice to verify).

This patch removes the misused MachOPlatform::BootstrapInfo::Mutex member and
synchronizes all accesses to ActiveGraphs using MachOPlatform::PlatformMutex
instead. Since ActiveGraphs is only used during bootstrap the performance
impact of this should be negligible.

rdar://151041549 - possible fix.



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