forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7201cd1
committed
Fix relptr's encoding of the base address.
Previously, we encoded both NULL and the first byte at the base addressas 0. That confusion led to the assertion in commite07d4dd, whichfailed when min_dynamic_shared_memory was used. Give them distinctencodings, by switching to 1-based offsets for non-NULL pointers. Alsoimprove macro hygiene in passing (missing/misplaced parentheses), andremove open-coded access to the raw offset value from freepage.c/h.Althoughe07d4dd was back-patched to 10, the only code that actuallymakes use of relptr at the base address arrived in84b1c63, so no needto back-patch further than 14 for now.Reported-by: Justin Pryzby <pryzby@telsasoft.com>Reviewed-by: Robert Haas <robertmhaas@gmail.com>Discussion:https://postgr.es/m/20220519193839.GT19626%40telsasoft.com1 parentebc584e commit7201cd1
File tree
3 files changed
+14
-11
lines changed- src
- backend/utils/mmgr
- include/utils
3 files changed
+14
-11
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
434 | 434 |
| |
435 | 435 |
| |
436 | 436 |
| |
437 |
| - | |
| 437 | + | |
438 | 438 |
| |
439 | 439 |
| |
440 | 440 |
| |
| |||
1269 | 1269 |
| |
1270 | 1270 |
| |
1271 | 1271 |
| |
1272 |
| - | |
| 1272 | + | |
1273 | 1273 |
| |
1274 | 1274 |
| |
1275 | 1275 |
| |
| |||
1859 | 1859 |
| |
1860 | 1860 |
| |
1861 | 1861 |
| |
1862 |
| - | |
| 1862 | + | |
1863 | 1863 |
| |
1864 | 1864 |
| |
1865 | 1865 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
| 81 | + | |
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
85 |
| - | |
| 85 | + | |
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
|
Lines changed: 9 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
| 45 | + | |
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
53 |
| - | |
| 53 | + | |
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 |
| |
60 | 63 |
| |
61 | 64 |
| |
| |||
64 | 67 |
| |
65 | 68 |
| |
66 | 69 |
| |
67 |
| - | |
68 |
| - | |
| 70 | + | |
| 71 | + | |
69 | 72 |
| |
70 | 73 |
| |
71 | 74 |
| |
72 | 75 |
| |
73 | 76 |
| |
74 | 77 |
| |
75 | 78 |
| |
76 |
| - | |
| 79 | + | |
77 | 80 |
| |
78 | 81 |
| |
79 | 82 |
| |
80 | 83 |
| |
81 | 84 |
| |
82 | 85 |
| |
83 | 86 |
| |
84 |
| - | |
| 87 | + | |
85 | 88 |
| |
86 | 89 |
| |
87 | 90 |
| |
|
0 commit comments
Comments
(0)