- Notifications
You must be signed in to change notification settings - Fork28
Commit6dd9f35
committed
Fix bogus CALLED_AS_TRIGGER() defenses.
contrib/lo's lo_manage() thought it could usetrigdata->tg_trigger->tgname in its error message aboutnot being called as a trigger. That naturally led to a core dump.unique_key_recheck() figured it could Assert that fcinfo->contextis a TriggerData node in advance of having checked that it'sbeing called as a trigger. That's harmless in production builds,and perhaps not that easy to reach in any case, but it's logicallywrong.The first of these per bug #16340 from William Crowell;the second from manual inspection of other CALLED_AS_TRIGGERcall sites.Back-patch the lo.c change to all supported branches, theother to v10 where the thinko crept in.Discussion:https://postgr.es/m/16340-591c7449dc7c8c47@postgresql.org1 parent19db23b commit6dd9f35
2 files changed
+2
-3
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 |
| - | |
37 |
| - | |
| 36 | + | |
38 | 37 |
| |
39 | 38 |
| |
40 | 39 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 |
| - | |
| 43 | + | |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
|
0 commit comments
Comments
(0)