pgsql: Fix portability issue in new jsonbsubs code.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix portability issue in new jsonbsubs code.
Date: 2021-02-01 07:04:03
Message-ID: E1l6TFj-0005CC-IN@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix portability issue in new jsonbsubs code.

On machines where sizeof(Datum) > sizeof(Oid) (that is, any 64-bit
platform), the previous coding would compute a misaligned
workspace->index pointer if nupper is odd. Architectures where
misaligned access is a hard no-no would then fail. This appears
to explain why thorntail is unhappy but other buildfarm members
are not.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7c5d57caed4d8af705d0cc3131d0d8ed72b7a41d

Modified Files
--------------
src/backend/utils/adt/jsonbsubs.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-02-01 07:05:10 Re: pgsql: Implementation of subscripting for jsonb
Previous Message Heikki Linnakangas 2021-02-01 06:55:52 Re: pgsql: Implementation of subscripting for jsonb