pgsql: Further reduce dependence on -fwrapv semantics in jsonb.

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Further reduce dependence on -fwrapv semantics in jsonb.
Date: 2024-08-16 20:07:15
Message-ID: E1sf3EB-0001jj-OZ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Further reduce dependence on -fwrapv semantics in jsonb.

Commit 108d2adb9e missed updating a few places in the jsonb code
that rely on signed integer wrapping for correctness. These can
also be fixed by using pg_abs_s32() to negate a signed integer
(that is known to be negative) for comparison with an unsigned
integer.

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/bfff906f-300d-81ea-83b7-f2c93845e7f2%40gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1d80d6b50e6401828fc445151375f9bde3f99ac6

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2024-08-16 22:36:45 pgsql: Relocate a badly placed Assert in COPY FROM code
Previous Message Robert Haas 2024-08-16 19:16:26 pgsql: pg_verifybackup: Move some declarations to new pg_verifybackup.h