pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Martin Liška <marxin.liska@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
Subject: Re: BUG #15121: Multiple UBSAN errors
Date: Mon, 19 Mar 2018 19:07:49 +0100
Message-ID: <7f798f51-05c4-304a-f852-9cea35f5f095@2ndquadrant.com> (raw)
In-Reply-To: <CAObPJ3OLHU2DwZLfCXEzkcqU2v6Otk6b32xo-eb0+PtEb=+BpQ@mail.gmail.com>
References: <152140318583.11955.7731957058248462341@wrigleys.postgresql.org>
	<7df78014-c931-6c75-6f92-ec48f390b2b9@2ndquadrant.com>
	<CAObPJ3MAY9u1had3QSvYO0TG-iVECqDzF04PvMZSHrmxNknZ8Q@mail.gmail.com>
	<46a345c1-1f8d-fd0d-c334-d8ca577719a9@2ndquadrant.com>
	<CAObPJ3OLHU2DwZLfCXEzkcqU2v6Otk6b32xo-eb0+PtEb=+BpQ@mail.gmail.com>



On 03/19/2018 03:28 PM, Martin Liška wrote:
> On 19 March 2018 at 15:26, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
>> On 03/19/2018 09:59 AM, Martin Liška wrote:
>>> On 19 March 2018 at 01:34, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
>>>
>>> ...
>>>>
>>>> Again, the line numbers don't really match the code I have, but I guess
>>>> it's the same issue as for pg_comp_crc32c_sse42. This is apparently
>>>> related to array serialization, and I guess we have a compact structure
>>>> (intentionally, to make it smaller), and we accept the unaligned access.
>>>
>>> Note that building postgresql with -03, I see some array tests failing.
>>>
>>
>> I'm unable to reproduce that. I do get a bunch of compile-time warnings
>> about possibly uninitialized variables (which seem bogus after a quick
>> inspection), but no failures.
> 
> Note that the errrors I reported come from running an instrumented postgres
> with "-fsanitize=undefined -g" option.
> 

I'm getting failures in errors, union and alter_table, but none of those
are related to arrays. So, which tests are failing for you and how do
the failures look like?

I've tried both gcc 7.3 and trunk, and all failures look like this:

-- this used to be a syntax error, but now we allow an empty target list
select;
+ print.c:916:4: runtime error: null pointer passed as argument 1, which
is declared to never be null
+ /usr/include/bits/string3.h:90:10: runtime error: null pointer passed
as argument 1, which is declared to never be null

Which seems to trigger the error on this line in print.c:

    memset(header_done, false, col_count * sizeof(bool));

likely because with empty select list col_count=0. So about the same
cause as for fwrite().


-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (20+ messages)  latest in thread

Message-ID: <7f798f51-05c4-304a-f852-9cea35f5f095@2ndquadrant.com>
Permalink:  ../7f798f51-05c4-304a-f852-9cea35f5f095@2ndquadrant.com/
Also on:    postgresql.org/message-id/7f798f51-05c4-304a-f852-9cea35f5f095@2ndquadrant.com

 · 

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: tomas.vondra@2ndquadrant.com, marxin.liska@gmail.com, noreply@postgresql.org
  Subject: Re: BUG #15121: Multiple UBSAN errors
  In-Reply-To: <7f798f51-05c4-304a-f852-9cea35f5f095@2ndquadrant.com>

* 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