Re: BUG #14897: Segfault on statitics SQL request

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Michael Paquier <michael.paquier@gmail.com>, Vincent Lachenal <vincent.lachenal@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Date: 2017-11-11T17:41:40Z
Lists: pgsql-bugs
Andres Freund <andres@anarazel.de> writes:
> That's using SSE, which requires 16byte alignment IIRC.  I think we need
> a function that properly allocate int128 vars with the right alignment -
> don't think we want to go for full 16byte alignment for everything.

Yeah, changing MAXALIGN is out of the question.  I'm thinking about
another flag bit for MemoryContextAllocExtended.  Do we need to think
about other use-cases besides int128?  Should we just force 16-byte
alignment on all architectures, or does it need to be platform-specific?

			regards, tom lane


Commits

  1. Prevent int128 from requiring more than MAXALIGN alignment.

  2. Rearrange c.h to create a "compiler characteristics" section.