Skip to content

Don't return early when encountering a numeric field with a set hasbit in VerifyHasBitConsistency, add tests. #22947

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

Merged
merged 1 commit into from
Aug 5, 2025

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Aug 2, 2025

Don't return early when encountering a numeric field with a set hasbit in VerifyHasBitConsistency, add tests.

This is a DCHECK that runs in debug builds, but unless there is a bug in protobuf internal code or a misuse of protobuf by users, this check should not fire. These tests verify that the check correctly catches the types of errors we want it to.

@copybara-service copybara-service bot force-pushed the test_790049589 branch 4 times, most recently from 6342c04 to e9147cd Compare August 2, 2025 19:57
Copy link

@danowar2 danowar2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copybara-service copybara-service bot force-pushed the test_790049589 branch 6 times, most recently from 9b0b093 to afe1ef7 Compare August 5, 2025 18:30
@copybara-service copybara-service bot changed the title Test VerifyHasBitConsistency with negative examples. Don't return early when encountering a numeric field with a set hasbit in VerifyHasBitConsistency, add tests. Aug 5, 2025
…t in VerifyHasBitConsistency, add tests.

This is a DCHECK that runs in debug builds, but unless there is a bug in protobuf internal code or a misuse of protobuf by users, this check should not fire. These tests verify that the check correctly catches the types of errors we want it to.

PiperOrigin-RevId: 791337631
@copybara-service copybara-service bot merged commit cbb6537 into main Aug 5, 2025
@copybara-service copybara-service bot deleted the test_790049589 branch August 5, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants