postgresql/src/backend
Thomas Munro becfbdd6c1 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
2023-09-26 10:53:38 +13:00
..
access Fix edge-case for xl_tot_len broken by bae868ca. 2023-09-26 10:53:38 +13:00
archive Redesign archive modules 2023-02-17 14:26:42 +09:00
backup Move PG_TEMP_FILE* macros to file_utils.h. 2023-09-05 17:02:06 -07:00
bootstrap Make error messages about WAL segment size more consistent 2023-08-28 15:17:04 +02:00
catalog Add worker type to pg_stat_subscription. 2023-09-25 14:12:43 -07:00
commands Add GUC for temporarily disabling event triggers 2023-09-25 12:41:49 +02:00
executor Fix RLS policy usage in MERGE. 2023-08-07 09:28:47 +01:00
foreign Expand some more uses of "deleg" to "delegation" or "delegated". 2023-05-21 10:55:18 -04:00
jit Add JIT deform_counter 2023-09-08 15:05:12 +02:00
lib Make binaryheap available to frontend code. 2023-09-18 12:18:33 -07:00
libpq Avoid potential pfree on NULL on OpenSSL errors 2023-09-22 11:18:25 +02:00
main Remove obsolete defense against strxfrm() bugs. 2023-04-20 13:20:14 +12:00
nodes Catalog not-null constraints 2023-08-25 13:31:24 +02:00
optimizer Collect dependency information for parsed CallStmts. 2023-09-25 14:42:17 -04:00
parser Track nesting depth correctly when drilling down into RECORD Vars. 2023-09-15 17:01:52 -04:00
partitioning Add missing ObjectIdGetDatum() in syscache lookup calls for Oids 2023-07-20 15:18:25 +09:00
po Translation updates 2023-08-07 12:39:30 +02:00
port Add GUC parameter "huge_pages_status" 2023-07-06 14:42:36 +09:00
postmaster Move PG_TEMP_FILE* macros to file_utils.h. 2023-09-05 17:02:06 -07:00
regex All supported systems have locale_t. 2023-07-09 11:55:18 +12:00
replication Add worker type to pg_stat_subscription. 2023-09-25 14:12:43 -07:00
rewrite Fix RLS policy usage in MERGE. 2023-08-07 09:28:47 +01:00
snowball Fix the install rule for snowball_create.sql. 2023-05-23 11:15:57 -04:00
statistics Take pg_attribute out of VacAttrStats 2023-07-03 07:18:57 +02:00
storage Standardize type of extend_by counter 2023-09-19 09:46:01 +02:00
tcop Fix recovery conflict SIGUSR1 handling. 2023-09-07 12:39:24 +12:00
tsearch Limit to_tsvector_byid's initial array allocation to something sane. 2023-09-25 11:50:28 -04:00
utils Doc: improve cross-reference in Makefile comment. 2023-09-25 11:25:19 -04:00
.gitignore
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Add system view pg_wait_events 2023-08-20 15:35:02 +09:00
meson.build Add win32ver data to meson-built postgres.exe. 2023-06-12 07:40:38 -07:00
nls.mk Add missing gettext triggers 2023-05-10 13:51:51 +02:00