llvm-project
07bc54bf - [DWARFLinkerParallel] Fix incorrect uses of compare_exchange_weak (#138129)

Commit
151 days ago
[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++).
Author
Parents
Loading