pageinspect: Fix unaligned struct access in GIN functions

Peter Eisentraut <peter_e@gmx.net>

Commit: 84ad68d645222f534e4fe51fbba43a5c9cc382a5
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2016-11-04T14:05:37Z
Releases: 10.0
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.

Files

PathChange+/−
contrib/pageinspect/ginfuncs.c modified +24 −22