forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0e3e8fb
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 parenta7db71e commit0e3e8fb
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 | |
---|---|---|---|
| |||
679 | 679 |
| |
680 | 680 |
| |
681 | 681 |
| |
| 682 | + | |
| 683 | + | |
682 | 684 |
| |
683 | 685 |
| |
684 | 686 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
| 135 | + | |
135 | 136 |
| |
136 | 137 |
| |
137 | 138 |
| |
|
0 commit comments
Comments
(0)