Add more pg_attribute_counted_by() to various flexible array members Annotate flexible array members whose element count is held by another member of the same struct, so that the compiler knows the real extent of these arrays.
This continues the work from commit 7a04cac0c3b. In one case, the order of assignments to the counted and counting fields had to be adjusted. Extension code could in theory be affected by the new annotations in the header files, but it is mostly unlikely that extensions would build or resize these structs themselves, and in any case a violation would show up as a new warning or sanitizer failure, not silent breakage. Author: Tristan Partin <[email protected]> Reviewed-by: Japin Li <[email protected]> Reviewed-by: Greg Burd <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/DKBEBF32QLUA.3L2DJRPUYNKHZ%40partin.io Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/633dee1bd1b41145f81619423d573754c7ad2b9e Modified Files -------------- src/backend/executor/execParallel.c | 2 +- src/backend/nodes/bitmapset.c | 4 ++-- src/include/access/brin_internal.h | 2 +- src/include/access/tupdesc.h | 2 +- src/include/executor/execPartition.h | 4 ++-- src/include/executor/instrument.h | 2 +- src/include/executor/instrument_node.h | 20 ++++++++++---------- src/include/jit/jit.h | 2 +- src/include/nodes/bitmapset.h | 2 +- src/include/regex/regguts.h | 4 ++-- src/include/statistics/extended_stats_internal.h | 2 +- src/include/statistics/statistics.h | 8 ++++---- src/include/tsearch/dicts/spell.h | 2 +- src/include/utils/catcache.h | 2 +- src/include/utils/datetime.h | 2 +- src/pl/plpython/plpy_procedure.h | 2 +- 16 files changed, 31 insertions(+), 31 deletions(-)
