Re: [plpython] Add missing volatile qualifier.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Xing Guo <higuoxing(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [plpython] Add missing volatile qualifier.
Date: 2024-04-01 15:57:07
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Xing Guo <higuoxing(at)gmail(dot)com> writes:
> I'm playing a toy static analysis checker with PostgreSQL and found a
> variable is missing volatile qualifier.

Good catch! It looks like the consequences of a failure would be
pretty minimal --- AFAICS, no worse than a possible failure to remove
a refcount on Py_None --- but that's still a bug.

I don't care for your proposed fix though. I think the real problem
here is schizophrenia about when to set up pltargs, and we could
fix it more nicely as attached. (Perhaps the Asserts are overkill

regards, tom lane

Attachment Content-Type Size
fix-unsafe-initialization-of-pltargs.patch text/x-diff 1.2 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2024-04-01 16:04:00 Re: psql not responding to SIGINT upon db reconnection
Previous Message Nathan Bossart 2024-04-01 15:53:38 Re: Popcount optimization using AVX512