You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tom Lane
12eee85e51
Make our usage of memset_s() conform strictly to the C11 standard.
...
Per the letter of the C11 standard, one must #define
__STDC_WANT_LIB_EXT1__ as 1 before including <string.h> in order to
have access to memset_s(). It appears that many platforms are lenient
about this, because we weren't doing it and yet the code appeared to
work anyway. But we now find that with -std=c11, macOS is strict and
doesn't declare memset_s, leading to compile failures since we try to
use it anyway. (Given the lack of prior reports, perhaps this is new
behavior in the latest SDK? No matter, we're clearly in the wrong.)
In addition to the immediate problem, which could be fixed merely by
adding the needed #define to explicit_bzero.c, it seems possible that
our configure-time probe for memset_s() could fail in case a platform
implements the function in some odd way due to this spec requirement.
This concern can be fixed in largely the same way that we dealt with
strchrnul() in 6da2ba1d8: switch to using a declaration-based
configure probe instead of a does-it-link probe.
Back-patch to v13 where we started using memset_s().
Reported-by: Lakshmi Narayana Velayudam <dev.narayana.v@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAA4pTnLcKGG78xeOjiBr5yS7ZeE-Rh=FaFQQGOO=nPzA1L8yEA@mail.gmail.com
Backpatch-through: 13
8 months ago
..
access
Fix typos and grammar in the code
9 months ago
archive
Update copyright for 2025
1 year ago
backup
Update copyright for 2025
1 year ago
bootstrap
pg_noreturn to replace pg_attribute_noreturn()
10 months ago
catalog
Remove pg_replication_origin's TOAST table.
8 months ago
commands
Harmonize function parameter names for Postgres 18.
9 months ago
common
Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays
8 months ago
datatype
Avoid using timezone Asia/Manila in regression tests.
12 months ago
executor
Change SQL-language functions to use the plan cache.
9 months ago
fe_utils
Remove inappropriate inclusions of c.h and postgres_fe.h.
9 months ago
foreign
Update copyright for 2025
1 year ago
jit
Don't use double-quotes in #include's of system headers, redux.
9 months ago
lib
Use PRI?64 instead of "ll?" in format strings (continued).
10 months ago
libpq
Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays
8 months ago
mb
With GB18030, prevent SIGSEGV from reading past end of allocation.
8 months ago
nodes
Track the number of presorted outer pathkeys in MergePath
8 months ago
optimizer
Track the number of presorted outer pathkeys in MergePath
8 months ago
parser
Extend ALTER DEFAULT PRIVILEGES to define default privileges for large objects.
9 months ago
partitioning
Fix incorrect #endif comment
10 months ago
pch
Update copyright for 2025
1 year ago
port
Match parameter in new function to earlier equivalents
9 months ago
portability
Update copyright for 2025
1 year ago
postmaster
Add missing PGDLLIMPORT markings
9 months ago
regex
Update copyright for 2025
1 year ago
replication
Remove pg_replication_origin's TOAST table.
8 months ago
rewrite
Refactor ChangeVarNodesExtended() using the custom callback
8 months ago
snowball
Update to latest Snowball sources.
11 months ago
statistics
Stats: use schemaname/relname instead of regclass.
10 months ago
storage
aio: Use runtime arguments with injections points in tests
8 months ago
tcop
Improve error message when standby does accept connections.
9 months ago
tsearch
Update copyright for 2025
1 year ago
utils
Add support for runtime arguments in injection points
8 months ago
.gitignore
Use <stdint.h> and <inttypes.h> for c.h integers.
1 year ago
Makefile
Use <stdint.h> and <inttypes.h> for c.h integers.
1 year ago
c.h
Revert "Use workaround of __builtin_setjmp only on MINGW on MSVCRT"
9 months ago
fmgr.h
Avoid mixing designated and non-designated field initializers.
10 months ago
funcapi.h
Update copyright for 2025
1 year ago
getopt_long.h
IWYU widely useful pragmas
12 months ago
meson.build
Update copyright for 2025
1 year ago
miscadmin.h
Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays
8 months ago
pg_config.h.in
Make our usage of memset_s() conform strictly to the C11 standard.
8 months ago
pg_config_manual.h
Avoid invalidating all RelationSyncCache entries on publication rename.
10 months ago
pg_getopt.h
IWYU widely useful pragmas
12 months ago
pg_trace.h
IWYU widely useful pragmas
12 months ago
pgstat.h
pgstat: Allow checksum errors to be reported in critical sections
10 months ago
pgtar.h
Update copyright for 2025
1 year ago
pgtime.h
Seek zone abbreviations in the IANA data before timezone_abbreviations.
12 months ago
port.h
Add timingsafe_bcmp(), for constant-time memory comparison
9 months ago
postgres.h
IWYU widely useful pragmas
12 months ago
postgres_ext.h
libpq: Deprecate pg_int64.
10 months ago
postgres_fe.h
IWYU widely useful pragmas
12 months ago
varatt.h
Update copyright for 2025
1 year ago
windowapi.h
Update copyright for 2025
1 year ago