mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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
This commit is contained in:
		@@ -409,9 +409,14 @@ GenerationAlloc(MemoryContext context, Size size)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	chunk = (GenerationChunk *) block->freeptr;
 | 
						chunk = (GenerationChunk *) block->freeptr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Prepare to initialize the chunk header. */
 | 
				
			||||||
 | 
						VALGRIND_MAKE_MEM_UNDEFINED(chunk, Generation_CHUNKHDRSZ);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	block->nchunks += 1;
 | 
						block->nchunks += 1;
 | 
				
			||||||
	block->freeptr += (Generation_CHUNKHDRSZ + chunk_size);
 | 
						block->freeptr += (Generation_CHUNKHDRSZ + chunk_size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						Assert(block->freeptr <= block->endptr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	chunk->block = block;
 | 
						chunk->block = block;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	chunk->context = set;
 | 
						chunk->context = set;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user