BUG #16861: Undefined behavior in power_var_int under the address sanitizer when exponent is INT_MIN

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: niranjann(at)google(dot)com
Subject: BUG #16861: Undefined behavior in power_var_int under the address sanitizer when exponent is INT_MIN
Date: 2021-02-11 22:59:47
Message-ID: 16861-99957d36bb049ed7@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16861
Logged by: Niranjan Nilakantan
Email address: niranjann(at)google(dot)com
PostgreSQL version: 13.2
Operating system: Linux
Description:

The newly added test from
https://github.com/postgres/postgres/commit/bc43b7c2c06c32264efe79d0b86abd41236f1d5b
triggers an overflow/undefined behavior at this line
https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/numeric.c#L10299

Target contains warnings: UndefinedBehaviorSanitizer:
signed-integer-overflow .../src/backend/utils/adt/numeric.c:10299

This applies to all versions of Postgres.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Devrim Gündüz 2021-02-12 01:10:02 Re: BUG #16859: PostGIS 30 and 31 installation on SLES15 SP2 missing package SFCGAL or gmp
Previous Message Tom Lane 2021-02-11 17:18:15 Re: BUG #16860: Documentation: GUC Parameters are not explained