pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Recent failures on buildfarm member hornet
Date: Wed, 07 Oct 2020 18:03:16 -0400
Message-ID: <2398543.1602108196@sss.pgh.pa.us> (raw)
In-Reply-To: <2397925.1602107299@sss.pgh.pa.us>
References: <1830491.1601944935@sss.pgh.pa.us>
	<20201007014507.GB1422897@rfd.leadboat.com>
	<2040113.1602035809@sss.pgh.pa.us>
	<20201007021941.GD1422897@rfd.leadboat.com>
	<2233910.1602090798@sss.pgh.pa.us>
	<CAApHDvovu2O+SLerPK2fCqKKP-q6NWinzACvJkMQ9zZNEiCKJg@mail.gmail.com>
	<20201007212056.GB1498955@rfd.leadboat.com>
	<2397925.1602107299@sss.pgh.pa.us>

I wrote:
> I'm tempted to propose the attached small code rearrangement, which
> might dissuade the compiler from thinking it can get away with this.
> While I concur with your point that an old xlc version might not be
> that exciting, there could be other compilers doing the same thing
> in the future.

After thinking about it a bit more, I'm not even convinced that what
xlc seems to be doing is illegal per C spec.  There are no sequence
points within

    return list_make2(list_concat(directargs, orderedargs),
                      makeInteger(ndirectargs));

and therefore there's an argument to be made that the compiler
doesn't have to care whether any side-effects of list_concat() occur
before or after the evaluation of makeInteger(ndirectargs).
If the potential side-effects of list_concat() can be disregarded
until the end of this statement, then the code change is perfectly legal.

Maybe some very careful language-lawyering could prove differently,
but it's not as open-and-shut as one could wish.  So now I'm thinking
that we need this patch anyway, xlc or not.

			regards, tom lane





view thread (12+ messages)  latest in thread

Message-ID: <2398543.1602108196@sss.pgh.pa.us>
Permalink:  ../2398543.1602108196@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2398543.1602108196@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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, noah@leadboat.com, dgrowleyml@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Recent failures on buildfarm member hornet
  In-Reply-To: <2398543.1602108196@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