pgsql: pageinspect: Fix unaligned struct access in GIN functions

Started by Peter Eisentrautover 9 years ago1 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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(-)

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