pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s
7+ messages / 1 participants
[nested] [flat]

* pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s
@ 2020-06-09 03:24 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2020-06-09 03:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 (6c878edc1df),
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-

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/47c718792b885c2a06e32cf86f4caca69ce5cda4

Modified Files
--------------
src/include/port/atomics/generic.h |  4 ++--
src/tools/valgrind.supp            | 14 --------------
2 files changed, 2 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s
@ 2020-06-09 03:24 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2020-06-09 03:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 (6c878edc1df),
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-

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/de4a25989611d960360d0513d00b970d3b6c52c7

Modified Files
--------------
src/include/port/atomics/generic.h |  4 ++--
src/tools/valgrind.supp            | 14 --------------
2 files changed, 2 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s
@ 2020-06-09 03:24 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2020-06-09 03:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 (6c878edc1df),
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-

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/980a3cd48a08689f0526a7ed0537899e155bd9f4

Modified Files
--------------
src/include/port/atomics/generic.h |  4 ++--
src/tools/valgrind.supp            | 14 --------------
2 files changed, 2 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s
@ 2020-06-09 03:24 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2020-06-09 03:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 (6c878edc1df),
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-

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fd6daa006e7ba42c0f97fe852d83293e5e34d15c

Modified Files
--------------
src/include/port/atomics/generic.h |  4 ++--
src/tools/valgrind.supp            | 14 --------------
2 files changed, 2 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s
@ 2020-06-09 03:24 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2020-06-09 03:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 (6c878edc1df),
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-

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/20fd90febc2c2429a0340d476cccc6922f581305

Modified Files
--------------
src/include/port/atomics/generic.h |  4 ++--
src/tools/valgrind.supp            | 14 --------------
2 files changed, 2 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s
@ 2020-06-09 03:24 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2020-06-09 03:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 (6c878edc1df),
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-

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e3c878ffdddce4a70ba9771e0493f3bb3f7b1b7d

Modified Files
--------------
src/include/port/atomics/generic.h |  4 ++--
src/tools/valgrind.supp            | 14 --------------
2 files changed, 2 insertions(+), 16 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s
@ 2020-06-09 03:25 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2020-06-09 03:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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 (6c878edc1df),
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-

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3801532918eba64d26265bb6f137805fe3c7d2ab

Modified Files
--------------
src/include/port/atomics/generic.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2020-06-09 03:25 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 03:24 pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s Andres Freund <andres@anarazel.de>
2020-06-09 03:24 pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s Andres Freund <andres@anarazel.de>
2020-06-09 03:24 pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s Andres Freund <andres@anarazel.de>
2020-06-09 03:24 pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s Andres Freund <andres@anarazel.de>
2020-06-09 03:24 pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s Andres Freund <andres@anarazel.de>
2020-06-09 03:24 pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s Andres Freund <andres@anarazel.de>
2020-06-09 03:25 pgsql: Avoid need for valgrind suppressions for pg_atomic_init_u64 on s Andres Freund <andres@anarazel.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox