Skip to content
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

Ensure that DataModel::Encode does not encode kUnknownEnumValue for enums. #26299

Conversation

bzbarsky-apple
Copy link
Contributor

This should help prevent those values leaking out on the wire.

Fixes #24368

@github-actions
Copy link

PR #26299: Size comparison from 77d72a8 to 428e112

Increases above 0.2%:

platform target config section 77d72a8 428e112 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_loclists 1506147 1510108 3961 0.3
Increases (1 build for cc32xx)
platform target config section 77d72a8 428e112 change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 602714 602962 248 0.0
.debug_frame 350552 350856 304 0.1
.debug_info 19521972 19535899 13927 0.1
.debug_line 2682751 2685256 2505 0.1
.debug_loclists 1506147 1510108 3961 0.3
.debug_str 3059490 3059506 16 0.0
.text 496340 496588 248 0.0
Decreases (1 build for cc32xx)
platform target config section 77d72a8 428e112 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_abbrev 956984 956967 -17 -0.0
Full report (1 build for cc32xx)
platform target config section 77d72a8 428e112 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 602714 602962 248 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956984 956967 -17 -0.0
.debug_aranges 103664 103664 0 0.0
.debug_frame 350552 350856 304 0.1
.debug_info 19521972 19535899 13927 0.1
.debug_line 2682751 2685256 2505 0.1
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1506147 1510108 3961 0.3
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96278 96278 0 0.0
.debug_str 3059490 3059506 16 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104250 104250 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 481887 481887 0 0.0
.symtab 287248 287248 0 0.0
.text 496340 496588 248 0.0

@github-actions
Copy link

PR #26299: Size comparison from af6cb3a to 9499fce

Increases above 0.2%:

platform target config section af6cb3a 9499fcee change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_loclists 1506228 1510189 3961 0.3
Increases (1 build for cc32xx)
platform target config section af6cb3a 9499fcee change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 602722 602970 248 0.0
.debug_frame 350552 350856 304 0.1
.debug_info 19522048 19535974 13926 0.1
.debug_line 2682783 2685310 2527 0.1
.debug_loclists 1506228 1510189 3961 0.3
.debug_str 3059509 3059525 16 0.0
.text 496348 496596 248 0.0
Decreases (1 build for cc32xx)
platform target config section af6cb3a 9499fcee change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_abbrev 956996 956979 -17 -0.0
Full report (1 build for cc32xx)
platform target config section af6cb3a 9499fcee change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 602722 602970 248 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956996 956979 -17 -0.0
.debug_aranges 103664 103664 0 0.0
.debug_frame 350552 350856 304 0.1
.debug_info 19522048 19535974 13926 0.1
.debug_line 2682783 2685310 2527 0.1
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1506228 1510189 3961 0.3
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96278 96278 0 0.0
.debug_str 3059509 3059525 16 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104250 104250 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 481887 481887 0 0.0
.symtab 287248 287248 0 0.0
.text 496348 496596 248 0.0

…nums.

This should help prevent those values leaking out on the wire.

Fixes project-chip#24368
@bzbarsky-apple bzbarsky-apple force-pushed the disallow-encoding-unknown-enum-value branch from 9499fce to 793f8b8 Compare April 29, 2023 02:09
@github-actions
Copy link

PR #26299: Size comparison from bedffde to 793f8b8

Increases above 0.2%:

platform target config section bedffde 793f8b8 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_loclists 1506228 1510189 3961 0.3
Increases (1 build for cc32xx)
platform target config section bedffde 793f8b8 change % change
cc32xx lock CC3235SF_LAUNCHXL (read only) 602722 602970 248 0.0
.debug_frame 350552 350856 304 0.1
.debug_info 19522048 19535975 13927 0.1
.debug_line 2682783 2685310 2527 0.1
.debug_loclists 1506228 1510189 3961 0.3
.debug_str 3059509 3059525 16 0.0
.text 496348 496596 248 0.0
Decreases (1 build for cc32xx)
platform target config section bedffde 793f8b8 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_abbrev 956996 956979 -17 -0.0
Full report (1 build for cc32xx)
platform target config section bedffde 793f8b8 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 602722 602970 248 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956996 956979 -17 -0.0
.debug_aranges 103664 103664 0 0.0
.debug_frame 350552 350856 304 0.1
.debug_info 19522048 19535975 13927 0.1
.debug_line 2682783 2685310 2527 0.1
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1506228 1510189 3961 0.3
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96278 96278 0 0.0
.debug_str 3059509 3059525 16 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104250 104250 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 481887 481887 0 0.0
.symtab 287248 287248 0 0.0
.text 496348 496596 248 0.0

@bzbarsky-apple bzbarsky-apple merged commit 309e9f1 into project-chip:master Apr 29, 2023
@bzbarsky-apple bzbarsky-apple deleted the disallow-encoding-unknown-enum-value branch April 29, 2023 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Platform] kUnknownEnumValue grabs first unused enum value which need to be enforced in perpetuity
4 participants