Обсуждение: pgsql: Adjust Valgrind macro usage to protect chunk headers
Adjust Valgrind macro usage to protect chunk headers Prior to this commit we only ever protected MemoryChunk's requested_size field with Valgrind NOACCESS. This means that if the hdrmask field is ever accessed accidentally then we're not going to get any warnings from Valgrind about it. Valgrind would have warned us about the problem fixed in 92957ed98 had we already been doing this. Per suggestion from Tom Lane Reviewed-by: Richard Guo Discussion: https://postgr.es/m/1650235.1672694719@sss.pgh.pa.us Discussion: https://postgr.es/m/CAApHDvr=FZNGbj252Z6M9BSFKoq6BMxgkQ2yEAGUYoo7RquqZg@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/414d66220adb9189951fb4d410470f9f36f9cbd1 Modified Files -------------- src/backend/utils/mmgr/alignedalloc.c | 36 ++++++++++++---- src/backend/utils/mmgr/aset.c | 78 ++++++++++++++++++++--------------- src/backend/utils/mmgr/generation.c | 57 ++++++++++++------------- src/backend/utils/mmgr/mcxt.c | 22 +++++++++- src/backend/utils/mmgr/slab.c | 51 ++++++++++++++++++++--- 5 files changed, 170 insertions(+), 74 deletions(-)