pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: Ashutosh Bapat <ashutosh.bapat@2ndquadrant.com>
Cc: movead.li@highgo.ca <movead.li@highgo.ca>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: A bug when use get_bit() function for a long bytea string
Date: Fri, 27 Mar 2020 15:19:59 -0400
Message-ID: <20650.1585336799@sss.pgh.pa.us> (raw)
In-Reply-To: <9087da0f-f048-4cd3-a55c-1c03adea5a02@manitou-mail.org>
References: <9087da0f-f048-4cd3-a55c-1c03adea5a02@manitou-mail.org>

"Daniel Verite" <daniel@manitou-mail.org> writes:
> So aside from the integer overflow bug, isn't there the issue that the
> "offset" argument of get_bit() and set_bit() should have been an
> int8 in the first place?

Good point, but a fix for that wouldn't be back-patchable.

It does suggest that we should just make all the internal logic use int8
for these values (as the solution to the overflow issue), and then in
HEAD only, adjust the function signatures so that int8 can be passed in.

			regards, tom lane





view thread (27+ messages)  latest in thread

Message-ID: <20650.1585336799@sss.pgh.pa.us>
Permalink:  ../20650.1585336799@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20650.1585336799@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@manitou-mail.org, ashutosh.bapat@2ndquadrant.com, movead.li@highgo.ca, pgsql-hackers@lists.postgresql.org
  Subject: Re: A bug when use get_bit() function for a long bytea string
  In-Reply-To: <20650.1585336799@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