pgsql: pg_mblen_range, pg_mblen_with_len: Valgrind after encoding erepo

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_mblen_range, pg_mblen_with_len: Valgrind after encoding erepo
Date: 2026-02-14 20:17:29
Message-ID: E1vrM52-000o96-1i@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_mblen_range, pg_mblen_with_len: Valgrind after encoding ereport.

The prior order caused spurious Valgrind errors. They're spurious
because the ereport(ERROR) non-local exit discards the pointer in
question. pg_mblen_cstr() ordered the checks correctly, but these other
two did not. Back-patch to v14, like commit
1e7fe06c10c0a8da9dd6261a6be8d405dc17c728.

Reviewed-by: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Discussion: https://postgr.es/m/20260214053821.fa.noahmisch@microsoft.com
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/45eb47230d93a652873e9b0f94e2f1b04181a8cc

Modified Files
--------------
src/backend/utils/mb/mbutils.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Etsuro Fujita 2026-02-15 08:40:13 Re: pgsql: postgres_fdw: Inherit the local transaction's access/deferrable
Previous Message John Naylor 2026-02-14 06:52:51 pgsql: Perform radix sort on SortTuples with pass-by-value Datums