[llvm] [DWARFLinkerParallel] Change more cases of compare_exchange_weak to compare_exchange_strong (PR #138692)

Alexey Lapshin via llvm-commits llvm-commits at lists.llvm.org
Tue May 6 13:13:04 PDT 2025


================
@@ -137,15 +137,15 @@ 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))
----------------
avl-llvm wrote:

In this case the compare_exchange_weak used incorrectly and should be replaced with compare_exchange_strong as in this patch.

https://github.com/llvm/llvm-project/pull/138692


More information about the llvm-commits mailing list