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

[nrfconnect] Fixed using temporary buffer in GetWiFiInfo #26278

Merged
merged 1 commit into from
May 8, 2023

Conversation

kkasperczyk-no
Copy link
Contributor

In GetWiFiInfo there is temporary buffer used for ByteSpan initialization, that then may be used out of this call scope.

Moved the buffer declaration to the class object to ensure it has proper lifetime.

@github-actions
Copy link

PR #26278: Size comparison from c1108d7 to 8f379f0

Decreases (1 build for cc32xx)
platform target config section c1108d7 8f379f0 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 19489250 19489249 -1 -0.0
Full report (1 build for cc32xx)
platform target config section c1108d7 8f379f0 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 601114 601114 0 0.0
(read/write) 204132 204132 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197544 197544 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956756 956756 0 0.0
.debug_aranges 103416 103416 0 0.0
.debug_frame 349704 349704 0 0.0
.debug_info 19489250 19489249 -1 -0.0
.debug_line 2678035 2678035 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1501882 1501882 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96008 96008 0 0.0
.debug_str 3024877 3024877 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104170 104170 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 477531 477531 0 0.0
.symtab 285936 285936 0 0.0
.text 494824 494824 0 0.0

@kkasperczyk-no kkasperczyk-no force-pushed the get_wifi_info_fix branch 2 times, most recently from 8cc805f to ec33a5b Compare April 28, 2023 08:54
@github-actions
Copy link

PR #26278: Size comparison from f1096a5 to ec33a5b

Full report (1 build for cc32xx)
platform target config section f1096a5 ec33a5b change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 602714 602714 0 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 956984 0 0.0
.debug_aranges 103664 103664 0 0.0
.debug_frame 350552 350552 0 0.0
.debug_info 19521972 19521972 0 0.0
.debug_line 2682751 2682751 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1506147 1506147 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96278 96278 0 0.0
.debug_str 3059490 3059490 0 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 496340 0 0.0

In GetWiFiInfo there is temporary buffer used for ByteSpan
initialization, that then may be used out of this call scope.

Replaced unnecessarily used ByteSpan with simple uint8_t array.
@github-actions
Copy link

github-actions bot commented May 8, 2023

PR #26278: Size comparison from 6c0c5ea to a9ec093

Increases (1 build for cc32xx)
platform target config section 6c0c5ea a9ec093 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 19609755 19609756 1 0.0
Full report (1 build for cc32xx)
platform target config section 6c0c5ea a9ec093 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 605090 605090 0 0.0
(read/write) 204164 204164 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197576 197576 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 957621 957621 0 0.0
.debug_aranges 101136 101136 0 0.0
.debug_frame 341512 341512 0 0.0
.debug_info 19609755 19609756 1 0.0
.debug_line 2666632 2666632 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1489225 1489225 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 94315 94315 0 0.0
.debug_str 3108982 3108982 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104354 104354 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 483384 483384 0 0.0
.symtab 287328 287328 0 0.0
.text 498612 498612 0 0.0

@andy31415 andy31415 merged commit 31d77df into project-chip:master May 8, 2023
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.

4 participants