forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbde2f18
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 parentfd7a114 commitbde2f18
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 | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
333 | 342 | | |
334 | 343 | | |
335 | 344 | | |
| |||
745 | 754 | | |
746 | 755 | | |
747 | 756 | | |
| 757 | + | |
| 758 | + | |
748 | 759 | | |
749 | 760 | | |
750 | 761 | | |
| |||
| 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)