- Notifications
You must be signed in to change notification settings - Fork5
Commitf6a3b87
committed
Reset CurrentMemoryContext to TopMemoryContext at the beginning of error
cleanup, ie, as soon as we have caught the longjmp. This ensures thatcurrent context will be a valid context throughout error cleanup. Beforeit was possible that current context was pointing at a context that wouldget deleted during cleanup, leaving any subsequent pallocs in deeptrouble. I was able to provoke an Assert failure when compiled withasserts + -DCLOBBER_FREED_MEMORY, if I did something that would causean error to be reported by the backend large-object code, because indeedthat code operates in a context that gets deleted partway through xactabort --- and CurrentMemoryContext was still pointing at it! Boo hiss.1 parente0095c6 commitf6a3b87
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
130 |
| - | |
131 | 130 |
| |
132 | 131 |
| |
133 | 132 |
| |
| |||
1453 | 1452 |
| |
1454 | 1453 |
| |
1455 | 1454 |
| |
1456 |
| - | |
| 1455 | + | |
1457 | 1456 |
| |
1458 | 1457 |
| |
1459 | 1458 |
| |
| |||
1473 | 1472 |
| |
1474 | 1473 |
| |
1475 | 1474 |
| |
1476 |
| - | |
| 1475 | + | |
| 1476 | + | |
1477 | 1477 |
| |
1478 | 1478 |
| |
1479 | 1479 |
| |
|
0 commit comments
Comments
(0)