forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbecfbdd
committed
Fix edge-case for xl_tot_len broken bybae868c.
bae868c removed a check that was still needed. If you had anxl_tot_len at the end of a page that was too small for a record header,but not big enough to span onto the next page, we'd immediately performthe CRC check using a bogus large length. Because of arbitrary codingdifferences between the CRC implementations on different platforms,nothing very bad happened on common modern systems. On systems usingthe _sb8.c fallback we could segfault.Restore that check, add a new assertion and supply a test for that case.Back-patch to 12, likebae868c.Tested-by: Tom Lane <tgl@sss.pgh.pa.us>Tested-by: Alexander Lakhin <exclusion@gmail.com>Discussion:https://postgr.es/m/CA%2BhUKGLCkTT7zYjzOxuLGahBdQ%3DMcF%3Dz5ZvrjSOnW4EDhVjT-g%40mail.gmail.com1 parent13aeaf0 commitbecfbdd
File tree
2 files changed
+24
-0
lines changed- src
- backend/access/transam
- test/recovery/t
2 files changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
656 | 665 | | |
657 | 666 | | |
658 | 667 | | |
| |||
1190 | 1199 | | |
1191 | 1200 | | |
1192 | 1201 | | |
| 1202 | + | |
| 1203 | + | |
1193 | 1204 | | |
1194 | 1205 | | |
1195 | 1206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
284 | 297 | | |
285 | 298 | | |
286 | 299 | | |
| |||
0 commit comments
Comments
(0)