pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Fix volatile vs. pointer confusion
Date: Thu, 14 Mar 2019 08:48:09 +0100
Message-ID: <8589eca8-bb4c-36fc-3dab-7f87589978e6@2ndquadrant.com> (raw)
In-Reply-To: <f747368d-9e1a-c46a-ac76-3c27da32e8e4@2ndquadrant.com>
References: <f747368d-9e1a-c46a-ac76-3c27da32e8e4@2ndquadrant.com>

On 2019-03-11 08:23, Peter Eisentraut wrote:
> Variables used after a longjmp() need to be declared volatile.  In
> case of a pointer, it's the pointer itself that needs to be declared
> volatile, not the pointed-to value.  So we need
> 
>     PyObject *volatile items;
> 
> instead of
> 
>     volatile PyObject *items;  /* wrong */
> 
> Attached patch fixes a couple of cases of that.  Most instances were
> already correct.

Committed.

I'll wait for the build farm to see if there are any new compiler
warnings because of this, then backpatch.

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




view thread (6+ messages)

Message-ID: <8589eca8-bb4c-36fc-3dab-7f87589978e6@2ndquadrant.com>
Permalink:  ../8589eca8-bb4c-36fc-3dab-7f87589978e6@2ndquadrant.com/
Also on:    postgresql.org/message-id/8589eca8-bb4c-36fc-3dab-7f87589978e6@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-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com
  Subject: Re: Fix volatile vs. pointer confusion
  In-Reply-To: <8589eca8-bb4c-36fc-3dab-7f87589978e6@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