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
------
REL8_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6ab58354df4000372f6b098c3a55fa5a1681569f

Modified Files
--------------
src/backend/access/transam/xlog.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)

Search Discussions

  • Tom Lane at Jun 10, 2011 at 9:04 pm
    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
    ------
    REL8_4_STABLE

    Details
    -------
    http://git.postgresql.org/pg/commitdiff/763f8687107a94252bde3484e17df2ff59942913

    Modified Files
    --------------
    src/backend/access/transam/xlog.c | 20 +++++++++++---------
    1 files changed, 11 insertions(+), 9 deletions(-)
  • Tom Lane at Jun 10, 2011 at 9:04 pm
    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
    ------
    REL8_2_STABLE

    Details
    -------
    http://git.postgresql.org/pg/commitdiff/0f452e8ef4eb7d6cde86ca8c5a2ab60044041a4c

    Modified Files
    --------------
    src/backend/access/transam/xlog.c | 20 +++++++++++---------
    1 files changed, 11 insertions(+), 9 deletions(-)
  • Tom Lane at Jun 10, 2011 at 9:04 pm
    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
    ------
    master

    Details
    -------
    http://git.postgresql.org/pg/commitdiff/c2ba0121c73b7461331104a46d140156e847572a

    Modified Files
    --------------
    src/backend/access/transam/xlog.c | 37 +++++++++++++++++++++++------------
    src/include/access/xlog_internal.h | 12 +++++-----
    2 files changed, 30 insertions(+), 19 deletions(-)
  • Tom Lane at Jun 10, 2011 at 9:04 pm
    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(-)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-committers @
categoriespostgresql
postedJun 10, '11 at 9:04p
activeJun 10, '11 at 9:04p
posts5
users1
websitepostgresql.org...
irc#postgresql

1 user in discussion

Tom Lane: 5 posts

People

Translate

site design / logo © 2022 Grokbase