> > This looks like a compiler bug, we tested multiple ways to workaround: > > Padding bytes aren't guaranteed to be zeroed, unless you take care to zero > them out with memset or such. That's not a compiler bug.
Perhaps calling this a compiler bug is not appropriate. However, memset is in fact called when the key is created ``` /* clear padding */ memset(&key, 0, sizeof(struct PgStat_HashKey)); ``` but the zeroed out padding bytes are not retained when the key is passed by value. This is why the proposal is to pass the key by reference. -- Sami Imseih Amazon Web Services (AWS)
