pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix bogus CALLED_AS_TRIGGER() defenses.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix bogus CALLED_AS_TRIGGER() defenses.
@ 2020-04-03 15:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-04-03 15:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix bogus CALLED_AS_TRIGGER() defenses.

contrib/lo's lo_manage() thought it could use
trigdata->tg_trigger->tgname in its error message about
not being called as a trigger.  That naturally led to a core dump.

unique_key_recheck() figured it could Assert that fcinfo->context
is a TriggerData node in advance of having checked that it's
being called as a trigger.  That's harmless in production builds,
and perhaps not that easy to reach in any case, but it's logically
wrong.

The first of these per bug #16340 from William Crowell;
the second from manual inspection of other CALLED_AS_TRIGGER
call sites.

Back-patch the lo.c change to all supported branches, the
other to v10 where the thinko crept in.

Discussion: https://postgr.es/m/16340-591c7449dc7c8c47@postgresql.org

Branch
------
REL_12_STABLE

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

Modified Files
--------------
contrib/lo/lo.c                   | 3 +--
src/backend/commands/constraint.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)



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

* pgsql: Fix bogus CALLED_AS_TRIGGER() defenses.
@ 2020-04-03 15:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-04-03 15:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix bogus CALLED_AS_TRIGGER() defenses.

contrib/lo's lo_manage() thought it could use
trigdata->tg_trigger->tgname in its error message about
not being called as a trigger.  That naturally led to a core dump.

unique_key_recheck() figured it could Assert that fcinfo->context
is a TriggerData node in advance of having checked that it's
being called as a trigger.  That's harmless in production builds,
and perhaps not that easy to reach in any case, but it's logically
wrong.

The first of these per bug #16340 from William Crowell;
the second from manual inspection of other CALLED_AS_TRIGGER
call sites.

Back-patch the lo.c change to all supported branches, the
other to v10 where the thinko crept in.

Discussion: https://postgr.es/m/16340-591c7449dc7c8c47@postgresql.org

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/85f0d470380902c8c62d0165c349c82d81c3e056

Modified Files
--------------
contrib/lo/lo.c                   | 3 +--
src/backend/commands/constraint.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)



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

* pgsql: Fix bogus CALLED_AS_TRIGGER() defenses.
@ 2020-04-03 15:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-04-03 15:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix bogus CALLED_AS_TRIGGER() defenses.

contrib/lo's lo_manage() thought it could use
trigdata->tg_trigger->tgname in its error message about
not being called as a trigger.  That naturally led to a core dump.

unique_key_recheck() figured it could Assert that fcinfo->context
is a TriggerData node in advance of having checked that it's
being called as a trigger.  That's harmless in production builds,
and perhaps not that easy to reach in any case, but it's logically
wrong.

The first of these per bug #16340 from William Crowell;
the second from manual inspection of other CALLED_AS_TRIGGER
call sites.

Back-patch the lo.c change to all supported branches, the
other to v10 where the thinko crept in.

Discussion: https://postgr.es/m/16340-591c7449dc7c8c47@postgresql.org

Branch
------
REL9_6_STABLE

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

Modified Files
--------------
contrib/lo/lo.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)



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

* pgsql: Fix bogus CALLED_AS_TRIGGER() defenses.
@ 2020-04-03 15:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-04-03 15:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix bogus CALLED_AS_TRIGGER() defenses.

contrib/lo's lo_manage() thought it could use
trigdata->tg_trigger->tgname in its error message about
not being called as a trigger.  That naturally led to a core dump.

unique_key_recheck() figured it could Assert that fcinfo->context
is a TriggerData node in advance of having checked that it's
being called as a trigger.  That's harmless in production builds,
and perhaps not that easy to reach in any case, but it's logically
wrong.

The first of these per bug #16340 from William Crowell;
the second from manual inspection of other CALLED_AS_TRIGGER
call sites.

Back-patch the lo.c change to all supported branches, the
other to v10 where the thinko crept in.

Discussion: https://postgr.es/m/16340-591c7449dc7c8c47@postgresql.org

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/82bc56e63387176809349b559ee224c11671d818

Modified Files
--------------
contrib/lo/lo.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)



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

* pgsql: Fix bogus CALLED_AS_TRIGGER() defenses.
@ 2020-04-03 15:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-04-03 15:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix bogus CALLED_AS_TRIGGER() defenses.

contrib/lo's lo_manage() thought it could use
trigdata->tg_trigger->tgname in its error message about
not being called as a trigger.  That naturally led to a core dump.

unique_key_recheck() figured it could Assert that fcinfo->context
is a TriggerData node in advance of having checked that it's
being called as a trigger.  That's harmless in production builds,
and perhaps not that easy to reach in any case, but it's logically
wrong.

The first of these per bug #16340 from William Crowell;
the second from manual inspection of other CALLED_AS_TRIGGER
call sites.

Back-patch the lo.c change to all supported branches, the
other to v10 where the thinko crept in.

Discussion: https://postgr.es/m/16340-591c7449dc7c8c47@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6dd9f357792545b626e28b2e1f73cb4c32c437f1

Modified Files
--------------
contrib/lo/lo.c                   | 3 +--
src/backend/commands/constraint.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)



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

* pgsql: Fix bogus CALLED_AS_TRIGGER() defenses.
@ 2020-04-03 15:25  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-04-03 15:25 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix bogus CALLED_AS_TRIGGER() defenses.

contrib/lo's lo_manage() thought it could use
trigdata->tg_trigger->tgname in its error message about
not being called as a trigger.  That naturally led to a core dump.

unique_key_recheck() figured it could Assert that fcinfo->context
is a TriggerData node in advance of having checked that it's
being called as a trigger.  That's harmless in production builds,
and perhaps not that easy to reach in any case, but it's logically
wrong.

The first of these per bug #16340 from William Crowell;
the second from manual inspection of other CALLED_AS_TRIGGER
call sites.

Back-patch the lo.c change to all supported branches, the
other to v10 where the thinko crept in.

Discussion: https://postgr.es/m/16340-591c7449dc7c8c47@postgresql.org

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7b1552283465acc10a88038fe87c7901198c3b5e

Modified Files
--------------
contrib/lo/lo.c                   | 3 +--
src/backend/commands/constraint.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)



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


end of thread, other threads:[~2020-04-03 15:25 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 15:25 pgsql: Fix bogus CALLED_AS_TRIGGER() defenses. Tom Lane <tgl@sss.pgh.pa.us>
2020-04-03 15:25 pgsql: Fix bogus CALLED_AS_TRIGGER() defenses. Tom Lane <tgl@sss.pgh.pa.us>
2020-04-03 15:25 pgsql: Fix bogus CALLED_AS_TRIGGER() defenses. Tom Lane <tgl@sss.pgh.pa.us>
2020-04-03 15:25 pgsql: Fix bogus CALLED_AS_TRIGGER() defenses. Tom Lane <tgl@sss.pgh.pa.us>
2020-04-03 15:25 pgsql: Fix bogus CALLED_AS_TRIGGER() defenses. Tom Lane <tgl@sss.pgh.pa.us>
2020-04-03 15:25 pgsql: Fix bogus CALLED_AS_TRIGGER() defenses. 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