pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: hlinnaka <hlinnaka@iki.fi>
Subject: Re: SerializeParamList vs machines with strict alignment
Date: Mon, 01 Oct 2018 16:49:07 -0400
Message-ID: <28627.1538426947@sss.pgh.pa.us> (raw)
In-Reply-To: <27748.1538425312@sss.pgh.pa.us>
References: <11629.1536550032@sss.pgh.pa.us>
	<CAA4eK1JfEc=cqiUiRvUcHYCf=PVEwM_bZ_QiOMHpqGpUMdY8gA@mail.gmail.com>
	<8352.1536586500@sss.pgh.pa.us>
	<CAA4eK1KTsNC--yPBatOiLJriBfGNgb_vmTF40JcEeZPedcL9YA@mail.gmail.com>
	<CAA4eK1KjGVrbMxaoE=tr1uR7mfpVLYui60tO4ANkQQAV+c+Y_A@mail.gmail.com>
	<27748.1538425312@sss.pgh.pa.us>

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




view thread (26+ messages)  latest in thread

Message-ID: <28627.1538426947@sss.pgh.pa.us>
Permalink:  ../28627.1538426947@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28627.1538426947@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, pgsql-hackers@lists.postgresql.org, hlinnaka@iki.fi
  Subject: Re: SerializeParamList vs machines with strict alignment
  In-Reply-To: <28627.1538426947@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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