New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Init index_in_metadata_ without condition #2523
Init index_in_metadata_ without condition #2523
Conversation
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
1 similar comment
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Can one of the admins verify this patch? |
See https://codereview.chromium.org/2590803003/ for further details. |
ok to test |
@jbrianceau Thanks for sending this pull request. It seems to me like the root of the problem is that for each kind of generator, we assign that Sorry about the test failures by the way; I believe those were caused by a separate thing I broke and should now be fixed. |
retest this please |
You're right. If I add a else case for
Setting it to zero in What solution do you prefer @acozzette ? Current patch + the above else case or just the above else case (i.e. no init in |
That's true, setting it to zero wouldn't prevent it from being set to the right value later on. I guess I would lean slightly toward not setting it in the constructor, though; that way if we forget to set it again then MSAN will hopefully catch the bug like it did this time. About the else case, maybe instead of adding an I guess the
So I would say maybe have three loops for initializing
Does that work? |
Good point, agreed.
Yes, I've just tested it quickly in my Chromium build and it seems to be ok. |
Chromium MemorySanitizer (MSan) reports use-of-uninitialized-value of index_in_metadata_ attribute from EnumGenerator class. Fix these warnings by initializing these attributes without condition.
fa22cef
to
15a15e3
Compare
@acozzette, please take another look |
Thanks, @jbrianceau! |
Chromium MemorySanitizer (MSan) reports a use-of-uninitialized-value
warning because of index_in_metadata_ attribute of EnumGenerator
class (introduced in 5a76e63). Fix
it by initializing it to 0.