From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix alignment of pg_atomic_uint64 variables on some 32bit platfo
Date: Sun, 11 Jan 2015 00:21:14 +0000
Message-ID: <E1YA6HK-0000Q7-Nw@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fix alignment of pg_atomic_uint64 variables on some 32bit platforms.
I failed to recognize that pg_atomic_uint64 wasn't guaranteed to be 8
byte aligned on some 32bit platforms - which it has to be on some
platforms to guarantee the desired atomicity and which we assert.
As this is all compiler specific code anyway we can just rely on
compiler specific tricks to enforce alignment.
I've been unable to find concrete documentation about the version that
introduce the sunpro alignment support, so that might need additional
guards.
I've verified that this works with gcc x86 32bit, but I don't have
access to any other 32bit environment.
Discussion: op.xpsjdkil0sbe7t@vld-kuci
Per report from Vladimir Koković.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/db4ec2ffce3549225619cae51d828224a11a165f
Modified Files
--------------
src/include/port/atomics/arch-x86.h | 1 +
src/include/port/atomics/generic-acc.h | 6 ++++++
src/include/port/atomics/generic-gcc.h | 2 +-
src/include/port/atomics/generic-msvc.h | 2 +-
src/include/port/atomics/generic-sunpro.h | 8 +++++++-
src/include/port/atomics/generic-xlc.h | 2 +-
6 files changed, 17 insertions(+), 4 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: pgsql: Fix alignment of pg_atomic_uint64 variables on some 32bit platfo
In-Reply-To: <E1YA6HK-0000Q7-Nw@gemulon.postgresql.org>
References: <E1YA6HK-0000Q7-Nw@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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