[llvm] 52f568d - [DWARFLinkerParallel] Change more cases of compare_exchange_weak to compare_exchange_strong (#138692)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 6 23:55:22 PDT 2025
Author: Martin Storsjö
Date: 2025-05-07T09:55:17+03:00
New Revision: 52f568dbbb61ffe26b7973b482e0e504b405a0ab
URL: https://github.com/llvm/llvm-project/commit/52f568dbbb61ffe26b7973b482e0e504b405a0ab
DIFF: https://github.com/llvm/llvm-project/commit/52f568dbbb61ffe26b7973b482e0e504b405a0ab.diff
LOG: [DWARFLinkerParallel] Change more cases of compare_exchange_weak to compare_exchange_strong (#138692)
This is a follow-up to 07bc54bf4554398b199f4dc849e5193b98422f23; this
fixes more occasional crashes in dsymutil on Windows on aarch64.
Added:
Modified:
llvm/lib/DWARFLinker/Parallel/ArrayList.h
Removed:
################################################################################
diff --git a/llvm/lib/DWARFLinker/Parallel/ArrayList.h b/llvm/lib/DWARFLinker/Parallel/ArrayList.h
index c48f828609be2..d99fdcc8c60c0 100644
--- a/llvm/lib/DWARFLinker/Parallel/ArrayList.h
+++ b/llvm/lib/DWARFLinker/Parallel/ArrayList.h
@@ -137,7 +137,7 @@ template <typename T, size_t ItemsGroupSize = 512> class ArrayList {
NewGroup->Next = nullptr;
// Try to replace current group with allocated one.
- if (AtomicGroup.compare_exchange_weak(CurGroup, NewGroup))
+ if (AtomicGroup.compare_exchange_strong(CurGroup, NewGroup))
return true;
// Put allocated group as last group.
More information about the llvm-commits
mailing list