pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Get rid of scribbling on a const variable in psql's print.c.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Get rid of scribbling on a const variable in psql's print.c.
@ 2016-03-12 23:17 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-03-12 23:17 UTC (permalink / raw)
  To: pgsql-committers

Get rid of scribbling on a const variable in psql's print.c.

Commit a2dabf0e1dda93c8 had the bright idea that it could modify a "const"
global variable if it merely casted away const from a pointer.  This does
not work on platforms where the compiler puts "const" variables into
read-only storage.  Depressingly, we evidently have no such platforms in
our buildfarm ... an oversight I have now remedied.  (The one platform
that is known to catch this is recent OS X with -fno-common.)

Per report from Chris Ruprecht.  Back-patch to 9.5 where the bogus
code was introduced.

Branch
------
master

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

Modified Files
--------------
src/bin/psql/print.c | 4 ++--
src/bin/psql/print.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Get rid of scribbling on a const variable in psql's print.c.
@ 2016-03-12 23:17 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-03-12 23:17 UTC (permalink / raw)
  To: pgsql-committers

Get rid of scribbling on a const variable in psql's print.c.

Commit a2dabf0e1dda93c8 had the bright idea that it could modify a "const"
global variable if it merely casted away const from a pointer.  This does
not work on platforms where the compiler puts "const" variables into
read-only storage.  Depressingly, we evidently have no such platforms in
our buildfarm ... an oversight I have now remedied.  (The one platform
that is known to catch this is recent OS X with -fno-common.)

Per report from Chris Ruprecht.  Back-patch to 9.5 where the bogus
code was introduced.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1598dc15bab35a9fd061babbae716777259d3147

Modified Files
--------------
src/bin/psql/print.c | 4 ++--
src/bin/psql/print.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-03-12 23:17 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-03-12 23:17 pgsql: Get rid of scribbling on a const variable in psql's print.c. Tom Lane <tgl@sss.pgh.pa.us>
2016-03-12 23:17 pgsql: Get rid of scribbling on a const variable in psql's print.c. Tom Lane <tgl@sss.pgh.pa.us>

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