Re: [sqlsmith] Infinite recursion in bitshift

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Seltenreich <seltenreich(at)gmx(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [sqlsmith] Infinite recursion in bitshift
Date: 2016-10-14 19:24:36
Message-ID: 17165.1476473076@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas Seltenreich <seltenreich(at)gmx(dot)de> writes:
> sqlsmith just found another crasher:
> select bit '1' >> (-2^31)::int;

Nice catch :-)

> This is due to an integer overflow in bitshiftright()/bitshiftleft()
> leading to them recursively calling each other. Patch attached.

Seems sane, though I wonder if it'd be better to use -INT_MAX rather
than -VARBITMAXLEN.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Seltenreich 2016-10-14 19:34:42 Re: [sqlsmith] Infinite recursion in bitshift
Previous Message Andreas Seltenreich 2016-10-14 19:13:44 [sqlsmith] Infinite recursion in bitshift