Adjust Valgrind macro usage to protect chunk headers
David Rowley <drowley@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/mmgr/alignedalloc.c | modified | +29 −7 |
| src/backend/utils/mmgr/aset.c | modified | +45 −33 |
| src/backend/utils/mmgr/generation.c | modified | +29 −28 |
| src/backend/utils/mmgr/mcxt.c | modified | +21 −1 |
| src/backend/utils/mmgr/slab.c | modified | +46 −5 |
Discussion
- An oversight in ExecInitAgg for grouping sets 10 messages · 2022-12-22 → 2023-04-11
- Protecting allocator headers with Valgrind 5 messages · 2023-04-11 → 2023-04-16