forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit45d1fe8
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 parentd1c76fd commit45d1fe8
File tree
2 files changed
+24
-0
lines changed- src
- backend/access/transam
- test/recovery/t
2 files changed
+24
-0
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
380 | 380 |
| |
381 | 381 |
| |
382 | 382 |
| |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
383 | 392 |
| |
384 | 393 |
| |
385 | 394 |
| |
| |||
795 | 804 |
| |
796 | 805 |
| |
797 | 806 |
| |
| 807 | + | |
| 808 | + | |
798 | 809 |
| |
799 | 810 |
| |
800 | 811 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
287 | 287 |
| |
288 | 288 |
| |
289 | 289 |
| |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
290 | 303 |
| |
291 | 304 |
| |
292 | 305 |
| |
|
0 commit comments
Comments
(0)