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

Fix #26115: Setup discriminator parameter corruption #26116

Merged

Conversation

rob-the-dude
Copy link
Contributor

The setup discriminator parameter is being passed by reference, but by the time the block is run by dispatch, that reference points to stack contents that have been changed. Making a local copy of the discriminator fixes the problem.

The setup discriminator parameter is being passed by reference, but
by the time the block is run by dispatch, that reference points to
stack contents that have been changed.  Making a local copy of the
discriminator fixes the problem.
@CLAassistant
Copy link

CLAassistant commented Apr 16, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

PR #26116: Size comparison from 2e4064e to d67b601

Decreases (1 build for cc32xx)
platform target config section 2e4064e1 d67b601 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20328412 20328411 -1 -0.0
Full report (1 build for cc32xx)
platform target config section 2e4064e1 d67b601 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20328412 20328411 -1 -0.0
.debug_line 2687890 2687890 0 0.0
.debug_loc 2838930 2838930 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042155 3042155 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

@bzbarsky-apple
Copy link
Contributor

Fast-tracking platform-specific change with platform owner review.

@bzbarsky-apple bzbarsky-apple enabled auto-merge (squash) April 17, 2023 02:39
@github-actions
Copy link

PR #26116: Size comparison from 2e4064e to f92f992

Increases (6 builds for bl602, bl702, cc13x2_26x2, cyw30739, nrfconnect, psoc6)
platform target config section 2e4064e1 f92f992 change % change
bl602 lighting-app bl602+rpc .text 1062774 1062776 2 0.0
bl702 lighting-app bl702+rpc .debug_info 45225706 45225707 1 0.0
.text 1032680 1032682 2 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 167816 167824 8 0.0
cyw30739 ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 557526 557534 8 0.0
.app_xip_area 438864 438872 8 0.0
nrfconnect all-clusters-minimal-app nrf52840dk_nrf52840 text 774224 774228 4 0.0
psoc6 all-clusters-minimal cy8ckit_062s2_43012 .debug_info 27574160 27574162 2 0.0
Decreases (6 builds for bl602, cc13x2_26x2, cc32xx, cyw30739, efr32, qpg)
platform target config section 2e4064e1 f92f992 change % change
bl602 lighting-app bl602 .text 1031688 1031684 -4 -0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 683447 683439 -8 -0.0
.text 596060 596052 -8 -0.0
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20328412 20328410 -2 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 536298 536290 -8 -0.0
.app_xip_area 416876 416868 -8 -0.0
efr32 lock-app BRD4161A+wf200 (read/write) 1071280 1071272 -8 -0.0
.text 895984 895976 -8 -0.0
qpg lighting-app qpg6105+debug (read/write) 1166704 1166696 -8 -0.0
.text 613804 613796 -8 -0.0
Full report (34 builds for bl602, bl702, cc13x2_26x2, cc32xx, cyw30739, efr32, k32w, linux, mbed, nrfconnect, psoc6, qpg)
platform target config section 2e4064e1 f92f992 change % change
bl602 lighting-app bl602 (read/write) 1350526 1350526 0 0.0
.bss 87862 87862 0 0.0
.data 9648 9648 0 0.0
.text 1031688 1031684 -4 -0.0
bl602+rpc (read/write) 1396514 1396514 0 0.0
.bss 95910 95910 0 0.0
.data 10040 10040 0 0.0
.text 1062774 1062776 2 0.0
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1179783 1179783 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 67577 67577 0 0.0
.bss_psram 24368 24368 0 0.0
.comment 48 48 0 0.0
.data 3952 3952 0 0.0
.debug_abbrev 1549331 1549331 0 0.0
.debug_aranges 134656 134656 0 0.0
.debug_frame 495104 495104 0 0.0
.debug_info 40735048 40735048 0 0.0
.debug_line 5309713 5309713 0 0.0
.debug_loc 3444724 3444724 0 0.0
.debug_ranges 376536 376536 0 0.0
.debug_str 3596140 3596140 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 140 140 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 106048 106048 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 573559 573559 0 0.0
.symtab 174256 174256 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 959752 959752 0 0.0
bl702+rpc 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1267883 1267883 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 75609 75609 0 0.0
.bss_psram 24768 24768 0 0.0
.comment 48 48 0 0.0
.data 4504 4504 0 0.0
.debug_abbrev 1699947 1699947 0 0.0
.debug_aranges 142864 142864 0 0.0
.debug_frame 522936 522936 0 0.0
.debug_info 45225706 45225707 1 0.0
.debug_line 5716860 5716860 0 0.0
.debug_loc 3645225 3645225 0 0.0
.debug_ranges 401512 401512 0 0.0
.debug_str 4020360 4020360 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 156 156 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 119904 119904 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 634560 634560 0 0.0
.symtab 192656 192656 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 1032680 1032682 2 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 683447 683439 -8 -0.0
(read/write) 167816 167824 8 0.0
.bss 80956 80956 0 0.0
.data 3336 3336 0 0.0
.rodata 87071 87071 0 0.0
.text 596060 596052 -8 -0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 646711 646711 0 0.0
(read/write) 157608 157608 0 0.0
.bss 80156 80156 0 0.0
.data 3336 3336 0 0.0
.rodata 76863 76863 0 0.0
.text 569528 569528 0 0.0
lock-ftd LP_CC2652R7 (read only) 679271 679271 0 0.0
(read/write) 169440 169440 0 0.0
.bss 78492 78492 0 0.0
.data 3300 3300 0 0.0
.rodata 75751 75751 0 0.0
.text 603040 603040 0 0.0
lock-mtd LP_CC2652R7 (read only) 667123 667123 0 0.0
(read/write) 176764 176764 0 0.0
.bss 73668 73668 0 0.0
.data 3300 3300 0 0.0
.rodata 102635 102635 0 0.0
.text 564008 564008 0 0.0
pump-app LP_CC2652R7 (read only) 692003 692003 0 0.0
(read/write) 157452 157452 0 0.0
.bss 78468 78468 0 0.0
.data 3264 3264 0 0.0
.rodata 89867 89867 0 0.0
.text 601656 601656 0 0.0
pump-controller-app LP_CC2652R7 (read only) 676899 676899 0 0.0
(read/write) 172692 172692 0 0.0
.bss 78604 78604 0 0.0
.data 3288 3288 0 0.0
.rodata 85619 85619 0 0.0
.text 590800 590800 0 0.0
shell LP_CC2652R7 (read only) 676286 676286 0 0.0
(read/write) 177048 177048 0 0.0
.bss 83028 83028 0 0.0
.data 3332 3332 0 0.0
.rodata 85358 85358 0 0.0
.text 590616 590616 0 0.0
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20328412 20328410 -2 -0.0
.debug_line 2687890 2687890 0 0.0
.debug_loc 2838930 2838930 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042155 3042155 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 536298 536290 -8 -0.0
.app_xip_area 416876 416868 -8 -0.0
.bss 61856 61856 0 0.0
.data 724 724 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 540674 540674 0 0.0
.app_xip_area 415964 415964 0 0.0
.bss 67136 67136 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 557526 557534 8 0.0
.app_xip_area 438864 438872 8 0.0
.bss 61144 61144 0 0.0
.data 680 680 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs9116 (read/write) 1018040 1018040 0 0.0
.bss 178684 178684 0 0.0
.data 2128 2128 0 0.0
.text 837208 837208 0 0.0
lock-app BRD4161A+wf200 (read/write) 1071280 1071272 -8 -0.0
.bss 173132 173132 0 0.0
.data 2144 2144 0 0.0
.text 895984 895976 -8 -0.0
lighting-app BRD4187C (read/write) 1026080 1026080 0 0.0
.bss 159200 159200 0 0.0
.data 2780 2780 0 0.0
.text 839504 839504 0 0.0
window-app BRD4187C (read/write) 1141836 1141836 0 0.0
.bss 143632 143632 0 0.0
.data 2668 2668 0 0.0
.text 970940 970940 0 0.0
k32w contact k32w0+release (read/write) 676592 676592 0 0.0
.bss 65540 65540 0 0.0
.data 2208 2208 0 0.0
.text 577444 577444 0 0.0
light k32w0+release (read/write) 675732 675732 0 0.0
.bss 65204 65204 0 0.0
.data 2196 2196 0 0.0
.text 576932 576932 0 0.0
lock k32w0+release (read/write) 630464 630464 0 0.0
.bss 63276 63276 0 0.0
.data 2120 2120 0 0.0
.text 550052 550052 0 0.0
linux chip-tool-ipv6only arm64 (read only) 12162276 12162276 0 0.0
(read/write) 744888 744888 0 0.0
.bss 34392 34392 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 686760 686760 0 0.0
.dynamic 560 560 0 0.0
.got 15528 15528 0 0.0
.init 24 24 0 0.0
.init_array 216 216 0 0.0
.rodata 567844 567844 0 0.0
.text 9826772 9826772 0 0.0
thermostat-no-ble arm64 (read only) 2501788 2501788 0 0.0
(read/write) 145320 145320 0 0.0
.bss 56344 56344 0 0.0
.data 1784 1784 0 0.0
.data.rel.ro 77752 77752 0 0.0
.dynamic 560 560 0 0.0
.got 5352 5352 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 129384 129384 0 0.0
.text 2109456 2109456 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2466336 2466336 0 0.0
.bss 215960 215960 0 0.0
.data 5888 5888 0 0.0
.text 1428980 1428980 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1173892 1173892 0 0.0
bss 155557 155557 0 0.0
rodata 132740 132740 0 0.0
text 804836 804836 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1119140 1119140 0 0.0
bss 154713 154713 0 0.0
rodata 109556 109556 0 0.0
text 774224 774228 4 0.0
all-clusters-app nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1433952 1433952 0 0.0
bss 135297 135297 0 0.0
rodata 228784 228784 0 0.0
text 775788 775788 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 0 0 0 0.0
(read only) 840848 840848 0 0.0
(read/write) 1760948 1760948 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189856 189856 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2640 2640 0 0.0
.debug_abbrev 1259918 1259918 0 0.0
.debug_aranges 112000 112000 0 0.0
.debug_frame 377072 377072 0 0.0
.debug_info 28114772 28114772 0 0.0
.debug_line 3830238 3830238 0 0.0
.debug_loc 3737918 3737918 0 0.0
.debug_ranges 370008 370008 0 0.0
.debug_str 3553229 3553229 0 0.0
.heap 840848 840848 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 583331 583331 0 0.0
.symtab 426816 426816 0 0.0
.text 1560064 1560064 0 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 0 0 0 0.0
(read only) 841656 841656 0 0.0
(read/write) 1700996 1700996 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189056 189056 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2632 2632 0 0.0
.debug_abbrev 1241782 1241782 0 0.0
.debug_aranges 111152 111152 0 0.0
.debug_frame 379156 379156 0 0.0
.debug_info 27574160 27574162 2 0.0
.debug_line 3833617 3833617 0 0.0
.debug_loc 3719987 3719987 0 0.0
.debug_ranges 367856 367856 0 0.0
.debug_str 3539148 3539148 0 0.0
.heap 841656 841656 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 542533 542533 0 0.0
.symtab 411632 411632 0 0.0
.text 1500920 1500920 0 0.0
.zero.table 8 8 0 0.0
light cy8ckit_062s2_43012 0 0 0 0.0
(read only) 849920 849920 0 0.0
(read/write) 1614740 1614740 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180960 180960 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2464 2464 0 0.0
.debug_abbrev 1077073 1077073 0 0.0
.debug_aranges 103360 103360 0 0.0
.debug_frame 349436 349436 0 0.0
.debug_info 22932671 22932671 0 0.0
.debug_line 3385038 3385038 0 0.0
.debug_loc 3394688 3394688 0 0.0
.debug_ranges 326320 326320 0 0.0
.debug_str 3337732 3337732 0 0.0
.heap 849920 849920 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 477620 477620 0 0.0
.symtab 379264 379264 0 0.0
.text 1422928 1422928 0 0.0
.zero.table 8 8 0 0.0
lock cy8ckit_062s2_43012 0 0 0 0.0
(read only) 822144 822144 0 0.0
(read/write) 1671900 1671900 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 208720 208720 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2480 2480 0 0.0
.debug_abbrev 1079305 1079305 0 0.0
.debug_aranges 103760 103760 0 0.0
.debug_frame 351128 351128 0 0.0
.debug_info 23184146 23184146 0 0.0
.debug_line 3386789 3386789 0 0.0
.debug_loc 3418589 3418589 0 0.0
.debug_ranges 328920 328920 0 0.0
.debug_str 3356293 3356293 0 0.0
.heap 822144 822144 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 481017 481017 0 0.0
.symtab 381456 381456 0 0.0
.text 1452312 1452312 0 0.0
.zero.table 8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1166704 1166696 -8 -0.0
.bss 99308 99308 0 0.0
.data 856 856 0 0.0
.text 613804 613796 -8 -0.0
lock-app qpg6105+debug (read/write) 1136776 1136776 0 0.0
.bss 94452 94452 0 0.0
.data 860 860 0 0.0
.text 583872 583872 0 0.0

@bzbarsky-apple bzbarsky-apple merged commit 3037a8a into project-chip:master Apr 17, 2023
@bzbarsky-apple
Copy link
Contributor

@rob-the-dude Thank you again for finding this and for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants