[all-commits] [llvm/llvm-project] 07bc54: [DWARFLinkerParallel] Fix incorrect uses of compar...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Mon May 5 05:06:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07bc54bf4554398b199f4dc849e5193b98422f23
      https://github.com/llvm/llvm-project/commit/07bc54bf4554398b199f4dc849e5193b98422f23
  Author: Martin Storsjö <martin at martin.st>
  Date:   2025-05-05 (Mon, 05 May 2025)

  Changed paths:
    M llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp
    M llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.h
    M llvm/lib/DWARFLinker/Parallel/TypePool.h

  Log Message:
  -----------
  [DWARFLinkerParallel] Fix incorrect uses of compare_exchange_weak (#138129)

The documentation for compare_exchange_weak says that it is allowed to
spuriously fail. If compare_exchange_weak is called in a loop, spurious
failures usually are benign - but in these cases, a spurious failure
would give incorrect behaviour.

E.g. in TypePool::getOrCreateTypeEntryBody, we assume that if the
compare_exchange call returned false, we had been preempted by another
thread and that DIE is non-null.

This fixes running the dsymutil tests on Windows on aarch64 (built with
a mingw toolchain with libc++).



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