postgresql/src/include/common
Tom Lane ed0cdf0e05 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 shared
library, when dynamically loaded into the backend, to call the backend
versions of src/port and src/common functions rather than the frontend
versions that are actually linked into the shlib.  This is definitely
not what we want, because the frontend versions often behave slightly
differently.  Up to now it's been "slight" enough that nobody noticed;
but with the addition of SCRAM support functions in src/common, we're
observing crashes due to the difference between palloc and malloc
memory allocation rules, as reported in bug #15367 from Jeremy Evans.

The purpose of this patch is to create a direct test for this type of
mis-linking, so that we know whether any given platform requires extra
measures to prevent using the wrong functions.  If the test fails, it
will lead to connection failures in the contrib/postgres_fdw regression
test.  At the moment, *BSD platforms using ELF format are known to have
the problem and can be expected to fail; but we need to know whether
anything else does, and we need a reliable ongoing check for future
platforms.

Actually fixing the problem will be the subject of later commit(s).

Discussion: https://postgr.es/m/153626613985.23143.4743626885618266803@wrigleys.postgresql.org
2018-09-09 12:23:23 -04:00
..
base64.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
config_info.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
controldata_utils.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
fe_memutils.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
file_perm.h Fix incorrect ordering of operations in pg_resetwal and pg_rewind. 2018-05-23 10:59:55 -04:00
file_utils.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
int.h Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
int128.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
ip.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
keywords.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
link-canary.h Install a check for mis-linking of src/port and src/common functions. 2018-09-09 12:23:23 -04:00
md5.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_lzcompress.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
relpath.h Further cleanup of client dependencies on src/include/catalog headers. 2018-04-09 14:39:58 -04:00
restricted_token.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
saslprep.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
scram-common.h Remove support for tls-unique channel binding. 2018-08-05 13:44:21 +03:00
sha2.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
string.h Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
unicode_norm.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
unicode_norm_table.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
username.h Update copyright for 2018 2018-01-02 23:30:12 -05:00