pgsql: Work around gcc 4.6.0 bug that breaks WAL replay.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Work around gcc 4.6.0 bug that breaks WAL replay.
Date: 2011-06-10 21:04:46
Message-ID: E1QV8so-0007HZ-CH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Work around gcc 4.6.0 bug that breaks WAL replay.

ReadRecord's habit of using both direct references to tmpRecPtr and
references to *RecPtr (which is pointing at tmpRecPtr) triggers an
optimization bug in gcc 4.6.0, which apparently has forgotten about
aliasing rules. Avoid the compiler bug, and make the code more readable
to boot, by getting rid of the direct references. Improve the comments
while at it.

Back-patch to all supported versions, in case they get built with 4.6.0.

Tom Lane, with some cosmetic suggestions from Alex Hunsaker

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/45d792f70272ed57b932816562f31c2f79426c2a

Modified Files
--------------
src/backend/access/transam/xlog.c | 37 +++++++++++++++++++++++------------
src/include/access/xlog_internal.h | 12 +++++-----
2 files changed, 30 insertions(+), 19 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message User Hinoue 2011-06-11 04:59:18 psqlodbc - psqlodbc: Don't clear the parsed plan in
Previous Message Heikki Linnakangas 2011-06-10 20:41:25 pgsql: Fix locking while setting flags in MySerializableXact.