pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Vincent Lachenal <vincent.lachenal@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: [BUGS] BUG #14897: Segfault on statitics SQL request
Date: Tue, 14 Nov 2017 00:31:35 -0500
Message-ID: <23171.1510637495@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqQ7+rnOsGNDrtVC9uxb6erog2s4faM0FvmY_s-7uUmaNw@mail.gmail.com>
References: <20171110185747.31519.28038@wrigleys.postgresql.org>
	<1415.1510340891@sss.pgh.pa.us>
	<CAA2tJ7o-VK+ghsxifDAszFN5fikmG6U3sWHCEvc9nAVOypfjAw@mail.gmail.com>
	<5652.1510344738@sss.pgh.pa.us>
	<CAA2tJ7qsopt0hHbsm397H62LMsaE4hjRwaUu3FQdNgo5AYAGXA@mail.gmail.com>
	<7710.1510346813@sss.pgh.pa.us>
	<CAA2tJ7odG4KB=wvu_+5FfssxckbLTnEuR9C_TXRyeU_35z+CSA@mail.gmail.com>
	<10197.1510349123@sss.pgh.pa.us>
	<CAA2tJ7p72wbuHEzOA_g2V4YcmeDPHYKggenTR4dXG=kSpCiO8Q@mail.gmail.com>
	<14075.1510352167@sss.pgh.pa.us>
	<CA+q6zcXe9aV5NV88u9Y=vMp+=fP7QOXgTyFQhzuvmCvTBvb_kQ@mail.gmail.com>
	<17617.1510355215@sss.pgh.pa.us>
	<CAB7nPqR7mWvtnALZF93oez_v03NFCJ8dXP9CNicaUDv3KjDbYw@mail.gmail.com>
	<3192.1510508352@sss.pgh.pa.us>
	<CAB7nPqReMmn3Pg942we4aK73SFSVamdM0SAUO0BZHcvzA71h+A@mail.gmail.com>
	<CA+q6zcWnWYX0ArC6QYC3YeRk3WnsyuexV1FzqBuBpGqODEK3fQ@mail.gmail.com>
	<10396.1510621709@sss.pgh.pa.us>
	<17615.1510630283@sss.pgh.pa.us>
	<CAB7nPqQ7+rnOsGNDrtVC9uxb6erog2s4faM0FvmY_s-7uUmaNw@mail.gmail.com>

Michael Paquier <michael.paquier@gmail.com> writes:
> On Tue, Nov 14, 2017 at 12:31 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Concretely, the attached patch fixes it for me.  I've verified by
>> examining the assembly code that this stops gcc from using movdqa or
>> movaps in numeric.c, except for one place where it apparently can
>> prove that it's dealing with a sufficiently-aligned local variable.

> I am not seeing any difference in the assembly code generated by gcc
> -S with and without your patch. Perhaps I am missing something? What
> are you actually seeing?

Hm, double-check your procedure.  I get this:

$ diff numeric.s.std numeric.s.patch
2746c2746
<       movaps  %xmm0, (%r14)
---
>       movups  %xmm0, (%r14)
13948,13951c13948,13951
<       movdqa  16(%rbp), %xmm0
<       movaps  %xmm0, 16(%rax)
<       movdqa  32(%rbp), %xmm0
<       movaps  %xmm0, 32(%rax)
---
>       movdqu  16(%rbp), %xmm0
>       movups  %xmm0, 16(%rax)
>       movdqu  32(%rbp), %xmm0
>       movups  %xmm0, 32(%rax)
14434,14435c14434,14435
<       movdqa  16(%rbp), %xmm0
<       movaps  %xmm0, 16(%rax)
---
>       movdqu  16(%rbp), %xmm0
>       movups  %xmm0, 16(%rax)

(If using -g, there are a bunch more diffs in the debug tables.)

			regards, tom lane




view thread (39+ messages)  latest in thread

Message-ID: <23171.1510637495@sss.pgh.pa.us>
Permalink:  ../23171.1510637495@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23171.1510637495@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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com, 9erthalion6@gmail.com, andres@anarazel.de, peter.eisentraut@2ndquadrant.com, vincent.lachenal@gmail.com
  Subject: Re: [BUGS] BUG #14897: Segfault on statitics SQL request
  In-Reply-To: <23171.1510637495@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