pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergey Shinderuk <s.shinderuk@postgrespro.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: gcc -Wclobbered in PostgresMain
Date: Mon, 10 Jul 2023 12:39:52 +0300
Message-ID: <1f8a7f29-b526-db35-5584-a078ca20c8e2@postgrespro.ru> (raw)
In-Reply-To: <1632266.1688829082@sss.pgh.pa.us>
References: <2eda015b-7dff-47fd-d5e2-f1a9899b90a6@postgrespro.ru>
	<1632266.1688829082@sss.pgh.pa.us>

Hello, Tom,


On 08.07.2023 18:11, Tom Lane wrote:
> What we ought to be doing is resetting these two flags
> after the disable_all_timeouts call.


Oops, I missed that.


> Having done that, it wouldn't really be necessary to mark these
> as volatile.  I kept that marking anyway for consistency with
> send_ready_for_query, but perhaps we shouldn't?


I don't know. Maybe marking them volatile is more future proof. Not sure.


>> I also moved firstchar's declaration inside the loop where it's used, to
>> make it clear that this variable needn't be volatile and is not
>> preserved after longjmp().
> 
> Good idea, but then why not the same for input_message?  It's fully
> reinitialized each time through the loop, too.


Yeah, that's better.


> In short, something like the attached, except I'm not totally sold
> on changing the volatility of the timeout flags.

Looks good to me.


Thank you.

-- 
Sergey Shinderuk		https://postgrespro.com/






view thread (4+ messages)  latest in thread

Message-ID: <1f8a7f29-b526-db35-5584-a078ca20c8e2@postgrespro.ru>
Permalink:  ../1f8a7f29-b526-db35-5584-a078ca20c8e2@postgrespro.ru/
Also on:    postgresql.org/message-id/1f8a7f29-b526-db35-5584-a078ca20c8e2@postgrespro.ru

 · 

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: s.shinderuk@postgrespro.ru, tgl@sss.pgh.pa.us
  Subject: Re: gcc -Wclobbered in PostgresMain
  In-Reply-To: <1f8a7f29-b526-db35-5584-a078ca20c8e2@postgrespro.ru>

* 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