pgsql: Fix volatile-safety issue in dblink's materializeQueryResult().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix volatile-safety issue in dblink's materializeQueryResult().
Date: 2015-01-26 20:17:57
Message-ID: E1YFq6f-0000t7-Ej@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix volatile-safety issue in dblink's materializeQueryResult().

Some fields of the sinfo struct are modified within PG_TRY and then
referenced within PG_CATCH, so as with recent patch to async.c, "volatile"
is necessary for strict POSIX compliance; and that propagates to a couple
of subroutines as well as materializeQueryResult() itself. I think the
risk of actual issues here is probably higher than in async.c, because
storeQueryResult() is likely to get inlined into materializeQueryResult(),
leaving the compiler free to conclude that its stores into sinfo fields are
dead code.

Branch
------
master

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

Modified Files
--------------
contrib/dblink/dblink.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-01-26 20:53:47 pgsql: Add a note to PG_TRY's documentation about volatile safety.
Previous Message Robert Haas 2015-01-26 20:00:04 pgsql: Re-enable abbreviated keys on Windows.