Commit 0aa1e9a
committed
Fix possible crash due to incorrect allocation context.
Commit af33039 aimed to reduce
leakage from tqueue.c, which is good. Unfortunately, by changing the
memory context in which all of gather_readnext() executes, it also
changed the context in which ExecShutdownGatherWorkers executes, which
is not good, because that function eventually causes a call to
ExecParallelRetrieveInstrumentation, which proceeds to allocate
planstate->worker_instrument in a short-lived context, causing a
crash.
Rushabh Lathia, reviewed by Amit Kapila and by me.1 parent d95a7c3 commit 0aa1e9a
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
| 503 | + | |
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
| |||
514 | 515 | | |
515 | 516 | | |
516 | 517 | | |
517 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
518 | 526 | | |
519 | 527 | | |
520 | 528 | | |
| 529 | + | |
| 530 | + | |
521 | 531 | | |
522 | 532 | | |
523 | 533 | | |
| |||
0 commit comments