forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit25936fd
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 parent388b959 commit25936fd
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 | |
---|---|---|---|
| |||
3536 | 3536 |
| |
3537 | 3537 |
| |
3538 | 3538 |
| |
| 3539 | + | |
| 3540 | + | |
3539 | 3541 |
| |
3540 | 3542 |
| |
3541 | 3543 |
| |
| |||
4336 | 4338 |
| |
4337 | 4339 |
| |
4338 | 4340 |
| |
| 4341 | + | |
| 4342 | + | |
| 4343 | + | |
| 4344 | + | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
| 4348 | + | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
| 4352 | + | |
| 4353 | + | |
| 4354 | + | |
| 4355 | + | |
| 4356 | + | |
| 4357 | + | |
| 4358 | + | |
| 4359 | + | |
| 4360 | + | |
| 4361 | + | |
| 4362 | + | |
| 4363 | + | |
| 4364 | + | |
| 4365 | + | |
4339 | 4366 |
| |
4340 | 4367 |
| |
4341 | 4368 |
| |
| |||
4625 | 4652 |
| |
4626 | 4653 |
| |
4627 | 4654 |
| |
| 4655 | + | |
| 4656 | + | |
4628 | 4657 |
| |
4629 | 4658 |
| |
4630 | 4659 |
| |
| |||
5474 | 5503 |
| |
5475 | 5504 |
| |
5476 | 5505 |
| |
| 5506 | + | |
5477 | 5507 |
| |
5478 | 5508 |
| |
5479 |
| - | |
5480 |
| - | |
5481 |
| - | |
5482 |
| - | |
5483 |
| - | |
5484 |
| - | |
5485 |
| - | |
5486 |
| - | |
5487 |
| - | |
| 5509 | + | |
5488 | 5510 |
| |
5489 | 5511 |
| |
5490 | 5512 |
| |
| |||
5504 | 5526 |
| |
5505 | 5527 |
| |
5506 | 5528 |
| |
| 5529 | + | |
5507 | 5530 |
| |
5508 | 5531 |
| |
5509 |
| - | |
5510 |
| - | |
5511 |
| - | |
5512 |
| - | |
5513 |
| - | |
5514 |
| - | |
5515 |
| - | |
5516 |
| - | |
5517 |
| - | |
5518 |
| - | |
| 5532 | + | |
5519 | 5533 |
| |
5520 | 5534 |
| |
5521 | 5535 |
| |
|
Lines changed: 59 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3290 | 3290 |
| |
3291 | 3291 |
| |
3292 | 3292 |
| |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + |
Lines changed: 65 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2470 | 2470 |
| |
2471 | 2471 |
| |
2472 | 2472 |
| |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + |
0 commit comments
Comments
(0)