- Notifications
You must be signed in to change notification settings - Fork28
Commited0cdf0
committed
Install a check for mis-linking of src/port and src/common functions.
On ELF-based platforms (and maybe others?) it's possible for a sharedlibrary, when dynamically loaded into the backend, to call the backendversions of src/port and src/common functions rather than the frontendversions that are actually linked into the shlib. This is definitelynot what we want, because the frontend versions often behave slightlydifferently. Up to now it's been "slight" enough that nobody noticed;but with the addition of SCRAM support functions in src/common, we'reobserving crashes due to the difference between palloc and mallocmemory allocation rules, as reported in bug #15367 from Jeremy Evans.The purpose of this patch is to create a direct test for this type ofmis-linking, so that we know whether any given platform requires extrameasures to prevent using the wrong functions. If the test fails, itwill lead to connection failures in the contrib/postgres_fdw regressiontest. At the moment, *BSD platforms using ELF format are known to havethe problem and can be expected to fail; but we need to know whetheranything else does, and we need a reliable ongoing check for futureplatforms.Actually fixing the problem will be the subject of later commit(s).Discussion:https://postgr.es/m/153626613985.23143.4743626885618266803@wrigleys.postgresql.org1 parentc85ad9c commited0cdf0
File tree
8 files changed
+83
-5
lines changed- src
- backend/bootstrap
- common
- include/common
- interfaces/libpq
- tools/msvc
8 files changed
+83
-5
lines changedLines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| 27 | + | |
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
| |||
502 | 503 |
| |
503 | 504 |
| |
504 | 505 |
| |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
505 | 513 |
| |
506 | 514 |
| |
507 | 515 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 |
| - | |
| 44 | + | |
| 45 | + | |
45 | 46 |
| |
46 | 47 |
| |
47 | 48 |
| |
|
Lines changed: 36 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + |
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
52 |
| - | |
| 52 | + | |
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| |||
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
109 |
| - | |
| 109 | + | |
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
| |||
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
159 |
| - | |
| 159 | + | |
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
| 74 | + | |
74 | 75 |
| |
75 | 76 |
| |
76 | 77 |
| |
| |||
1748 | 1749 |
| |
1749 | 1750 |
| |
1750 | 1751 |
| |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
1751 | 1765 |
| |
1752 | 1766 |
| |
1753 | 1767 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
119 |
| - | |
| 119 | + | |
| 120 | + | |
120 | 121 |
| |
121 | 122 |
| |
122 | 123 |
| |
|
0 commit comments
Comments
(0)