Commit 01c4f45
committed
[DWARFLinkerParallel] Change more cases of compare_exchange_weak to compare_exchange_strong
This is a follow-up to 07bc54b;
this seems to perhaps fix occasional crashes in dsymutil on
Windows on aarch64.
While these are used in loops, which could be tolerant to
concurrent accesses, the overall logic seems to assume that
they don't have spurious failures; I've observed one case in
a debugger, where LastGroup == nullptr within the loop in
ArrayList::add().
The remaining uses of compare_exchange_weak() in
DWARFLinkerCompileUnit.h also seem very suspicious; if there
would be a true concurrent write, leading to compare_exchange_weak()
returning false, it seems like we would get stuck in an endless
loop - but changing them to compare_exchange_strong() wouldn't
make any difference with respect to that.1 parent a8344a9 commit 01c4f45
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
0 commit comments