forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb17a02b
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 parent2fe2d1a commitb17a02b
3 files changed
+8
-1
lines changedLines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
211 | 211 |
| |
212 | 212 |
| |
213 | 213 |
| |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
214 | 218 |
| |
215 |
| - | |
| 219 | + | |
216 | 220 |
| |
217 | 221 |
| |
218 | 222 |
| |
|
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)