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 all fields in cluster-objects structs are default-initialized. #13432

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Otherwise we can end up reading random values from un-initialized
memory (e.g. if a mandatory command/struct/event field is not sent by
the other side).

Fixes #10271

Problem

See above.

Change overview

Init integers/floats/enum/bitfields to 0 and decodable lists to empty list.

Testing

No behavior changes on well-behaved clients, which are the only kind we have so far.

@github-actions
Copy link

github-actions bot commented Jan 11, 2022

PR #13432: Size comparison from 19f61eb to aca5d82

Increases (24 builds for efr32, esp32, k32w, mbed, nrfconnect, p6, qpg, telink)
platform target config section 19f61eb aca5d82 change % change
efr32 lighting-app BRD4161A (read only) 828916 829316 400 0.0
.text 828908 829308 400 0.0
BRD4161A+rpc (read only) 816112 816512 400 0.0
.text 816104 816504 400 0.0
window-app BRD4161A (read only) 802380 802556 176 0.0
.text 802372 802548 176 0.0
esp32 all-clusters-app c3devkit (read only) 890494 891342 848 0.1
.flash.text 890494 891342 848 0.1
m5stack (read only) 950619 951635 1016 0.1
.flash.text 945235 946251 1016 0.1
k32w light k32w061+release (read/write) 655316 655524 208 0.0
.text 570892 571100 208 0.0
lock k32w061+release (read/write) 659656 659784 128 0.0
.text 574916 575044 128 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2346888 2347848 960 0.0
.text 1309464 1310424 960 0.1
lighting-app CY8CPROTO_062_4343W+release (read/write) 2330496 2330816 320 0.0
.text 1293096 1293416 320 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2303648 2303776 128 0.0
.text 1266248 1266376 128 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 938287 938639 352 0.0
text 633348 633704 356 0.1
nrf52840dk_nrf52840+rpc (read/write) 923751 924103 352 0.0
text 628700 629056 356 0.1
nrf52840dongle_nrf52840 (read/write) 988963 989315 352 0.0
text 665544 665900 356 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 848142 848510 368 0.0
text 550272 550628 356 0.1
lock-app nrf52840dk_nrf52840 (read/write) 910431 910575 144 0.0
text 611212 611348 136 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 820498 820642 144 0.0
text 528176 528312 136 0.0
pump-app nrf52840dk_nrf52840 (read/write) 911707 911899 192 0.0
text 612424 612624 200 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 908511 908655 144 0.0
text 609960 610096 136 0.0
p6 all-clusters-app default (read/write) 2399760 2400752 992 0.0
.text 1358024 1359016 992 0.1
light-app default (read/write) 2323744 2324144 400 0.0
.text 1282008 1282408 400 0.0
lock-app default (read/write) 2295968 2296096 128 0.0
.text 1254232 1254360 128 0.0
qpg lighting-app qpg6105+debug (read only) 533208 533560 352 0.1
.text 527888 528240 352 0.1
lock-app qpg6105+debug (read only) 504984 505128 144 0.0
.text 499664 499808 144 0.0
telink lighting-app tlsr9518adk80d (read/write) 834566 835142 576 0.1
text 582774 583350 576 0.1
Full report (30 builds for efr32, esp32, k32w, mbed, nrfconnect, p6, qpg, telink)
platform target config section 19f61eb aca5d82 change % change
efr32 lighting-app BRD4161A (read only) 828916 829316 400 0.0
(read/write) 126996 126996 0 0.0
.bss 125120 125120 0 0.0
.data 1876 1876 0 0.0
.text 828908 829308 400 0.0
BRD4161A+rpc (read only) 816112 816512 400 0.0
(read/write) 143656 143656 0 0.0
.bss 141680 141680 0 0.0
.data 1976 1976 0 0.0
.text 816104 816504 400 0.0
window-app BRD4161A (read only) 802380 802556 176 0.0
(read/write) 125936 125936 0 0.0
.bss 124104 124104 0 0.0
.data 1832 1832 0 0.0
.text 802372 802548 176 0.0
esp32 all-clusters-app c3devkit (read only) 890494 891342 848 0.1
(read/write) 1313594 1313594 0 0.0
.dram0.bss 69472 69472 0 0.0
.dram0.data 14244 14244 0 0.0
.flash.rodata 176816 176816 0 0.0
.flash.text 890494 891342 848 0.1
.iram0.text 62254 62254 0 0.0
m5stack (read only) 950619 951635 1016 0.1
(read/write) 445204 445204 0 0.0
.dram0.bss 73968 73968 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 206164 206164 0 0.0
.flash.text 945235 946251 1016 0.1
.iram0.text 122671 122671 0 0.0
k32w light k32w061+release (read/write) 655316 655524 208 0.0
.bss 76776 76776 0 0.0
.data 1848 1848 0 0.0
.text 570892 571100 208 0.0
lock k32w061+release (read/write) 659656 659784 128 0.0
.bss 77072 77072 0 0.0
.data 1868 1868 0 0.0
.text 574916 575044 128 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2346888 2347848 960 0.0
.bss 188716 188716 0 0.0
.data 5312 5312 0 0.0
.text 1309464 1310424 960 0.1
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2330496 2330816 320 0.0
.bss 180544 180544 0 0.0
.data 5552 5552 0 0.0
.text 1293096 1293416 320 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2303648 2303776 128 0.0
.bss 179592 179592 0 0.0
.data 5544 5544 0 0.0
.text 1266248 1266376 128 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054432 2054432 0 0.0
.bss 157060 157060 0 0.0
.data 4864 4864 0 0.0
.text 1017032 1017032 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 938287 938639 352 0.0
bss 119232 119232 0 0.0
rodata 108156 108156 0 0.0
text 633348 633704 356 0.1
nrf52840dk_nrf52840+rpc (read/write) 923751 924103 352 0.0
bss 116276 116276 0 0.0
rodata 100604 100604 0 0.0
text 628700 629056 356 0.1
nrf52840dongle_nrf52840 (read/write) 988963 989315 352 0.0
bss 122076 122076 0 0.0
rodata 112908 112908 0 0.0
text 665544 665900 356 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 848142 848510 368 0.0
bss 116020 116020 0 0.0
rodata 101328 101328 0 0.0
text 550272 550628 356 0.1
lock-app nrf52840dk_nrf52840 (read/write) 910431 910575 144 0.0
bss 118420 118420 0 0.0
rodata 103428 103428 0 0.0
text 611212 611348 136 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 820498 820642 144 0.0
bss 115236 115236 0 0.0
rodata 96652 96652 0 0.0
text 528176 528312 136 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 911707 911899 192 0.0
bss 118180 118180 0 0.0
rodata 103640 103640 0 0.0
text 612424 612624 200 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 908511 908655 144 0.0
bss 118208 118208 0 0.0
rodata 102900 102900 0 0.0
text 609960 610096 136 0.0
shell nrf52840dk_nrf52840 (read/write) 798063 798063 0 0.0
bss 109768 109768 0 0.0
rodata 78180 78180 0 0.0
text 533608 533608 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 710882 710882 0 0.0
bss 107656 107656 0 0.0
rodata 72484 72484 0 0.0
text 451288 451288 0 0.0
p6 all-clusters-app default (read/write) 2399760 2400752 992 0.0
.bss 116804 116804 0 0.0
.data 2592 2592 0 0.0
.text 1358024 1359016 992 0.1
light-app default (read/write) 2323744 2324144 400 0.0
.bss 105672 105672 0 0.0
.data 2384 2384 0 0.0
.text 1282008 1282408 400 0.0
lock-app default (read/write) 2295968 2296096 128 0.0
.bss 104552 104552 0 0.0
.data 2336 2336 0 0.0
.text 1254232 1254360 128 0.0
qpg lighting-app qpg6105+debug (read only) 533208 533560 352 0.1
(read/write) 146936 146936 0 0.0
.bss 86624 86624 0 0.0
.data 1004 1004 0 0.0
.text 527888 528240 352 0.1
lock-app qpg6105+debug (read only) 504984 505128 144 0.0
(read/write) 146940 146940 0 0.0
.bss 85760 85760 0 0.0
.data 952 952 0 0.0
.text 499664 499808 144 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 834566 835142 576 0.1
bss 86924 86924 0 0.0
noinit 37160 37160 0 0.0
text 582774 583350 576 0.1

@bzbarsky-apple bzbarsky-apple force-pushed the init-struct-members-by-default branch from aca5d82 to 2087c91 Compare January 11, 2022 17:10
@github-actions
Copy link

github-actions bot commented Jan 11, 2022

PR #13432: Size comparison from 1cbec52 to 2087c91

Increases (26 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 1cbec52 2087c91 change % change
efr32 lighting-app BRD4161A (read only) 830240 830624 384 0.0
.text 830232 830616 384 0.0
BRD4161A+rpc (read only) 817644 818028 384 0.0
.text 817636 818020 384 0.0
window-app BRD4161A (read only) 804184 804360 176 0.0
.text 804176 804352 176 0.0
esp32 all-clusters-app c3devkit (read only) 898316 899250 934 0.1
.flash.text 898316 899250 934 0.1
m5stack (read only) 959427 960599 1172 0.1
.flash.text 954043 955215 1172 0.1
k32w light k32w061+release (read/write) 656348 656556 208 0.0
.text 571872 572080 208 0.0
lock k32w061+release (read/write) 660688 660832 144 0.0
.text 575896 576040 144 0.0
linux chip-tool-ipv6only arm64 (read only) 7114060 7119260 5200 0.1
.text 6026020 6031220 5200 0.1
thermostat-no-ble arm64 (read only) 2037468 2038572 1104 0.1
.text 1693888 1694992 1104 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2348912 2349872 960 0.0
.text 1311488 1312448 960 0.1
lighting-app CY8CPROTO_062_4343W+release (read/write) 2330560 2330944 384 0.0
.text 1293160 1293544 384 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2303784 2303912 128 0.0
.text 1266384 1266512 128 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 939279 939631 352 0.0
text 634088 634444 356 0.1
nrf52840dk_nrf52840+rpc (read/write) 924747 925099 352 0.0
text 629440 629796 356 0.1
nrf52840dongle_nrf52840 (read/write) 989939 990307 368 0.0
text 666284 666640 356 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 849138 849490 352 0.0
text 551008 551364 356 0.1
lock-app nrf52840dk_nrf52840 (read/write) 911551 911679 128 0.0
text 612080 612216 136 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 821590 821718 128 0.0
text 529040 529176 136 0.0
pump-app nrf52840dk_nrf52840 (read/write) 912831 913039 208 0.0
text 613340 613540 200 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 909631 909759 128 0.0
text 610828 610964 136 0.0
p6 all-clusters-app default (read/write) 2403200 2404208 1008 0.0
.text 1361464 1362472 1008 0.1
light-app default (read/write) 2325088 2325488 400 0.0
.text 1283352 1283752 400 0.0
lock-app default (read/write) 2297320 2297448 128 0.0
.text 1255584 1255712 128 0.0
qpg lighting-app qpg6105+debug (read only) 534060 534412 352 0.1
.text 528740 529092 352 0.1
lock-app qpg6105+debug (read only) 505980 506108 128 0.0
.text 500660 500788 128 0.0
telink lighting-app tlsr9518adk80d (read/write) 835878 836462 584 0.1
text 583752 584330 578 0.1
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 1cbec52 2087c91 change % change
efr32 lighting-app BRD4161A (read only) 830240 830624 384 0.0
(read/write) 127300 127300 0 0.0
.bss 125420 125420 0 0.0
.data 1880 1880 0 0.0
.text 830232 830616 384 0.0
BRD4161A+rpc (read only) 817644 818028 384 0.0
(read/write) 143960 143960 0 0.0
.bss 141980 141980 0 0.0
.data 1980 1980 0 0.0
.text 817636 818020 384 0.0
window-app BRD4161A (read only) 804184 804360 176 0.0
(read/write) 126008 126008 0 0.0
.bss 124168 124168 0 0.0
.data 1836 1836 0 0.0
.text 804176 804352 176 0.0
esp32 all-clusters-app c3devkit (read only) 898316 899250 934 0.1
(read/write) 1316082 1316082 0 0.0
.dram0.bss 70168 70168 0 0.0
.dram0.data 14212 14212 0 0.0
.flash.rodata 178200 178200 0 0.0
.flash.text 898316 899250 934 0.1
.iram0.text 62056 62056 0 0.0
m5stack (read only) 959427 960599 1172 0.1
(read/write) 448536 448536 0 0.0
.dram0.bss 74656 74656 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 207688 207688 0 0.0
.flash.text 954043 955215 1172 0.1
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 656348 656556 208 0.0
.bss 76824 76824 0 0.0
.data 1852 1852 0 0.0
.text 571872 572080 208 0.0
lock k32w061+release (read/write) 660688 660832 144 0.0
.bss 77120 77120 0 0.0
.data 1872 1872 0 0.0
.text 575896 576040 144 0.0
linux chip-tool-ipv6only arm64 (read only) 7114060 7119260 5200 0.1
(read/write) 327473 327473 0 0.0
.bss 54865 54865 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 209624 209624 0 0.0
.dynamic 560 560 0 0.0
.got 58208 58208 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 390148 390148 0 0.0
.text 6026020 6031220 5200 0.1
thermostat-no-ble arm64 (read only) 2037468 2038572 1104 0.1
(read/write) 145505 145505 0 0.0
.bss 64737 64737 0 0.0
.data 880 880 0 0.0
.data.rel.ro 72912 72912 0 0.0
.dynamic 560 560 0 0.0
.got 4040 4040 0 0.0
.init 24 24 0 0.0
.init_array 304 304 0 0.0
.rodata 129276 129276 0 0.0
.text 1693888 1694992 1104 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2348912 2349872 960 0.0
.bss 188876 188876 0 0.0
.data 5320 5320 0 0.0
.text 1311488 1312448 960 0.1
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2330560 2330944 384 0.0
.bss 180416 180416 0 0.0
.data 5552 5552 0 0.0
.text 1293160 1293544 384 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2303784 2303912 128 0.0
.bss 179456 179456 0 0.0
.data 5544 5544 0 0.0
.text 1266384 1266512 128 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054232 2054232 0 0.0
.bss 156876 156876 0 0.0
.data 4864 4864 0 0.0
.text 1016832 1016832 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 939279 939631 352 0.0
bss 119284 119284 0 0.0
rodata 108332 108332 0 0.0
text 634088 634444 356 0.1
nrf52840dk_nrf52840+rpc (read/write) 924747 925099 352 0.0
bss 116328 116328 0 0.0
rodata 100784 100784 0 0.0
text 629440 629796 356 0.1
nrf52840dongle_nrf52840 (read/write) 989939 990307 368 0.0
bss 122128 122128 0 0.0
rodata 113084 113084 0 0.0
text 666284 666640 356 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 849138 849490 352 0.0
bss 116072 116072 0 0.0
rodata 101508 101508 0 0.0
text 551008 551364 356 0.1
lock-app nrf52840dk_nrf52840 (read/write) 911551 911679 128 0.0
bss 118472 118472 0 0.0
rodata 103604 103604 0 0.0
text 612080 612216 136 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 821590 821718 128 0.0
bss 115288 115288 0 0.0
rodata 96832 96832 0 0.0
text 529040 529176 136 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 912831 913039 208 0.0
bss 118232 118232 0 0.0
rodata 103820 103820 0 0.0
text 613340 613540 200 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 909631 909759 128 0.0
bss 118260 118260 0 0.0
rodata 103076 103076 0 0.0
text 610828 610964 136 0.0
shell nrf52840dk_nrf52840 (read/write) 798391 798391 0 0.0
bss 109776 109776 0 0.0
rodata 78284 78284 0 0.0
text 533832 533832 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 711206 711206 0 0.0
bss 107664 107664 0 0.0
rodata 72584 72584 0 0.0
text 451512 451512 0 0.0
p6 all-clusters-app default (read/write) 2403200 2404208 1008 0.0
.bss 117148 117148 0 0.0
.data 2592 2592 0 0.0
.text 1361464 1362472 1008 0.1
light-app default (read/write) 2325088 2325488 400 0.0
.bss 105728 105728 0 0.0
.data 2384 2384 0 0.0
.text 1283352 1283752 400 0.0
lock-app default (read/write) 2297320 2297448 128 0.0
.bss 104608 104608 0 0.0
.data 2344 2344 0 0.0
.text 1255584 1255712 128 0.0
qpg lighting-app qpg6105+debug (read only) 534060 534412 352 0.1
(read/write) 146940 146940 0 0.0
.bss 86672 86672 0 0.0
.data 1008 1008 0 0.0
.text 528740 529092 352 0.1
lock-app qpg6105+debug (read only) 505980 506108 128 0.0
(read/write) 146936 146936 0 0.0
.bss 85808 85808 0 0.0
.data 956 956 0 0.0
.text 500660 500788 128 0.0
persistent-storage-app qpg6105+debug (read only) 106448 106448 0 0.0
(read/write) 146938 146938 0 0.0
.bss 36146 36146 0 0.0
.data 288 288 0 0.0
.text 101128 101128 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 835878 836462 584 0.1
bss 86976 86976 0 0.0
noinit 37160 37160 0 0.0
text 583752 584330 578 0.1

Otherwise we can end up reading random values from un-initialized
memory (e.g. if a mandatory command/struct/event field is not sent by
the other side).

Fixes project-chip#10271
@bzbarsky-apple bzbarsky-apple force-pushed the init-struct-members-by-default branch from 2087c91 to 190ed2d Compare January 13, 2022 17:34
@github-actions
Copy link

github-actions bot commented Jan 13, 2022

PR #13432: Size comparison from 2d6d1a3 to 190ed2d

Increases (26 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 2d6d1a3 190ed2d change % change
efr32 lighting-app BRD4161A (read only) 831392 831776 384 0.0
.text 831384 831768 384 0.0
BRD4161A+rpc (read only) 818772 819172 400 0.0
.text 818764 819164 400 0.0
window-app BRD4161A (read only) 805272 805448 176 0.0
.text 805264 805440 176 0.0
esp32 all-clusters-app c3devkit (read only) 908520 909436 916 0.1
.flash.text 908520 909436 916 0.1
m5stack (read only) 957299 958399 1100 0.1
.flash.text 951915 953015 1100 0.1
k32w light k32w061+release (read/write) 657752 657960 208 0.0
.text 572964 573172 208 0.0
lock k32w061+release (read/write) 661532 661660 128 0.0
.text 576428 576556 128 0.0
linux chip-tool-ipv6only arm64 (read only) 8018628 8024740 6112 0.1
.text 6812964 6819076 6112 0.1
thermostat-no-ble arm64 (read only) 2040924 2042012 1088 0.1
.text 1696464 1697552 1088 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2346416 2347376 960 0.0
.text 1308992 1309952 960 0.1
lighting-app CY8CPROTO_062_4343W+release (read/write) 2331240 2331624 384 0.0
.text 1293840 1294224 384 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2304464 2304592 128 0.0
.text 1267064 1267192 128 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 940303 940655 352 0.0
text 634620 634976 356 0.1
nrf52840dk_nrf52840+rpc (read/write) 925739 926091 352 0.0
text 629972 630328 356 0.1
nrf52840dongle_nrf52840 (read/write) 990983 991335 352 0.0
text 666816 667172 356 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 850130 850482 352 0.0
text 551536 551892 356 0.1
lock-app nrf52840dk_nrf52840 (read/write) 912543 912671 128 0.0
text 612612 612748 136 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 822614 822742 128 0.0
text 529568 529704 136 0.0
pump-app nrf52840dk_nrf52840 (read/write) 913855 914063 208 0.0
text 613872 614072 200 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 910655 910799 144 0.0
text 611368 611504 136 0.0
p6 all-clusters-app default (read/write) 2400616 2401624 1008 0.0
.text 1358880 1359888 1008 0.1
light-app default (read/write) 2326152 2326552 400 0.0
.text 1284416 1284816 400 0.0
lock-app default (read/write) 2298384 2298528 144 0.0
.text 1256648 1256792 144 0.0
qpg lighting-app qpg6105+debug (read only) 534972 535324 352 0.1
.text 529652 530004 352 0.1
lock-app qpg6105+debug (read only) 506896 507024 128 0.0
.text 501576 501704 128 0.0
telink lighting-app tlsr9518adk80d (read/write) 836950 837534 584 0.1
text 584320 584898 578 0.1
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 2d6d1a3 190ed2d change % change
efr32 lighting-app BRD4161A (read only) 831392 831776 384 0.0
(read/write) 127612 127612 0 0.0
.bss 125732 125732 0 0.0
.data 1880 1880 0 0.0
.text 831384 831768 384 0.0
BRD4161A+rpc (read only) 818772 819172 400 0.0
(read/write) 144272 144272 0 0.0
.bss 142292 142292 0 0.0
.data 1980 1980 0 0.0
.text 818764 819164 400 0.0
window-app BRD4161A (read only) 805272 805448 176 0.0
(read/write) 126320 126320 0 0.0
.bss 124480 124480 0 0.0
.data 1836 1836 0 0.0
.text 805264 805440 176 0.0
esp32 all-clusters-app c3devkit (read only) 908520 909436 916 0.1
(read/write) 1316498 1316498 0 0.0
.dram0.bss 70504 70504 0 0.0
.dram0.data 14284 14284 0 0.0
.flash.rodata 178216 178216 0 0.0
.flash.text 908520 909436 916 0.1
.iram0.text 62056 62056 0 0.0
m5stack (read only) 957299 958399 1100 0.1
(read/write) 448664 448664 0 0.0
.dram0.bss 74976 74976 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 207496 207496 0 0.0
.flash.text 951915 953015 1100 0.1
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 657752 657960 208 0.0
.bss 77136 77136 0 0.0
.data 1852 1852 0 0.0
.text 572964 573172 208 0.0
lock k32w061+release (read/write) 661532 661660 128 0.0
.bss 77432 77432 0 0.0
.data 1872 1872 0 0.0
.text 576428 576556 128 0.0
linux chip-tool-ipv6only arm64 (read only) 8018628 8024740 6112 0.1
(read/write) 370241 370241 0 0.0
.bss 55217 55217 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 245760 245760 0 0.0
.dynamic 560 560 0 0.0
.got 64472 64472 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 417772 417772 0 0.0
.text 6812964 6819076 6112 0.1
thermostat-no-ble arm64 (read only) 2040924 2042012 1088 0.1
(read/write) 145969 145969 0 0.0
.bss 65089 65089 0 0.0
.data 880 880 0 0.0
.data.rel.ro 73016 73016 0 0.0
.dynamic 560 560 0 0.0
.got 4048 4048 0 0.0
.init 24 24 0 0.0
.init_array 304 304 0 0.0
.rodata 129868 129868 0 0.0
.text 1696464 1697552 1088 0.1
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2346416 2347376 960 0.0
.bss 189204 189204 0 0.0
.data 5320 5320 0 0.0
.text 1308992 1309952 960 0.1
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2331240 2331624 384 0.0
.bss 180728 180728 0 0.0
.data 5552 5552 0 0.0
.text 1293840 1294224 384 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2304464 2304592 128 0.0
.bss 179768 179768 0 0.0
.data 5544 5544 0 0.0
.text 1267064 1267192 128 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054456 2054456 0 0.0
.bss 156876 156876 0 0.0
.data 4864 4864 0 0.0
.text 1017056 1017056 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 940303 940655 352 0.0
bss 119596 119596 0 0.0
rodata 108508 108508 0 0.0
text 634620 634976 356 0.1
nrf52840dk_nrf52840+rpc (read/write) 925739 926091 352 0.0
bss 116640 116640 0 0.0
rodata 100960 100960 0 0.0
text 629972 630328 356 0.1
nrf52840dongle_nrf52840 (read/write) 990983 991335 352 0.0
bss 122440 122440 0 0.0
rodata 113264 113264 0 0.0
text 666816 667172 356 0.1
nrf5340dk_nrf5340_cpuapp (read/write) 850130 850482 352 0.0
bss 116384 116384 0 0.0
rodata 101684 101684 0 0.0
text 551536 551892 356 0.1
lock-app nrf52840dk_nrf52840 (read/write) 912543 912671 128 0.0
bss 118784 118784 0 0.0
rodata 103780 103780 0 0.0
text 612612 612748 136 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 822614 822742 128 0.0
bss 115600 115600 0 0.0
rodata 97008 97008 0 0.0
text 529568 529704 136 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 913855 914063 208 0.0
bss 118544 118544 0 0.0
rodata 103996 103996 0 0.0
text 613872 614072 200 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 910655 910799 144 0.0
bss 118572 118572 0 0.0
rodata 103252 103252 0 0.0
text 611368 611504 136 0.0
shell nrf52840dk_nrf52840 (read/write) 798643 798643 0 0.0
bss 109776 109776 0 0.0
rodata 78376 78376 0 0.0
text 533988 533988 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 711462 711462 0 0.0
bss 107664 107664 0 0.0
rodata 72680 72680 0 0.0
text 451668 451668 0 0.0
p6 all-clusters-app default (read/write) 2400616 2401624 1008 0.0
.bss 117484 117484 0 0.0
.data 2592 2592 0 0.0
.text 1358880 1359888 1008 0.1
light-app default (read/write) 2326152 2326552 400 0.0
.bss 106040 106040 0 0.0
.data 2384 2384 0 0.0
.text 1284416 1284816 400 0.0
lock-app default (read/write) 2298384 2298528 144 0.0
.bss 104920 104920 0 0.0
.data 2344 2344 0 0.0
.text 1256648 1256792 144 0.0
qpg lighting-app qpg6105+debug (read only) 534972 535324 352 0.1
(read/write) 146940 146940 0 0.0
.bss 89336 89336 0 0.0
.data 1008 1008 0 0.0
.text 529652 530004 352 0.1
lock-app qpg6105+debug (read only) 506896 507024 128 0.0
(read/write) 146936 146936 0 0.0
.bss 88472 88472 0 0.0
.data 956 956 0 0.0
.text 501576 501704 128 0.0
persistent-storage-app qpg6105+debug (read only) 106848 106848 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101528 101528 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 836950 837534 584 0.1
bss 87288 87288 0 0.0
noinit 37160 37160 0 0.0
text 584320 584898 578 0.1

@andy31415 andy31415 merged commit 0414c8f into project-chip:master Jan 13, 2022
@bzbarsky-apple bzbarsky-apple deleted the init-struct-members-by-default branch January 13, 2022 20:04
selissia pushed a commit to selissia/connectedhomeip that referenced this pull request Jan 28, 2022
…project-chip#13432)

Otherwise we can end up reading random values from un-initialized
memory (e.g. if a mandatory command/struct/event field is not sent by
the other side).

Fixes project-chip#10271
step0035 pushed a commit to hank820/connectedhomeip that referenced this pull request Feb 8, 2022
…project-chip#13432)

Otherwise we can end up reading random values from un-initialized
memory (e.g. if a mandatory command/struct/event field is not sent by
the other side).

Fixes project-chip#10271
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.

Defaults for cluster objects
5 participants