Re: [BUGS] BUG #14897: Segfault on statitics SQL request

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Vincent Lachenal <vincent(dot)lachenal(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #14897: Segfault on statitics SQL request
Date: 2017-11-14 06:16:34
Message-ID: CAB7nPqROBh-uBVa5S27XigZxafaia_9JOnmukTnUeeuK7wySJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Nov 14, 2017 at 2:31 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.)

Oh, well. I am not sure what went wrong. But I can see the difference
now, which is what you have:
@@ -2652,7 +2652,7 @@ numericvar_to_int128:
pxor %xmm0, %xmm0
movl $1, %ebx
testq %rdi, %rdi
- movups %xmm0, (%r14)
+ movaps %xmm0, (%r14)
je .L452
call pfree(at)PLT
.L452:
@@ -13856,10 +13856,10 @@ numeric_poly_combine:
movq 8(%rbp), %rdx
movq %r12, CurrentMemoryContext(%rip)
movq %rdx, 8(%rax)
- movdqu 16(%rbp), %xmm0
- movups %xmm0, 16(%rax)
- movdqu 32(%rbp), %xmm0
- movups %xmm0, 32(%rax)
+ movdqa 16(%rbp), %xmm0
+ movaps %xmm0, 16(%rax)
+ movdqa 32(%rbp), %xmm0
+ movaps %xmm0, 32(%rax)
jmp .L2110
.L2124:
leaq .LC0(%rip), %rdi
@@ -14338,8 +14338,8 @@ int8_avg_combine:
movq 8(%rbp), %rdx
movq %r12, CurrentMemoryContext(%rip)
movq %rdx, 8(%rax)
- movdqu 16(%rbp), %xmm0
- movups %xmm0, 16(%rax)
+ movdqa 16(%rbp), %xmm0
+ movaps %xmm0, 16(%rax)
jmp .L2188
.L2202:
leaq .LC0(%rip), %rdi

The patch addresses the crash here as well by the way.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2017-11-14 06:22:04 Re: [BUGS] BUG #14897: Segfault on statitics SQL request
Previous Message Tom Lane 2017-11-14 05:31:35 Re: [BUGS] BUG #14897: Segfault on statitics SQL request