Ilia Mirkin <imir...@alum.mit.edu> writes: > I believe the distinction here is between initializing all the fields > and using them individually (thus leaving the padding uninitialized), > vs using the fields to create a structure to hash as a sequence of > bytes. For the latter, you really need all the memory initialized, not > just the "valid" parts of the structure. In at least my mind, it's > fairly well-established that compilers don't always initialize all of > a structure's underlying bytes, but I also don't have a specific > instance of that situation I can point to. > > For most usage, foo = {0} is fine since you're not hashing the bytes > but rather accessing the fields directly. But for hashing, you really > want all the bits initialized.
Gah. The commit message even said it was about padding, and I failed to read. Sorry for the noise, this does seem right.
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev