Commit 6ab5835
committed
Work around gcc 4.6.0 bug that breaks WAL replay.
ReadRecord's habit of using both direct references to tmpRecPtr and
references to *RecPtr (which is pointing at tmpRecPtr) triggers an
optimization bug in gcc 4.6.0, which apparently has forgotten about
aliasing rules. Avoid the compiler bug, and make the code more readable
to boot, by getting rid of the direct references. Improve the comments
while at it.
Back-patch to all supported versions, in case they get built with 4.6.0.
Tom Lane, with some cosmetic suggestions from Alex Hunsaker1 parent 376f93e commit 6ab5835
1 file changed
+11
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3041 | 3041 | | |
3042 | 3042 | | |
3043 | 3043 | | |
3044 | | - | |
3045 | | - | |
3046 | | - | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
3047 | 3047 | | |
3048 | | - | |
3049 | | - | |
| 3048 | + | |
| 3049 | + | |
3050 | 3050 | | |
3051 | 3051 | | |
3052 | 3052 | | |
| |||
3132 | 3132 | | |
3133 | 3133 | | |
3134 | 3134 | | |
3135 | | - | |
3136 | | - | |
3137 | | - | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
3138 | 3139 | | |
3139 | | - | |
| 3140 | + | |
| 3141 | + | |
3140 | 3142 | | |
3141 | 3143 | | |
3142 | 3144 | | |
| |||
0 commit comments