Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+5
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)