Re: BUG #14897: Segfault on statitics SQL request

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>, Vincent Lachenal <vincent.lachenal@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Date: 2017-11-11T17:21:13Z
Lists: pgsql-bugs
Dmitry Dolgov <9erthalion6@gmail.com> writes:
>> On 11 November 2017 at 17:36, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Would you guys who are seeing the problem note whether the address of
>> the int128 field is 16-aligned, or only 8-aligned?

> __alignof__(__int128) returns 16 on my machine.

The question was about the actual value of the pointer being used at
the time of the crash --- %rax in the example below.

> Here is the disassembly section I've got in my case:

>     0x00000000007fc47d numericvar_to_int128+467 movdqa -0x60(%rbp),%xmm0
> --> 0x00000000007fc482 numericvar_to_int128+472 movaps %xmm0,(%rax)

suspicious ...

			regards, tom lane


Commits

  1. Prevent int128 from requiring more than MAXALIGN alignment.

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