From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: report expected contrecord size
Date: Thu, 03 Sep 2020 18:17:30 -0400
Message-ID: <795510.1599171450@sss.pgh.pa.us> (raw)
In-Reply-To: <20200903220034.GA22006@alvherre.pgsql>
References: <20200903220034.GA22006@alvherre.pgsql>
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Well, the intention there is to cast the first operand (which is uint32)
> so that it turns into signed 64-bits; the subtraction then occurs in 64
> bit arithmetic normally. If I let the subtraction occur in 32-bit width
> unsigned, the result might overflow 32 bits.
Uh ... is it really possible for gotlen to be more than total_len?
(I've not looked at the surrounding code here, but that seems weird.)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com
Subject: Re: report expected contrecord size
In-Reply-To: <795510.1599171450@sss.pgh.pa.us>
References: <20200903220034.GA22006@alvherre.pgsql> <795510.1599171450@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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