Commit b3f863a
committed
[DWARFLinkerParallel] Fix incorrect uses of compare_exchange_weak
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++).1 parent 4994174 commit b3f863a
File tree
3 files changed
+8
-8
lines changed- llvm/lib/DWARFLinker/Parallel
3 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1433 | 1433 | | |
1434 | 1434 | | |
1435 | 1435 | | |
1436 | | - | |
1437 | | - | |
| 1436 | + | |
| 1437 | + | |
1438 | 1438 | | |
1439 | 1439 | | |
1440 | 1440 | | |
1441 | 1441 | | |
1442 | | - | |
| 1442 | + | |
1443 | 1443 | | |
1444 | 1444 | | |
1445 | 1445 | | |
| |||
1449 | 1449 | | |
1450 | 1450 | | |
1451 | 1451 | | |
1452 | | - | |
1453 | | - | |
| 1452 | + | |
| 1453 | + | |
1454 | 1454 | | |
1455 | 1455 | | |
1456 | 1456 | | |
1457 | 1457 | | |
1458 | | - | |
| 1458 | + | |
1459 | 1459 | | |
1460 | 1460 | | |
1461 | 1461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
0 commit comments