postgresql/src
Tom Lane de447bb8e6 Suppress warning about stack_base_ptr with late-model GCC.
GCC 12 complains that set_stack_base is storing the address of
a local variable in a long-lived pointer.  This is an entirely
reasonable warning (indeed, it just helped us find a bug);
but that behavior is intentional here.  We can work around it
by using __builtin_frame_address(0) instead of a specific local
variable; that produces an address a dozen or so bytes different,
in my testing, but we don't care about such a small difference.
Maybe someday a compiler lacking that function will start to issue
a similar warning, but we'll worry about that when it happens.

Patch by me, per a suggestion from Andres Freund.  Back-patch to
v12, which is as far back as the patch will go without some pain.
(Recently-established project policy would permit a back-patch as
far as 9.2, but I'm disinclined to expend the work until GCC 12
is much more widespread.)

Discussion: https://postgr.es/m/3773792.1645141467@sss.pgh.pa.us
2022-02-17 22:46:01 -05:00
..
backend Suppress warning about stack_base_ptr with late-model GCC. 2022-02-17 22:46:01 -05:00
bin Avoid dangling-pointer usage in pg_basebackup progress reports. 2022-02-17 15:03:40 -05:00
common Suppress integer-overflow compiler warning for inconsistent sun_len. 2022-02-14 11:25:46 -05:00
fe_utils Reject trailing junk after numeric literals 2022-02-16 10:37:31 +01:00
include Suppress warning about stack_base_ptr with late-model GCC. 2022-02-17 22:46:01 -05:00
interfaces Reject trailing junk after numeric literals 2022-02-16 10:37:31 +01:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl Use gendef instead of pexports for building windows .def files 2022-02-10 13:44:05 -05:00
port Simplify coding around path_contains_parent_reference(). 2022-01-31 13:53:38 -05:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Disable perl2host() processing in TAP tests 2022-02-17 09:59:59 -05:00
timezone Update copyright for 2022 2022-01-07 19:04:57 -05:00
tools Suppress warning about stack_base_ptr with late-model GCC. 2022-02-17 22:46:01 -05:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Add ./configure check for "lz4" command 2022-02-14 10:40:34 +09:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00