Uninitialized Data in WAL records generated in heap_(insert|update|delete) - Mailing list pgsql-hackers

From Andres Freund
Subject Uninitialized Data in WAL records generated in heap_(insert|update|delete)
Date
Msg-id 200911071332.52738.andres@anarazel.de
Whole thread Raw
List pgsql-hackers
Hi,

While checking some other code I used valgrind and noticed, as I had before, 
that XLogInsert showed accesses to unitialized data.
After some searching and playing around I found the source of that:
heap_insert uses a struct xl_heap_insert which in turn has a xl_heaptid member 
- which is padded.
COMP_CRC32 will read most of xl_heap_insert (excluding its trailing padding) 
and thus generates valgrind warnings...

Questions:
* I don't actually see any real danger in that - correct?
* valgrind is quite usefull for investigating some issues, has a patch 
conditionally zeroing or annotating those structs any chances? 

Andres


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Getting consistent snapshot in multiple backends, for parallel pg_dump
Next
From: Jeff Davis
Date:
Subject: Re: operator exclusion constraints