pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix edge-case for xl_tot_len broken by bae868ca. 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix edge-case for xl_tot_len broken by bae868ca. @ 2023-09-25 22:12 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-09-25 22:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix edge-case for xl_tot_len broken by bae868ca. bae868ca removed a check that was still needed. If you had an xl_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 perform the CRC check using a bogus large length. Because of arbitrary coding differences between the CRC implementations on different platforms, nothing very bad happened on common modern systems. On systems using the _sb8.c fallback we could segfault. Restore that check, add a new assertion and supply a test for that case. Back-patch to 12, like bae868ca. 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.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/becfbdd6c1c94fe03391368080029a6dd8523658 Modified Files -------------- src/backend/access/transam/xlogreader.c | 11 +++++++++++ src/test/recovery/t/039_end_of_wal.pl | 13 +++++++++++++ 2 files changed, 24 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix edge-case for xl_tot_len broken by bae868ca. @ 2023-09-25 22:12 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-09-25 22:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix edge-case for xl_tot_len broken by bae868ca. bae868ca removed a check that was still needed. If you had an xl_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 perform the CRC check using a bogus large length. Because of arbitrary coding differences between the CRC implementations on different platforms, nothing very bad happened on common modern systems. On systems using the _sb8.c fallback we could segfault. Restore that check, add a new assertion and supply a test for that case. Back-patch to 12, like bae868ca. 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.com Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/10d0591ea2274e5a471a1a489f7714303b88c329 Modified Files -------------- src/backend/access/transam/xlogreader.c | 11 +++++++++++ src/test/recovery/t/039_end_of_wal.pl | 13 +++++++++++++ 2 files changed, 24 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix edge-case for xl_tot_len broken by bae868ca. @ 2023-09-25 22:12 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-09-25 22:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix edge-case for xl_tot_len broken by bae868ca. bae868ca removed a check that was still needed. If you had an xl_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 perform the CRC check using a bogus large length. Because of arbitrary coding differences between the CRC implementations on different platforms, nothing very bad happened on common modern systems. On systems using the _sb8.c fallback we could segfault. Restore that check, add a new assertion and supply a test for that case. Back-patch to 12, like bae868ca. 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.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/99d334a187ae5c283aca1c31b9fad0cea140a4b2 Modified Files -------------- src/backend/access/transam/xlogreader.c | 11 +++++++++++ src/test/recovery/t/039_end_of_wal.pl | 13 +++++++++++++ 2 files changed, 24 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix edge-case for xl_tot_len broken by bae868ca. @ 2023-09-25 22:12 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-09-25 22:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix edge-case for xl_tot_len broken by bae868ca. bae868ca removed a check that was still needed. If you had an xl_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 perform the CRC check using a bogus large length. Because of arbitrary coding differences between the CRC implementations on different platforms, nothing very bad happened on common modern systems. On systems using the _sb8.c fallback we could segfault. Restore that check, add a new assertion and supply a test for that case. Back-patch to 12, like bae868ca. 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.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3d413c5a76fab4e374960ba6929545469c44aa13 Modified Files -------------- src/backend/access/transam/xlogreader.c | 11 +++++++++++ src/test/recovery/t/039_end_of_wal.pl | 13 +++++++++++++ 2 files changed, 24 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix edge-case for xl_tot_len broken by bae868ca. @ 2023-09-25 22:13 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-09-25 22:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix edge-case for xl_tot_len broken by bae868ca. bae868ca removed a check that was still needed. If you had an xl_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 perform the CRC check using a bogus large length. Because of arbitrary coding differences between the CRC implementations on different platforms, nothing very bad happened on common modern systems. On systems using the _sb8.c fallback we could segfault. Restore that check, add a new assertion and supply a test for that case. Back-patch to 12, like bae868ca. 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.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/45d1fe8b53d44d94059e55264514afa589759d51 Modified Files -------------- src/backend/access/transam/xlogreader.c | 11 +++++++++++ src/test/recovery/t/039_end_of_wal.pl | 13 +++++++++++++ 2 files changed, 24 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix edge-case for xl_tot_len broken by bae868ca. @ 2023-09-25 22:13 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Thomas Munro @ 2023-09-25 22:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix edge-case for xl_tot_len broken by bae868ca. bae868ca removed a check that was still needed. If you had an xl_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 perform the CRC check using a bogus large length. Because of arbitrary coding differences between the CRC implementations on different platforms, nothing very bad happened on common modern systems. On systems using the _sb8.c fallback we could segfault. Restore that check, add a new assertion and supply a test for that case. Back-patch to 12, like bae868ca. 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.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bde2f1847f51577b8e5a13a3ccc2cda9626fb214 Modified Files -------------- src/backend/access/transam/xlogreader.c | 11 +++++++++++ src/test/recovery/t/039_end_of_wal.pl | 13 +++++++++++++ 2 files changed, 24 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2023-09-25 22:13 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-09-25 22:12 pgsql: Fix edge-case for xl_tot_len broken by bae868ca. Thomas Munro <tmunro@postgresql.org> 2023-09-25 22:12 pgsql: Fix edge-case for xl_tot_len broken by bae868ca. Thomas Munro <tmunro@postgresql.org> 2023-09-25 22:12 pgsql: Fix edge-case for xl_tot_len broken by bae868ca. Thomas Munro <tmunro@postgresql.org> 2023-09-25 22:12 pgsql: Fix edge-case for xl_tot_len broken by bae868ca. Thomas Munro <tmunro@postgresql.org> 2023-09-25 22:13 pgsql: Fix edge-case for xl_tot_len broken by bae868ca. Thomas Munro <tmunro@postgresql.org> 2023-09-25 22:13 pgsql: Fix edge-case for xl_tot_len broken by bae868ca. Thomas Munro <tmunro@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox