forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit108d2ad
committed
Remove dependence on -fwrapv semantics in jsonb.
This commit updates a couple of places in the jsonb code to nolonger rely on signed integer wrapping for correctness. Likecommit9e9a2b7, this is intended to move us closer towardsremoving -fwrapv, which may enable some compiler optimizations.However, there is presently no plan to actually remove thatcompiler option in the near future.This commit makes use of the newly introduced pg_abs_s32() routineto negate a signed integer (that is known to be negative) forcomparison with an unsigned integer. In passing, change one use ofINT_MIN to the more portable PG_INT32_MIN.Reported-by: Alexander LakhinAuthor: Joseph KoshakowReviewed-by: Jian HeDiscussion:https://postgr.es/m/CAAvxfHdBPOyEGS7s%2Bxf4iaW0-cgiq25jpYdWBqQqvLtLe_t6tw%40mail.gmail.com1 parent95b856d commit108d2ad
File tree
3 files changed
+25
-3
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+25
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
946 | 947 | | |
947 | 948 | | |
948 | 949 | | |
949 | | - | |
| 950 | + | |
950 | 951 | | |
951 | 952 | | |
952 | 953 | | |
| |||
5426 | 5427 | | |
5427 | 5428 | | |
5428 | 5429 | | |
5429 | | - | |
| 5430 | + | |
5430 | 5431 | | |
5431 | 5432 | | |
5432 | 5433 | | |
| |||
5438 | 5439 | | |
5439 | 5440 | | |
5440 | 5441 | | |
5441 | | - | |
| 5442 | + | |
5442 | 5443 | | |
5443 | 5444 | | |
5444 | 5445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
683 | 689 | | |
684 | 690 | | |
685 | 691 | | |
| |||
746 | 752 | | |
747 | 753 | | |
748 | 754 | | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
749 | 761 | | |
750 | 762 | | |
751 | 763 | | |
| |||
4575 | 4587 | | |
4576 | 4588 | | |
4577 | 4589 | | |
| 4590 | + | |
| 4591 | + | |
| 4592 | + | |
| 4593 | + | |
| 4594 | + | |
| 4595 | + | |
4578 | 4596 | | |
4579 | 4597 | | |
4580 | 4598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| |||
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
1185 | 1187 | | |
1186 | 1188 | | |
1187 | 1189 | | |
| 1190 | + | |
1188 | 1191 | | |
1189 | 1192 | | |
1190 | 1193 | | |
| |||
0 commit comments
Comments
(0)