pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms @ 2023-11-09 10:02 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2023-11-09 10:02 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix corner-case 64-bit integer subtraction bug on some platforms. When computing "0 - INT64_MIN", most platforms would report an overflow error, which is correct. However, platforms without integer overflow builtins or 128-bit integers would fail to spot the overflow, and incorrectly return INT64_MIN. Back-patch to all supported branches. Patch be me. Thanks to Jian He for initial investigation, and Laurenz Albe and Tom Lane for review. Discussion: https://postgr.es/m/CAEZATCUNK-AZSD0jVdgkk0N%3DNcAXBWeAEX-QU9AnJPensikmdQ%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0e3e8fbd3a8b1660b02a5bb032dc1f50e1d66b19 Modified Files -------------- src/include/common/int.h | 6 +++++- src/test/regress/expected/int8.out | 2 ++ src/test/regress/sql/int8.sql | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms @ 2023-11-09 10:02 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2023-11-09 10:02 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix corner-case 64-bit integer subtraction bug on some platforms. When computing "0 - INT64_MIN", most platforms would report an overflow error, which is correct. However, platforms without integer overflow builtins or 128-bit integers would fail to spot the overflow, and incorrectly return INT64_MIN. Back-patch to all supported branches. Patch be me. Thanks to Jian He for initial investigation, and Laurenz Albe and Tom Lane for review. Discussion: https://postgr.es/m/CAEZATCUNK-AZSD0jVdgkk0N%3DNcAXBWeAEX-QU9AnJPensikmdQ%40mail.gmail.com Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c396aca2b712f7872dcc4641a2a0fa553f232f76 Modified Files -------------- src/include/common/int.h | 6 +++++- src/test/regress/expected/int8.out | 2 ++ src/test/regress/sql/int8.sql | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms @ 2023-11-09 10:02 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2023-11-09 10:02 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix corner-case 64-bit integer subtraction bug on some platforms. When computing "0 - INT64_MIN", most platforms would report an overflow error, which is correct. However, platforms without integer overflow builtins or 128-bit integers would fail to spot the overflow, and incorrectly return INT64_MIN. Back-patch to all supported branches. Patch be me. Thanks to Jian He for initial investigation, and Laurenz Albe and Tom Lane for review. Discussion: https://postgr.es/m/CAEZATCUNK-AZSD0jVdgkk0N%3DNcAXBWeAEX-QU9AnJPensikmdQ%40mail.gmail.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/308a69a9878212bc2f96279023ce16070dac9214 Modified Files -------------- src/include/common/int.h | 6 +++++- src/test/regress/expected/int8.out | 2 ++ src/test/regress/sql/int8.sql | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms @ 2023-11-09 10:02 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2023-11-09 10:02 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix corner-case 64-bit integer subtraction bug on some platforms. When computing "0 - INT64_MIN", most platforms would report an overflow error, which is correct. However, platforms without integer overflow builtins or 128-bit integers would fail to spot the overflow, and incorrectly return INT64_MIN. Back-patch to all supported branches. Patch be me. Thanks to Jian He for initial investigation, and Laurenz Albe and Tom Lane for review. Discussion: https://postgr.es/m/CAEZATCUNK-AZSD0jVdgkk0N%3DNcAXBWeAEX-QU9AnJPensikmdQ%40mail.gmail.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/dea12b40d5210332453f4350e1653048b43fdb7a Modified Files -------------- src/include/common/int.h | 6 +++++- src/test/regress/expected/int8.out | 2 ++ src/test/regress/sql/int8.sql | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms @ 2023-11-09 10:02 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2023-11-09 10:02 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix corner-case 64-bit integer subtraction bug on some platforms. When computing "0 - INT64_MIN", most platforms would report an overflow error, which is correct. However, platforms without integer overflow builtins or 128-bit integers would fail to spot the overflow, and incorrectly return INT64_MIN. Back-patch to all supported branches. Patch be me. Thanks to Jian He for initial investigation, and Laurenz Albe and Tom Lane for review. Discussion: https://postgr.es/m/CAEZATCUNK-AZSD0jVdgkk0N%3DNcAXBWeAEX-QU9AnJPensikmdQ%40mail.gmail.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4f4a0010a3a1e0404198130ac3cababeaa17d1e6 Modified Files -------------- src/include/common/int.h | 6 +++++- src/test/regress/expected/int8.out | 2 ++ src/test/regress/sql/int8.sql | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms @ 2023-11-09 10:02 Dean Rasheed <dean.a.rasheed@gmail.com> 0 siblings, 0 replies; 6+ messages in thread From: Dean Rasheed @ 2023-11-09 10:02 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix corner-case 64-bit integer subtraction bug on some platforms. When computing "0 - INT64_MIN", most platforms would report an overflow error, which is correct. However, platforms without integer overflow builtins or 128-bit integers would fail to spot the overflow, and incorrectly return INT64_MIN. Back-patch to all supported branches. Patch be me. Thanks to Jian He for initial investigation, and Laurenz Albe and Tom Lane for review. Discussion: https://postgr.es/m/CAEZATCUNK-AZSD0jVdgkk0N%3DNcAXBWeAEX-QU9AnJPensikmdQ%40mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b17a02be27e01d46cf9a74d173009547305d4cf8 Modified Files -------------- src/include/common/int.h | 6 +++++- src/test/regress/expected/int8.out | 2 ++ src/test/regress/sql/int8.sql | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2023-11-09 10:02 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-11-09 10:02 pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms Dean Rasheed <dean.a.rasheed@gmail.com> 2023-11-09 10:02 pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms Dean Rasheed <dean.a.rasheed@gmail.com> 2023-11-09 10:02 pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms Dean Rasheed <dean.a.rasheed@gmail.com> 2023-11-09 10:02 pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms Dean Rasheed <dean.a.rasheed@gmail.com> 2023-11-09 10:02 pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms Dean Rasheed <dean.a.rasheed@gmail.com> 2023-11-09 10:02 pgsql: Fix corner-case 64-bit integer subtraction bug on some platforms Dean Rasheed <dean.a.rasheed@gmail.com>
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