pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16861: Undefined behavior in power_var_int under the address sanitizer when exponent is INT_MIN
2+ messages / 2 participants
[nested] [flat]
* BUG #16861: Undefined behavior in power_var_int under the address sanitizer when exponent is INT_MIN
@ 2021-02-11 22:59 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2021-02-11 22:59 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: niranjann@google.com
The following bug has been logged on the website:
Bug reference: 16861
Logged by: Niranjan Nilakantan
Email address: niranjann@google.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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #16861: Undefined behavior in power_var_int under the address sanitizer when exponent is INT_MIN
@ 2021-03-09 16:29 Bruce Momjian <bruce@momjian.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2021-03-09 16:29 UTC (permalink / raw)
To: niranjann@google.com; pgsql-bugs@lists.postgresql.org
On Thu, Feb 11, 2021 at 10:59:47PM +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 16861
> Logged by: Niranjan Nilakantan
> Email address: niranjann@google.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.
Uh, I think we are trying to test for overflow here, which is why it is
triggering the warning.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-03-09 16:29 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 22:59 BUG #16861: Undefined behavior in power_var_int under the address sanitizer when exponent is INT_MIN PG Bug reporting form <noreply@postgresql.org>
2021-03-09 16:29 ` Bruce Momjian <bruce@momjian.us>
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