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