RESOLVED FIXED 14474
SVGRenderStyle fix uninitialized variables in the Inherited and NonInherited flags
https://bugs.webkit.org/show_bug.cgi?id=14474
Summary SVGRenderStyle fix uninitialized variables in the Inherited and NonInherited ...
Holger Freyther
Reported 2007-06-30 06:28:25 PDT
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.
Attachments
Initialize 32 bits of the union (1.88 KB, patch)
2007-06-30 06:30 PDT, Holger Freyther
darin: review+
Holger Freyther
Comment 1 2007-06-30 06:30:33 PDT
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.
Darin Adler
Comment 2 2007-06-30 08:01:58 PDT
Comment on attachment 15323 [details] Initialize 32 bits of the union r=me
Darin Adler
Comment 3 2007-06-30 08:03:20 PDT
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.
Mark Rowe (bdash)
Comment 4 2007-07-01 07:17:04 PDT
Landed in r23909.
Note You need to log in before you can comment on or make changes to this bug.