pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_
6+ messages / 1 participants
[nested] [flat]

* pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_
@ 2024-04-01 19:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-04-01 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid possible longjmp-induced logic error in PLy_trigger_build_args.

The "pltargs" variable wasn't marked volatile, which makes it unsafe
to change its value within the PG_TRY block.  It looks like the worst
outcome would be to fail to release a refcount on Py_None during an
(improbable) error exit, which would likely go unnoticed in the field.
Still, it's a bug.  A one-liner fix could be to mark pltargs volatile,
but on the whole it seems cleaner to arrange things so that we don't
change its value within PG_TRY.

Per report from Xing Guo.  This has been there for quite awhile,
so back-patch to all supported branches.

Discussion: https://postgr.es/m/CACpMh+DLrk=fDv07MNpBT4J413fDAm+gmMXgi8cjPONE+jvzuw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5eac8cef24543767015a9b248af08bbfa10b1b70

Modified Files
--------------
src/pl/plpython/plpy_exec.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_
@ 2024-04-01 19:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-04-01 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid possible longjmp-induced logic error in PLy_trigger_build_args.

The "pltargs" variable wasn't marked volatile, which makes it unsafe
to change its value within the PG_TRY block.  It looks like the worst
outcome would be to fail to release a refcount on Py_None during an
(improbable) error exit, which would likely go unnoticed in the field.
Still, it's a bug.  A one-liner fix could be to mark pltargs volatile,
but on the whole it seems cleaner to arrange things so that we don't
change its value within PG_TRY.

Per report from Xing Guo.  This has been there for quite awhile,
so back-patch to all supported branches.

Discussion: https://postgr.es/m/CACpMh+DLrk=fDv07MNpBT4J413fDAm+gmMXgi8cjPONE+jvzuw@mail.gmail.com

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/14e4e8f8c66b2d4316ecb1276e688d67c25659c2

Modified Files
--------------
src/pl/plpython/plpy_exec.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_
@ 2024-04-01 19:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-04-01 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid possible longjmp-induced logic error in PLy_trigger_build_args.

The "pltargs" variable wasn't marked volatile, which makes it unsafe
to change its value within the PG_TRY block.  It looks like the worst
outcome would be to fail to release a refcount on Py_None during an
(improbable) error exit, which would likely go unnoticed in the field.
Still, it's a bug.  A one-liner fix could be to mark pltargs volatile,
but on the whole it seems cleaner to arrange things so that we don't
change its value within PG_TRY.

Per report from Xing Guo.  This has been there for quite awhile,
so back-patch to all supported branches.

Discussion: https://postgr.es/m/CACpMh+DLrk=fDv07MNpBT4J413fDAm+gmMXgi8cjPONE+jvzuw@mail.gmail.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/08bdf0a4798bbbbc401bd951cd9553f3c6de2de7

Modified Files
--------------
src/pl/plpython/plpy_exec.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_
@ 2024-04-01 19:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-04-01 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid possible longjmp-induced logic error in PLy_trigger_build_args.

The "pltargs" variable wasn't marked volatile, which makes it unsafe
to change its value within the PG_TRY block.  It looks like the worst
outcome would be to fail to release a refcount on Py_None during an
(improbable) error exit, which would likely go unnoticed in the field.
Still, it's a bug.  A one-liner fix could be to mark pltargs volatile,
but on the whole it seems cleaner to arrange things so that we don't
change its value within PG_TRY.

Per report from Xing Guo.  This has been there for quite awhile,
so back-patch to all supported branches.

Discussion: https://postgr.es/m/CACpMh+DLrk=fDv07MNpBT4J413fDAm+gmMXgi8cjPONE+jvzuw@mail.gmail.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d96f72569743842eb3d0cf4e97a77427b2729f38

Modified Files
--------------
src/pl/plpython/plpy_exec.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_
@ 2024-04-01 19:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-04-01 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid possible longjmp-induced logic error in PLy_trigger_build_args.

The "pltargs" variable wasn't marked volatile, which makes it unsafe
to change its value within the PG_TRY block.  It looks like the worst
outcome would be to fail to release a refcount on Py_None during an
(improbable) error exit, which would likely go unnoticed in the field.
Still, it's a bug.  A one-liner fix could be to mark pltargs volatile,
but on the whole it seems cleaner to arrange things so that we don't
change its value within PG_TRY.

Per report from Xing Guo.  This has been there for quite awhile,
so back-patch to all supported branches.

Discussion: https://postgr.es/m/CACpMh+DLrk=fDv07MNpBT4J413fDAm+gmMXgi8cjPONE+jvzuw@mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fb60118bf233b95329dde45e55059a179ccc4fbe

Modified Files
--------------
src/pl/plpython/plpy_exec.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_
@ 2024-04-01 19:15 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-04-01 19:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid possible longjmp-induced logic error in PLy_trigger_build_args.

The "pltargs" variable wasn't marked volatile, which makes it unsafe
to change its value within the PG_TRY block.  It looks like the worst
outcome would be to fail to release a refcount on Py_None during an
(improbable) error exit, which would likely go unnoticed in the field.
Still, it's a bug.  A one-liner fix could be to mark pltargs volatile,
but on the whole it seems cleaner to arrange things so that we don't
change its value within PG_TRY.

Per report from Xing Guo.  This has been there for quite awhile,
so back-patch to all supported branches.

Discussion: https://postgr.es/m/CACpMh+DLrk=fDv07MNpBT4J413fDAm+gmMXgi8cjPONE+jvzuw@mail.gmail.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/30fe8a7ba07efc84caba06bce536c0a273ef5655

Modified Files
--------------
src/pl/plpython/plpy_exec.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2024-04-01 19:15 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-04-01 19:15 pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_ Tom Lane <tgl@sss.pgh.pa.us>
2024-04-01 19:15 pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_ Tom Lane <tgl@sss.pgh.pa.us>
2024-04-01 19:15 pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_ Tom Lane <tgl@sss.pgh.pa.us>
2024-04-01 19:15 pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_ Tom Lane <tgl@sss.pgh.pa.us>
2024-04-01 19:15 pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_ Tom Lane <tgl@sss.pgh.pa.us>
2024-04-01 19:15 pgsql: Avoid possible longjmp-induced logic error in PLy_trigger_build_ Tom Lane <tgl@sss.pgh.pa.us>

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