Re: BUG #18247: Integer overflow leads to negative width

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: rekgrpth(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18247: Integer overflow leads to negative width
Date: 2023-12-14 10:34:44
Message-ID: CAMbWs48nZf9XgAVpXbOnwGWWLnmoOZb51wnhkNW5xfz_PyOyCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Dec 14, 2023 at 5:29 PM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

> EXPLAIN SELECT * FROM t;
> QUERY PLAN
> ------------------------------------------------------------
> Seq Scan on t (cost=0.00..10.00 rows=1 width=-2113929008)
> (1 row)

Interesting. In an Assert-enabled build this query will cause the
Assert failure in set_rel_width().

Assert(tuple_width >= 0);

Can we just error out when an overflow occurs?

Thanks
Richard

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Julien Rouhaud 2023-12-14 10:57:40 Re: BUG #18247: Integer overflow leads to negative width
Previous Message Laurenz Albe 2023-12-14 08:44:33 Re: BUG #18244: Corruption in indexes involving whole-row expressions