Commit f8a4dd2
committed
Fix unsafe coding in ReorderBufferCommit().
"iterstate" must be marked volatile since it's changed inside the PG_TRY
block and then used in the PG_CATCH stanza. Noted by Mark Wilding of
Salesforce. (We really need to see if we can't get the C compiler to warn
about this.)
Also, reset iterstate to NULL after the mainline ReorderBufferIterTXNFinish
call, to ensure the PG_CATCH block doesn't try to do that a second time.1 parent 586dd5d commit f8a4dd2
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1258 | 1258 | | |
1259 | 1259 | | |
1260 | 1260 | | |
1261 | | - | |
| 1261 | + | |
1262 | 1262 | | |
1263 | 1263 | | |
1264 | 1264 | | |
| |||
1303 | 1303 | | |
1304 | 1304 | | |
1305 | 1305 | | |
1306 | | - | |
1307 | 1306 | | |
1308 | 1307 | | |
1309 | 1308 | | |
| |||
1472 | 1471 | | |
1473 | 1472 | | |
1474 | 1473 | | |
| 1474 | + | |
1475 | 1475 | | |
| 1476 | + | |
1476 | 1477 | | |
1477 | 1478 | | |
1478 | 1479 | | |
| |||
1639 | 1640 | | |
1640 | 1641 | | |
1641 | 1642 | | |
1642 | | - | |
| 1643 | + | |
1643 | 1644 | | |
1644 | 1645 | | |
1645 | 1646 | | |
| |||
0 commit comments