pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Ensure that length argument of memcmp() isn't seen as negative.
Date: Tue, 15 Feb 2022 14:46:25 -0800
Message-ID: <20220215224625.poqi7mrwtkhcsdpv@alap3.anarazel.de> (raw)
In-Reply-To: <E1nK6J5-0001rN-Kl@gemulon.postgresql.org>
References: <E1nK6J5-0001rN-Kl@gemulon.postgresql.org>

Hi,

On 2022-02-15 22:28:23 +0000, Tom Lane wrote:
> Ensure that length argument of memcmp() isn't seen as negative.
> 
> I think this will shut up a weird warning from buildfarm member
> serinus.  Perhaps it'd be better to change tsCompareString's
> length arguments to unsigned, but that seems more invasive
> than is justified.

Just FYI, I'd reported this to gcc some time last year
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100442
and then forgot about it.

They're not wrong there is the possibility of exceeding the bounds, but the
error message still is quite confusing.

Greetings,

Andres Freund





view thread (2+ messages)

Message-ID: <20220215224625.poqi7mrwtkhcsdpv@alap3.anarazel.de>
Permalink:  ../20220215224625.poqi7mrwtkhcsdpv@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20220215224625.poqi7mrwtkhcsdpv@alap3.anarazel.de

 · 

reply

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-committers@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Ensure that length argument of memcmp() isn't seen as negative.
  In-Reply-To: <20220215224625.poqi7mrwtkhcsdpv@alap3.anarazel.de>
  References: <E1nK6J5-0001rN-Kl@gemulon.postgresql.org> <20220215224625.poqi7mrwtkhcsdpv@alap3.anarazel.de>

* 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