postgresql/src
Andres Freund 47c718792b Avoid need for valgrind suppressions for pg_atomic_init_u64 on some platforms.
Previously we used pg_atomic_write_64_impl inside
pg_atomic_init_u64. That works correctly, but on platforms without
64bit single copy atomicity it could trigger spurious valgrind errors
about uninitialized memory, because we use compare_and_swap for atomic
writes on such platforms.

I previously suppressed one instance of this problem (6c878edc1d),
but as Tom reports that wasn't enough. As the atomic variable cannot
yet be concurrently accessible during initialization, it seems better
to have pg_atomic_init_64_impl set the value directly.

Change pg_atomic_init_u32_impl for symmetry.

Reported-By: Tom Lane
Author: Andres Freund
Discussion: https://postgr.es/m/1714601.1591503815@sss.pgh.pa.us
Backpatch: 9.5-
2020-06-08 19:52:19 -07:00
..
backend Update snowball 2020-06-08 08:07:15 +02:00
bin Update snowball 2020-06-08 08:07:15 +02:00
common Run pgindent with new pg_bsd_indent version 2.1.1. 2020-05-16 11:54:51 -04:00
fe_utils Rethink definition of cancel.c's CancelRequested flag. 2020-06-07 13:07:34 -04:00
include Avoid need for valgrind suppressions for pg_atomic_init_u64 on some platforms. 2020-06-08 19:52:19 -07:00
interfaces Try to read data from the socket in pqSendSome's write_failed paths. 2020-06-07 13:44:13 -04:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Clear some style deviations. 2020-05-21 08:31:16 -07:00
port Clear some style deviations. 2020-05-21 08:31:16 -07:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Fix crash in WAL sender when starting physical replication 2020-06-08 10:12:24 +09:00
timezone Run pgindent with new pg_bsd_indent version 2.1.1. 2020-05-16 11:54:51 -04:00
tools Avoid need for valgrind suppressions for pg_atomic_init_u64 on some platforms. 2020-06-08 19:52:19 -07:00
tutorial Update copyrights for 2020 2020-01-01 12:21:45 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Update Unicode data to Unicode 13.0.0 and CLDR 37 2020-04-24 09:52:59 +02:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00