This might be a bit controversal and might remind one on the "Purify vs. DeprecatedString" thread. The problem is the following. There is a union with a number of bits and a unsigned int to make this union 32 bits large. Then there is operator== which only compares the int of the union. As the number of bits of the flags don't add up to 32 we are according to valgrind comparing uninitialized memory. I kind of agree with the tool so I'm looking forward for your opinions and comments.
Created attachment 15323 [details] Initialize 32 bits of the union Initialize the union completely, so that the comparsion is predictable. I would be happy to see comments if this will reduce performance in the real world.
Comment on attachment 15323 [details] Initialize 32 bits of the union r=me
I don't approve of the original design decision to use the union for comparison: It's not generally portable to compare the other side of the union -- the bit fields might be larger than the int -- but in practice I guess we're probably OK.
Landed in r23909.