forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4f4a001
committed
Fix corner-case 64-bit integer subtraction bug on some platforms.
When computing "0 - INT64_MIN", most platforms would report anoverflow error, which is correct. However, platforms without integeroverflow 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 LaurenzAlbe and Tom Lane for review.Discussion:https://postgr.es/m/CAEZATCUNK-AZSD0jVdgkk0N%3DNcAXBWeAEX-QU9AnJPensikmdQ%40mail.gmail.com1 parent319310a commit4f4a001
3 files changed
+8
-1
lines changedLines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
203 | 207 |
| |
204 |
| - | |
| 208 | + | |
205 | 209 |
| |
206 | 210 |
| |
207 | 211 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
659 | 659 |
| |
660 | 660 |
| |
661 | 661 |
| |
| 662 | + | |
| 663 | + | |
662 | 664 |
| |
663 | 665 |
| |
664 | 666 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
| 134 | + | |
134 | 135 |
| |
135 | 136 |
| |
136 | 137 |
| |
|
0 commit comments
Comments
(0)