Skip to content

Commit cc3c4af

Browse files
committed
Fix bug in generation.c's valgrind support.
This doesn't look like the last such bug, but it's one that the test_decoding regression test is tripping over. Per buildfarm. Tomas Vondra Discussion: https://postgr.es/m/c903f275-2150-fa52-64bf-dca7b53ebf8d@fuzzy.cz
1 parent 9c55391 commit cc3c4af

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backend/utils/mmgr/generation.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,14 @@ GenerationAlloc(MemoryContext context, Size size)
409409

410410
chunk = (GenerationChunk *) block->freeptr;
411411

412+
/* Prepare to initialize the chunk header. */
413+
VALGRIND_MAKE_MEM_UNDEFINED(chunk, Generation_CHUNKHDRSZ);
414+
412415
block->nchunks += 1;
413416
block->freeptr += (Generation_CHUNKHDRSZ + chunk_size);
414417

418+
Assert(block->freeptr <= block->endptr);
419+
415420
chunk->block = block;
416421

417422
chunk->context = set;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy