forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit262eb99
committed
Fix use-after-free bug with AfterTriggersTableData.storeslot
AfterTriggerSaveEvent() wrongly allocates the slot in execution-spanmemory context, whereas the correct thing is to allocate it ina transaction-span context, because that's where the enclosingAfterTriggersTableData instance belongs into.Backpatch to 12 (the test back to 11, where it works well with no codechanges, and it's good to have to confirm that the case was previouslywell supported); this bug seems introduced by commitff11e7f.Reported-by: Bertrand Drouvot <bdrouvot@amazon.com>Author: Amit Langote <amitlangote09@gmail.com>Discussion:https://postgr.es/m/39a71864-b120-5a5c-8cc5-c632b6f16761@amazon.com1 parentfb1e218 commit262eb99
File tree
3 files changed
+157
-19
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+157
-19
lines changedLines changed: 33 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3832 | 3832 |
| |
3833 | 3833 |
| |
3834 | 3834 |
| |
| 3835 | + | |
| 3836 | + | |
3835 | 3837 |
| |
3836 | 3838 |
| |
3837 | 3839 |
| |
| |||
4634 | 4636 |
| |
4635 | 4637 |
| |
4636 | 4638 |
| |
| 4639 | + | |
| 4640 | + | |
| 4641 | + | |
| 4642 | + | |
| 4643 | + | |
| 4644 | + | |
| 4645 | + | |
| 4646 | + | |
| 4647 | + | |
| 4648 | + | |
| 4649 | + | |
| 4650 | + | |
| 4651 | + | |
| 4652 | + | |
| 4653 | + | |
| 4654 | + | |
| 4655 | + | |
| 4656 | + | |
| 4657 | + | |
| 4658 | + | |
| 4659 | + | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + | |
| 4663 | + | |
4637 | 4664 |
| |
4638 | 4665 |
| |
4639 | 4666 |
| |
| |||
4922 | 4949 |
| |
4923 | 4950 |
| |
4924 | 4951 |
| |
| 4952 | + | |
| 4953 | + | |
4925 | 4954 |
| |
4926 | 4955 |
| |
4927 | 4956 |
| |
| |||
5771 | 5800 |
| |
5772 | 5801 |
| |
5773 | 5802 |
| |
| 5803 | + | |
5774 | 5804 |
| |
5775 | 5805 |
| |
5776 |
| - | |
5777 |
| - | |
5778 |
| - | |
5779 |
| - | |
5780 |
| - | |
5781 |
| - | |
5782 |
| - | |
5783 |
| - | |
5784 |
| - | |
| 5806 | + | |
5785 | 5807 |
| |
5786 | 5808 |
| |
5787 | 5809 |
| |
| |||
5801 | 5823 |
| |
5802 | 5824 |
| |
5803 | 5825 |
| |
| 5826 | + | |
5804 | 5827 |
| |
5805 | 5828 |
| |
5806 |
| - | |
5807 |
| - | |
5808 |
| - | |
5809 |
| - | |
5810 |
| - | |
5811 |
| - | |
5812 |
| - | |
5813 |
| - | |
5814 |
| - | |
5815 |
| - | |
| 5829 | + | |
5816 | 5830 |
| |
5817 | 5831 |
| |
5818 | 5832 |
| |
|
Lines changed: 59 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3083 | 3083 |
| |
3084 | 3084 |
| |
3085 | 3085 |
| |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + |
Lines changed: 65 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2296 | 2296 |
| |
2297 | 2297 |
| |
2298 | 2298 |
| |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + |
0 commit comments
Comments
(0)