forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit47c7187
committed
Avoid need for valgrind suppressions for pg_atomic_init_u64 on some platforms.
Previously we used pg_atomic_write_64_impl insidepg_atomic_init_u64. That works correctly, but on platforms without64bit single copy atomicity it could trigger spurious valgrind errorsabout uninitialized memory, because we use compare_and_swap for atomicwrites on such platforms.I previously suppressed one instance of this problem (6c878ed),but as Tom reports that wasn't enough. As the atomic variable cannotyet be concurrently accessible during initialization, it seems betterto have pg_atomic_init_64_impl set the value directly.Change pg_atomic_init_u32_impl for symmetry.Reported-By: Tom LaneAuthor: Andres FreundDiscussion:https://postgr.es/m/1714601.1591503815@sss.pgh.pa.usBackpatch: 9.5-1 parentc2e71cb commit47c7187
2 files changed
+2
-16
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 |
| - | |
| 163 | + | |
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
| |||
330 | 330 |
| |
331 | 331 |
| |
332 | 332 |
| |
333 |
| - | |
| 333 | + | |
334 | 334 |
| |
335 | 335 |
| |
336 | 336 |
| |
|
Lines changed: 0 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
137 |
| - | |
138 |
| - | |
139 |
| - | |
140 |
| - | |
141 |
| - | |
142 |
| - | |
143 |
| - | |
144 |
| - | |
145 |
| - | |
146 |
| - | |
147 |
| - | |
148 |
| - | |
149 |
| - | |
150 |
| - | |
151 | 137 |
| |
152 | 138 |
| |
153 | 139 |
| |
|
0 commit comments
Comments
(0)