Skip to content

Commit 6c878ed

Browse files
committed
Add valgrind suppression for pg_atomic_init_u64.
pg_atomic_init_u64 (indirectly) uses compare/exchange to guarantee atomic writes on platforms where compare/exchange is available, but 64bit writes aren't atomic (yes, those exist). That leads to a harmless read of the initial value of variable.
1 parent a15d387 commit 6c878ed

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/tools/valgrind.supp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,16 @@
104104

105105
fun:IsBinaryCoercible
106106
}
107+
108+
# Atomic writes to 64bit atomic vars uses compare/exchange to
109+
# guarantee atomic writes of 64bit variables. pg_atomic_write is used
110+
# during initialization of the atomic variable, hat leads to an
111+
# initial read of the old, undefined, memory value. But that's just to
112+
# make sure the swap works correctly.
113+
{
114+
uninitialized_atomic_init_u64
115+
Memcheck:Cond
116+
fun:pg_atomic_exchange_u64_impl
117+
fun:pg_atomic_write_u64_impl
118+
fun:pg_atomic_init_u64_impl
119+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy