Thanks to visit codestin.com
Credit goes to github.com

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/[email protected]
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)