pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing.
@ 2018-08-31 16:27  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2018-08-31 16:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make checksum_impl.h safe to compile with -fstrict-aliasing.

In general, Postgres requires -fno-strict-aliasing with compilers that
implement C99 strict aliasing rules.  There's little hope of getting
rid of that overall.  But it seems like it would be a good idea if
storage/checksum_impl.h in particular didn't depend on it, because
that header is explicitly intended to be included by external programs.
We don't have a lot of control over the compiler switches that an
external program might use, as shown by Michael Banck's report of
failure in a privately-modified version of pg_verify_checksums.

Hence, switch to using a union in place of willy-nilly pointer casting
inside this file.  I think this makes the code a bit more readable
anyway.

checksum_impl.h hasn't changed since it was introduced in 9.3,
so back-patch all the way.

Discussion: https://postgr.es/m/1535618100.1286.3.camel@credativ.de

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/db87d3b5253f12d78dd3f8cb893c56bd4cbcfd40

Modified Files
--------------
src/include/storage/checksum_impl.h | 38 ++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)



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

* pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing.
@ 2018-08-31 16:27  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2018-08-31 16:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make checksum_impl.h safe to compile with -fstrict-aliasing.

In general, Postgres requires -fno-strict-aliasing with compilers that
implement C99 strict aliasing rules.  There's little hope of getting
rid of that overall.  But it seems like it would be a good idea if
storage/checksum_impl.h in particular didn't depend on it, because
that header is explicitly intended to be included by external programs.
We don't have a lot of control over the compiler switches that an
external program might use, as shown by Michael Banck's report of
failure in a privately-modified version of pg_verify_checksums.

Hence, switch to using a union in place of willy-nilly pointer casting
inside this file.  I think this makes the code a bit more readable
anyway.

checksum_impl.h hasn't changed since it was introduced in 9.3,
so back-patch all the way.

Discussion: https://postgr.es/m/1535618100.1286.3.camel@credativ.de

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/20f9cd55dd53cd05bbf53cad38d6ad6058bbd732

Modified Files
--------------
src/include/storage/checksum_impl.h | 38 ++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)



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

* pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing.
@ 2018-08-31 16:27  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2018-08-31 16:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make checksum_impl.h safe to compile with -fstrict-aliasing.

In general, Postgres requires -fno-strict-aliasing with compilers that
implement C99 strict aliasing rules.  There's little hope of getting
rid of that overall.  But it seems like it would be a good idea if
storage/checksum_impl.h in particular didn't depend on it, because
that header is explicitly intended to be included by external programs.
We don't have a lot of control over the compiler switches that an
external program might use, as shown by Michael Banck's report of
failure in a privately-modified version of pg_verify_checksums.

Hence, switch to using a union in place of willy-nilly pointer casting
inside this file.  I think this makes the code a bit more readable
anyway.

checksum_impl.h hasn't changed since it was introduced in 9.3,
so back-patch all the way.

Discussion: https://postgr.es/m/1535618100.1286.3.camel@credativ.de

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c2dfbd18ce25c0141b681c04aa79c2e4e7cb20a7

Modified Files
--------------
src/include/storage/checksum_impl.h | 38 ++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)



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

* pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing.
@ 2018-08-31 16:27  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2018-08-31 16:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make checksum_impl.h safe to compile with -fstrict-aliasing.

In general, Postgres requires -fno-strict-aliasing with compilers that
implement C99 strict aliasing rules.  There's little hope of getting
rid of that overall.  But it seems like it would be a good idea if
storage/checksum_impl.h in particular didn't depend on it, because
that header is explicitly intended to be included by external programs.
We don't have a lot of control over the compiler switches that an
external program might use, as shown by Michael Banck's report of
failure in a privately-modified version of pg_verify_checksums.

Hence, switch to using a union in place of willy-nilly pointer casting
inside this file.  I think this makes the code a bit more readable
anyway.

checksum_impl.h hasn't changed since it was introduced in 9.3,
so back-patch all the way.

Discussion: https://postgr.es/m/1535618100.1286.3.camel@credativ.de

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9daff2fe69dcfaf29c7901b9e6bad285778a45c0

Modified Files
--------------
src/include/storage/checksum_impl.h | 38 ++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)



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

* pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing.
@ 2018-08-31 16:27  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2018-08-31 16:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make checksum_impl.h safe to compile with -fstrict-aliasing.

In general, Postgres requires -fno-strict-aliasing with compilers that
implement C99 strict aliasing rules.  There's little hope of getting
rid of that overall.  But it seems like it would be a good idea if
storage/checksum_impl.h in particular didn't depend on it, because
that header is explicitly intended to be included by external programs.
We don't have a lot of control over the compiler switches that an
external program might use, as shown by Michael Banck's report of
failure in a privately-modified version of pg_verify_checksums.

Hence, switch to using a union in place of willy-nilly pointer casting
inside this file.  I think this makes the code a bit more readable
anyway.

checksum_impl.h hasn't changed since it was introduced in 9.3,
so back-patch all the way.

Discussion: https://postgr.es/m/1535618100.1286.3.camel@credativ.de

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d6ef17ed7bba02c83408296f5fff09766e4f14dd

Modified Files
--------------
src/include/storage/checksum_impl.h | 38 ++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)



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

* pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing.
@ 2018-08-31 16:27  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2018-08-31 16:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make checksum_impl.h safe to compile with -fstrict-aliasing.

In general, Postgres requires -fno-strict-aliasing with compilers that
implement C99 strict aliasing rules.  There's little hope of getting
rid of that overall.  But it seems like it would be a good idea if
storage/checksum_impl.h in particular didn't depend on it, because
that header is explicitly intended to be included by external programs.
We don't have a lot of control over the compiler switches that an
external program might use, as shown by Michael Banck's report of
failure in a privately-modified version of pg_verify_checksums.

Hence, switch to using a union in place of willy-nilly pointer casting
inside this file.  I think this makes the code a bit more readable
anyway.

checksum_impl.h hasn't changed since it was introduced in 9.3,
so back-patch all the way.

Discussion: https://postgr.es/m/1535618100.1286.3.camel@credativ.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8c62d9d16f014565d5f427506878812219a01604

Modified Files
--------------
src/include/storage/checksum_impl.h | 38 ++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)



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

* pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing.
@ 2018-08-31 16:27  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2018-08-31 16:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make checksum_impl.h safe to compile with -fstrict-aliasing.

In general, Postgres requires -fno-strict-aliasing with compilers that
implement C99 strict aliasing rules.  There's little hope of getting
rid of that overall.  But it seems like it would be a good idea if
storage/checksum_impl.h in particular didn't depend on it, because
that header is explicitly intended to be included by external programs.
We don't have a lot of control over the compiler switches that an
external program might use, as shown by Michael Banck's report of
failure in a privately-modified version of pg_verify_checksums.

Hence, switch to using a union in place of willy-nilly pointer casting
inside this file.  I think this makes the code a bit more readable
anyway.

checksum_impl.h hasn't changed since it was introduced in 9.3,
so back-patch all the way.

Discussion: https://postgr.es/m/1535618100.1286.3.camel@credativ.de

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/853af991e35a0355bbb3ac9e941ac044beb89a0e

Modified Files
--------------
src/include/storage/checksum_impl.h | 38 ++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)



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


end of thread, other threads:[~2018-08-31 16:27 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31 16:27 pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing. Tom Lane <tgl@sss.pgh.pa.us>
2018-08-31 16:27 pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing. Tom Lane <tgl@sss.pgh.pa.us>
2018-08-31 16:27 pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing. Tom Lane <tgl@sss.pgh.pa.us>
2018-08-31 16:27 pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing. Tom Lane <tgl@sss.pgh.pa.us>
2018-08-31 16:27 pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing. Tom Lane <tgl@sss.pgh.pa.us>
2018-08-31 16:27 pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing. Tom Lane <tgl@sss.pgh.pa.us>
2018-08-31 16:27 pgsql: Make checksum_impl.h safe to compile with -fstrict-aliasing. 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