Re: SerializeParamList vs machines with strict alignment - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SerializeParamList vs machines with strict alignment
Date
Msg-id 28627.1538426947@sss.pgh.pa.us
Whole thread Raw
In response to Re: SerializeParamList vs machines with strict alignment  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SerializeParamList vs machines with strict alignment  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
I wrote:
> The attached revised patch contains a test case that demonstrably triggers
> the problem on gaur's host.  Oddly, I do not get a crash either on a PPC
> Mac or a Raspberry Pi 3 running Raspbian.  I'm not very sure why; I traced
> through things with gdb and it's definitely calling EA_flatten_into with
> an odd address and a non-flattened input.  I guess both of those platforms
> have kernel handlers for misaligned accesses?  But the Raspbian box ought
> to be nearly the same as chipmunk, which is where we saw the problem to
> begin with, so I'm a bit confused.

Ah: a bit of googling later, the mystery is solved.  PPC does have support
for unaligned 32-bit accesses, which is as much as EA_flatten_into needs.
(It's 64-bit operations where you might have a problem.)  My info was
also out of date about ARM: more recent processors, at least, can also
do unaligned 32-bit accesses.  chipmunk either has a pretty old processor
or it is configured to disable unaligned access.

Apparently the only somewhat-modern architecture that is resolutely
unaligned-unfriendly is MIPS.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: buildfarm and git pull
Next
From: Andrew Dunstan
Date:
Subject: Re: Odd 9.4, 9.3 buildfarm failure on s390x