pgsql: pageinspect: Fix unaligned struct access in GIN functions

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: pageinspect: Fix unaligned struct access in GIN functions
Date: 2016-11-04 14:06:05
Message-ID: E1c2f89-0008TX-84@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pageinspect: Fix unaligned struct access in GIN functions

The raw page data that is passed into the functions will not be aligned
at 8-byte boundaries. Casting that to a struct and accessing int64
fields will result in unaligned access. On most platforms, you get away
with it, but it will result on a crash on pickier platforms such as ia64
and sparc64.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/84ad68d645222f534e4fe51fbba43a5c9cc382a5

Modified Files
--------------
contrib/pageinspect/ginfuncs.c | 46 ++++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 22 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2016-11-04 14:42:41 pgsql: pg_archivecleanup: Add NLS
Previous Message Robert Haas 2016-11-04 13:32:58 pgsql: Add API to check if an existing exclusive lock allows cleanup.