> Well, the documentation already says to avoid it:
>
> http://www.postgresql.org/docs/current/static/xfunc-c.html
>
> Another important point is to avoid leaving any uninitialized
> bits within data type values; for example, take care to zero out
> any alignment padding bytes that might be present in structs.
>
> so I don't think what you're suggesting would be controversial
> at all; it looks like what you've done is found a(t least one)
> bug where the documented practice wasn't followed, and it's good
> to find any such places.
Well in this case here is a patch that fixes "use of uninitialized
value" reports by MemorySanitizer I managed to catch so far.
--
Best regards,
Aleksander Alekseev
http://eax.me/