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 Logging When Trying to Log Nullptr To Strings #23604

Conversation

emargolis
Copy link
Contributor

@emargolis emargolis commented Nov 15, 2022

This PR attempts to identify all cases where %s specifiers in the logging APIs (ChipLogError(), ChipLogProgress(), ChipLogDetail()) don't have a guaranteed non-null string parameter.

In all identified cases the issue is fixed using StringOrNullMarker() helper method to guarantee it doesn't happen.

Fixes #23603

@github-actions
Copy link

github-actions bot commented Nov 15, 2022

PR #23604: Size comparison from 9a41c9c to e85e239

Increases (50 builds for bl602, bl702, cc13x2_26x2, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 9a41c9c e85e239 change % change
bl602 lighting-app bl602 (read/write) 1375258 1375370 112 0.0
.text 1059186 1059302 116 0.0
bl602+rpc (read/write) 1421082 1421194 112 0.0
.text 1090682 1090796 114 0.0
bl702 lighting-app bl702 (read/write) 1195127 1195175 48 0.0
.debug_abbrev 1523919 1524141 222 0.0
.debug_frame 485212 485216 4 0.0
.debug_info 39161307 39161921 614 0.0
.debug_line 5271709 5271899 190 0.0
.debug_loc 3367110 3367507 397 0.0
.debug_ranges 360272 360416 144 0.0
.debug_str 3462152 3462269 117 0.0
.text 955518 955562 44 0.0
bl702+rpc (read/write) 1283267 1283315 48 0.0
.debug_abbrev 1667931 1668153 222 0.0
.debug_frame 512416 512420 4 0.0
.debug_info 43430528 43431142 614 0.0
.debug_line 5667078 5667268 190 0.0
.debug_loc 3561346 3561757 411 0.0
.debug_ranges 383296 383440 144 0.0
.debug_str 3859441 3859558 117 0.0
.text 1029214 1029258 44 0.0
cc13x2_26x2 lock-mtd LP_CC2652R7 (read only) 660819 660851 32 0.0
.rodata 103307 103315 8 0.0
.text 557032 557056 24 0.0
pump-app LP_CC2652R7 (read only) 688743 688791 48 0.0
.rodata 90759 90767 8 0.0
.text 597500 597540 40 0.0
pump-controller-app LP_CC2652R7 (read only) 673027 673075 48 0.0
.rodata 86307 86315 8 0.0
.text 586240 586280 40 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 974172 974212 40 0.0
.text 819724 819764 40 0.0
BRD4161A+rs911x (read/write) 1034744 1034816 72 0.0
.text 845972 846044 72 0.0
BRD4187C (read/write) 1146576 1146608 32 0.0
.text 980808 980840 32 0.0
lock-app BRD4161A+wf200 (read/write) 1160144 1160208 64 0.0
.text 999836 999900 64 0.0
window-app BRD4187C (read/write) 1139812 1139844 32 0.0
.text 972604 972636 32 0.0
esp32 all-clusters-app c3devkit (read only) 1224288 1224508 220 0.0
.flash.text 1224288 1224508 220 0.0
m5stack (read only) 1234187 1234247 60 0.0
(read/write) 564420 564428 8 0.0
.flash.rodata 315136 315144 8 0.0
.flash.text 1228803 1228863 60 0.0
k32w light k32w0+release (read/write) 671800 671856 56 0.0
.text 592100 592156 56 0.0
linux all-clusters-app debug (read only) 3085417 3086121 704 0.0
.rodata 280939 281067 128 0.0
.text 2620274 2620850 576 0.0
all-clusters-minimal-app debug (read only) 2911113 2911817 704 0.0
.rodata 280427 280555 128 0.0
.text 2449522 2450098 576 0.0
bridge-app debug+rpc (read only) 2410065 2410657 592 0.0
.rodata 210688 210720 32 0.0
.text 2032306 2032866 560 0.0
chip-tool debug (read only) 11079241 11079889 648 0.0
.rodata 591837 591973 136 0.0
.text 8963988 8964500 512 0.0
chip-tool-ipv6only arm64 (read only) 10433596 10434060 464 0.0
.text 8260020 8260484 464 0.0
lighting-app debug+rpc (read only) 2641089 2641745 656 0.0
.rodata 227552 227648 96 0.0
.text 2237122 2237682 560 0.0
lock-app debug (read only) 2600329 2600985 656 0.0
.rodata 243848 243944 96 0.0
.text 2185058 2185618 560 0.0
ota-provider-app debug (read only) 2396497 2397121 624 0.0
.rodata 216328 216392 64 0.0
.text 2011906 2012466 560 0.0
ota-requestor-app debug (read only) 2561809 2562449 640 0.0
.rodata 223408 223472 64 0.0
.text 2161042 2161618 576 0.0
shell debug (read only) 2621521 2622129 608 0.0
.rodata 239250 239314 64 0.0
.text 2223042 2223586 544 0.0
thermostat-no-ble arm64 (read only) 2392812 2393308 496 0.0
.text 2004560 2005056 496 0.0
tv-app debug (read only) 3254881 3255569 688 0.0
.rodata 268216 268344 128 0.0
.text 2792962 2793522 560 0.0
tv-casting-app debug (read only) 5580961 5581537 576 0.0
.rodata 355001 355097 96 0.0
.text 4950578 4951058 480 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2452336 2452408 72 0.0
.text 1414980 1415052 72 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1187855 1187903 48 0.0
text 816982 817018 36 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1167283 1167315 32 0.0
text 805532 805568 36 0.0
light-switch-app nrf52840dk_nrf52840 (read/write) 1100003 1100035 32 0.0
text 760396 760428 32 0.0
lighting-app nrf52840dk_nrf52840+rpc (read/write) 1148707 1148759 52 0.0
rodata 116744 116748 4 0.0
text 801584 801620 36 0.0
nrf52840dongle_nrf52840 (read/write) 1085875 1085927 52 0.0
rodata 94416 94420 4 0.0
text 752790 752830 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1080426 1080458 32 0.0
text 736366 736402 36 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1133607 1133639 32 0.0
text 771606 771638 32 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1036262 1036294 32 0.0
text 683792 683828 36 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1088887 1088919 32 0.0
text 752188 752224 36 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1075207 1075239 32 0.0
text 742286 742322 36 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read/write) 1746244 1746316 72 0.0
.debug_abbrev 1235716 1235893 177 0.0
.debug_info 27023893 27024825 932 0.0
.debug_line 3685941 3686235 294 0.0
.debug_loc 3603743 3604864 1121 0.0
.debug_ranges 339544 339880 336 0.1
.debug_str 3431043 3431160 117 0.0
.text 1546480 1546552 72 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read/write) 1688780 1688852 72 0.0
.debug_abbrev 1227559 1227736 177 0.0
.debug_info 26760524 26761455 931 0.0
.debug_line 3706925 3707219 294 0.0
.debug_loc 3591380 3592501 1121 0.0
.debug_ranges 338160 338496 336 0.1
.debug_str 3420063 3420180 117 0.0
.text 1489752 1489824 72 0.0
light cy8ckit_062s2_43012 (read/write) 1606956 1607028 72 0.0
.debug_abbrev 1062020 1062197 177 0.0
.debug_info 22225722 22226655 933 0.0
.debug_line 3276050 3276344 294 0.0
.debug_loc 3288865 3289986 1121 0.0
.debug_ranges 303440 303776 336 0.1
.debug_str 3225598 3225715 117 0.0
.text 1416112 1416184 72 0.0
lock cy8ckit_062s2_43012 (read/write) 1640964 1641036 72 0.0
.debug_abbrev 1063995 1064172 177 0.0
.debug_info 22459348 22460280 932 0.0
.debug_line 3273170 3273464 294 0.0
.debug_loc 3316718 3317839 1121 0.0
.debug_ranges 305400 305736 336 0.1
.debug_str 3244969 3245086 117 0.0
.text 1445128 1445200 72 0.0
qpg lighting-app qpg6105+debug (read/write) 1149312 1149344 32 0.0
.text 596412 596444 32 0.0
lock-app qpg6105+debug (read/write) 1115060 1115084 24 0.0
.text 562156 562180 24 0.0
telink all-clusters-app tlsr9518adk80d (read/write) 937352 937424 72 0.0
text 648702 648752 50 0.0
all-clusters-minimal-app tlsr9518adk80d (read/write) 875344 875416 72 0.0
text 612690 612738 48 0.0
light-switch-app tlsr9518adk80d (read/write) 790700 790772 72 0.0
text 554152 554198 46 0.0
lighting-app tlsr9518adk80d (read/write) 874924 874996 72 0.0
text 624114 624162 48 0.0
ota-requestor-app tlsr9518adk80d (read/write) 805192 805264 72 0.0
text 565532 565582 50 0.0
Decreases (3 builds for cc13x2_26x2)
platform target config section 9a41c9c e85e239 change % change
cc13x2_26x2 lock-mtd LP_CC2652R7 (read/write) 183540 183508 -32 -0.0
pump-app LP_CC2652R7 (read/write) 161096 161048 -48 -0.0
pump-controller-app LP_CC2652R7 (read/write) 176908 176860 -48 -0.0
Full report (59 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 9a41c9c e85e239 change % change
bl602 lighting-app bl602 (read/write) 1375258 1375370 112 0.0
.bss 90041 90041 0 0.0
.data 9984 9984 0 0.0
.text 1059186 1059302 116 0.0
bl602+rpc (read/write) 1421082 1421194 112 0.0
.bss 98081 98081 0 0.0
.data 10376 10376 0 0.0
.text 1090682 1090796 114 0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1195127 1195175 48 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67166 67166 0 0.0
.bss_psram 30048 30048 0 0.0
.comment 48 48 0 0.0
.data 4048 4048 0 0.0
.debug_abbrev 1523919 1524141 222 0.0
.debug_aranges 132304 132304 0 0.0
.debug_frame 485212 485216 4 0.0
.debug_info 39161307 39161921 614 0.0
.debug_line 5271709 5271899 190 0.0
.debug_loc 3367110 3367507 397 0.0
.debug_ranges 360272 360416 144 0.0
.debug_str 3462152 3462269 117 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116488 116488 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 566531 566531 0 0.0
.symtab 171808 171808 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
955518 955562 44 0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1283267 1283315 48 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75214 75214 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4576 4576 0 0.0
.debug_abbrev 1667931 1668153 222 0.0
.debug_aranges 140368 140368 0 0.0
.debug_frame 512416 512420 4 0.0
.debug_info 43430528 43431142 614 0.0
.debug_line 5667078 5667268 190 0.0
.debug_loc 3561346 3561757 411 0.0
.debug_ranges 383296 383440 144 0.0
.debug_str 3859441 3859558 117 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 130120 130120 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 626746 626746 0 0.0
.symtab 189920 189920 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1029214 1029258 44 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 678163 678163 0 0.0
(read/write) 173372 173372 0 0.0
.bss 81228 81228 0 0.0
.data 3380 3380 0 0.0
.rodata 89851 89851 0 0.0
.text 588000 588000 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 642459 642459 0 0.0
(read/write) 157996 157996 0 0.0
.bss 80500 80500 0 0.0
.data 3380 3380 0 0.0
.rodata 78987 78987 0 0.0
.text 563152 563152 0 0.0
lock-ftd LP_CC2652R7 (read only) 676295 676295 0 0.0
(read/write) 172808 172808 0 0.0
.bss 78884 78884 0 0.0
.data 3304 3304 0 0.0
.rodata 77271 77271 0 0.0
.text 598544 598544 0 0.0
lock-mtd LP_CC2652R7 (read only) 660819 660851 32 0.0
(read/write) 183540 183508 -32 -0.0
.bss 74140 74140 0 0.0
.data 3304 3304 0 0.0
.rodata 103307 103315 8 0.0
.text 557032 557056 24 0.0
pump-app LP_CC2652R7 (read only) 688743 688791 48 0.0
(read/write) 161096 161048 -48 -0.0
.bss 78852 78852 0 0.0
.data 3296 3296 0 0.0
.rodata 90759 90767 8 0.0
.text 597500 597540 40 0.0
pump-controller-app LP_CC2652R7 (read only) 673027 673075 48 0.0
(read/write) 176908 176860 -48 -0.0
.bss 78948 78948 0 0.0
.data 3292 3292 0 0.0
.rodata 86307 86315 8 0.0
.text 586240 586280 40 0.0
shell LP_CC2652R7 (read only) 669382 669382 0 0.0
(read/write) 184472 184472 0 0.0
.bss 83548 83548 0 0.0
.data 3376 3376 0 0.0
.rodata 86598 86598 0 0.0
.text 582468 582468 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 587230 587230 0 0.0
.app_xip_area 463440 463440 0 0.0
.bss 66208 66208 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 591338 591338 0 0.0
.app_xip_area 462252 462252 0 0.0
.bss 71496 71496 0 0.0
.data 736 736 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 543714 543714 0 0.0
.app_xip_area 425444 425444 0 0.0
.bss 60736 60736 0 0.0
.data 684 684 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 974172 974212 40 0.0
.bss 152260 152260 0 0.0
.data 2168 2168 0 0.0
.text 819724 819764 40 0.0
BRD4161A+rs911x (read/write) 1034744 1034816 72 0.0
.bss 186736 186736 0 0.0
.data 2012 2012 0 0.0
.text 845972 846044 72 0.0
BRD4187C (read/write) 1146576 1146608 32 0.0
.bss 138656 138656 0 0.0
.data 2516 2516 0 0.0
.text 980808 980840 32 0.0
lock-app BRD4161A+wf200 (read/write) 1160144 1160208 64 0.0
.bss 158264 158264 0 0.0
.data 2020 2020 0 0.0
.text 999836 999900 64 0.0
window-app BRD4187C (read/write) 1139812 1139844 32 0.0
.bss 140072 140072 0 0.0
.data 2540 2540 0 0.0
.text 972604 972636 32 0.0
esp32 all-clusters-app c3devkit (read only) 1224288 1224508 220 0.0
(read/write) 1788614 1788614 0 0.0
.dram0.bss 76944 76944 0 0.0
.dram0.data 13840 13840 0 0.0
.flash.rodata 258184 258184 0 0.0
.flash.text 1224288 1224508 220 0.0
.iram0.text 65204 65204 0 0.0
m5stack (read only) 1234187 1234247 60 0.0
(read/write) 564420 564428 8 0.0
.dram0.bss 82320 82320 0 0.0
.dram0.data 34296 34296 0 0.0
.flash.rodata 315136 315144 8 0.0
.flash.text 1228803 1228863 60 0.0
.iram0.text 123939 123939 0 0.0
k32w contact k32w0+release (read/write) 661796 661796 0 0.0
.bss 77112 77112 0 0.0
.data 2104 2104 0 0.0
.text 563468 563468 0 0.0
light k32w0+release (read/write) 671800 671856 56 0.0
.bss 74912 74912 0 0.0
.data 2060 2060 0 0.0
.text 592100 592156 56 0.0
lock k32w0+release (read/write) 633356 633356 0 0.0
.bss 75672 75672 0 0.0
.data 2080 2080 0 0.0
.text 552876 552876 0 0.0
linux all-clusters-app debug (read only) 3085417 3086121 704 0.0
(read/write) 158312 158312 0 0.0
.bss 62464 62464 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 86984 86984 0 0.0
.dynamic 608 608 0 0.0
.got 4768 4768 0 0.0
.init 27 27 0 0.0
.init_array 1184 1184 0 0.0
.rodata 280939 281067 128 0.0
.text 2620274 2620850 576 0.0
all-clusters-minimal-app debug (read only) 2911113 2911817 704 0.0
(read/write) 149712 149712 0 0.0
.bss 61664 61664 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 79352 79352 0 0.0
.dynamic 608 608 0 0.0
.got 4680 4680 0 0.0
.init 27 27 0 0.0
.init_array 1160 1160 0 0.0
.rodata 280427 280555 128 0.0
.text 2449522 2450098 576 0.0
bridge-app debug+rpc (read only) 2410065 2410657 592 0.0
(read/write) 129448 129448 0 0.0
.bss 51008 51008 0 0.0
.data 3792 3792 0 0.0
.data.rel.ro 68616 68616 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 210688 210720 32 0.0
.text 2032306 2032866 560 0.0
chip-tool debug (read only) 11079241 11079889 648 0.0
(read/write) 658304 658304 0 0.0
.bss 25912 25912 0 0.0
.data 2754 2754 0 0.0
.data.rel.ro 623040 623040 0 0.0
.dynamic 608 608 0 0.0
.got 5184 5184 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 591837 591973 136 0.0
.text 8963988 8964500 512 0.0
chip-tool-ipv6only arm64 (read only) 10433596 10434060 464 0.0
(read/write) 706353 706353 0 0.0
.bss 33905 33905 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 650672 650672 0 0.0
.dynamic 560 560 0 0.0
.got 13912 13912 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 518220 518220 0 0.0
.text 8260020 8260484 464 0.0
lighting-app debug+rpc (read only) 2641089 2641745 656 0.0
(read/write) 132296 132296 0 0.0
.bss 49984 49984 0 0.0
.data 2288 2288 0 0.0
.data.rel.ro 73832 73832 0 0.0
.dynamic 608 608 0 0.0
.got 4632 4632 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 227552 227648 96 0.0
.text 2237122 2237682 560 0.0
lock-app debug (read only) 2600329 2600985 656 0.0
(read/write) 127216 127216 0 0.0
.bss 48416 48416 0 0.0
.data 1904 1904 0 0.0
.data.rel.ro 70680 70680 0 0.0
.dynamic 608 608 0 0.0
.got 4664 4664 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 243848 243944 96 0.0
.text 2185058 2185618 560 0.0
ota-provider-app debug (read only) 2396497 2397121 624 0.0
(read/write) 120744 120744 0 0.0
.bss 47936 47936 0 0.0
.data 2128 2128 0 0.0
.data.rel.ro 64600 64600 0 0.0
.dynamic 608 608 0 0.0
.got 4680 4680 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 216328 216392 64 0.0
.text 2011906 2012466 560 0.0
ota-requestor-app debug (read only) 2561809 2562449 640 0.0
(read/write) 129088 129088 0 0.0
.bss 50464 50464 0 0.0
.data 2496 2496 0 0.0
.data.rel.ro 69960 69960 0 0.0
.dynamic 608 608 0 0.0
.got 4672 4672 0 0.0
.init 27 27 0 0.0
.init_array 856 856 0 0.0
.rodata 223408 223472 64 0.0
.text 2161042 2161618 576 0.0
shell debug (read only) 2621521 2622129 608 0.0
(read/write) 142808 142808 0 0.0
.bss 57864 57864 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 77880 77880 0 0.0
.dynamic 608 608 0 0.0
.got 4128 4128 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 239250 239314 64 0.0
.text 2223042 2223586 544 0.0
thermostat-no-ble arm64 (read only) 2392812 2393308 496 0.0
(read/write) 143489 143489 0 0.0
.bss 55329 55329 0 0.0
.data 1816 1816 0 0.0
.data.rel.ro 77096 77096 0 0.0
.dynamic 560 560 0 0.0
.got 5176 5176 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 144788 144788 0 0.0
.text 2004560 2005056 496 0.0
tv-app debug (read only) 3254881 3255569 688 0.0
(read/write) 261832 261832 0 0.0
.bss 170648 170648 0 0.0
.data 4256 4256 0 0.0
.data.rel.ro 80224 80224 0 0.0
.dynamic 608 608 0 0.0
.got 5000 5000 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 268216 268344 128 0.0
.text 2792962 2793522 560 0.0
tv-casting-app debug (read only) 5580961 5581537 576 0.0
(read/write) 161720 161720 0 0.0
.bss 52120 52120 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 101056 101056 0 0.0
.dynamic 608 608 0 0.0
.got 4912 4912 0 0.0
.init 27 27 0 0.0
.init_array 1048 1048 0 0.0
.rodata 355001 355097 96 0.0
.text 4950578 4951058 480 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2452336 2452408 72 0.0
.bss 215012 215012 0 0.0
.data 5872 5872 0 0.0
.text 1414980 1415052 72 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1187855 1187903 48 0.0
bss 145285 145285 0 0.0
rodata 144516 144516 0 0.0
text 816982 817018 36 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1167283 1167315 32 0.0
bss 144512 144512 0 0.0
rodata 136304 136304 0 0.0
text 805532 805568 36 0.0
light-switch-app nrf52840dk_nrf52840 (read/write) 1100003 1100035 32 0.0
bss 136891 136891 0 0.0
rodata 121672 121672 0 0.0
text 760396 760428 32 0.0
lighting-app nrf52840dk_nrf52840+rpc (read/write) 1148707 1148759 52 0.0
bss 148073 148073 0 0.0
rodata 116744 116748 4 0.0
text 801584 801620 36 0.0
nrf52840dongle_nrf52840 (read/write) 1085875 1085927 52 0.0
bss 154334 154334 0 0.0
rodata 94416 94420 4 0.0
text 752790 752830 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1080426 1080458 32 0.0
bss 143016 143016 0 0.0
rodata 117964 117964 0 0.0
text 736366 736402 36 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1133607 1133639 32 0.0
bss 137896 137896 0 0.0
rodata 143204 143204 0 0.0
text 771606 771638 32 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1036262 1036294 32 0.0
bss 133781 133781 0 0.0
rodata 135608 135608 0 0.0
text 683792 683828 36 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1088887 1088919 32 0.0
bss 136720 136720 0 0.0
rodata 118940 118940 0 0.0
text 752188 752224 36 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1075207 1075239 32 0.0
bss 136487 136487 0 0.0
rodata 115420 115420 0 0.0
text 742286 742322 36 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 841968 841968 0 0.0
(read/write) 1746244 1746316 72 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188712 188712 0 0.0
.comment 204 204 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 2664 2664 0 0.0
.debug_abbrev 1235716 1235893 177 0.0
.debug_aranges 110704 110704 0 0.0
.debug_frame 371284 371284 0 0.0
.debug_info 27023893 27024825 932 0.0
.debug_line 3685941 3686235 294 0.0
.debug_loc 3603743 3604864 1121 0.0
.debug_ranges 339544 339880 336 0.1
.debug_str 3431043 3431160 117 0.0
.heap 841968 841968 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 570257 570257 0 0.0
.symtab 421440 421440 0 0.0
.text 0 0 0 0.0
1546480 1546552 72 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842704 842704 0 0.0
(read/write) 1688780 1688852 72 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187976 187976 0 0.0
.comment 204 204 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 2664 2664 0 0.0
.debug_abbrev 1227559 1227736 177 0.0
.debug_aranges 110176 110176 0 0.0
.debug_frame 374364 374364 0 0.0
.debug_info 26760524 26761455 931 0.0
.debug_line 3706925 3707219 294 0.0
.debug_loc 3591380 3592501 1121 0.0
.debug_ranges 338160 338496 336 0.1
.debug_str 3420063 3420180 117 0.0
.heap 842704 842704 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 534346 534346 0 0.0
.symtab 407872 407872 0 0.0
.text 1489752 1489824 72 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850888 850888 0 0.0
(read/write) 1606956 1607028 72 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180000 180000 0 0.0
.comment 204 204 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 2456 2456 0 0.0
.debug_abbrev 1062020 1062197 177 0.0
.debug_aranges 102376 102376 0 0.0
.debug_frame 344676 344676 0 0.0
.debug_info 22225722 22226655 933 0.0
.debug_line 3276050 3276344 294 0.0
.debug_loc 3288865 3289986 1121 0.0
.debug_ranges 303440 303776 336 0.1
.debug_str 3225598 3225715 117 0.0
.heap 850888 850888 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 470671 470671 0 0.0
.symtab 376240 376240 0 0.0
.text 1416112 1416184 72 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845896 845896 0 0.0
(read/write) 1640964 1641036 72 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184976 184976 0 0.0
.comment 204 204 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 2472 2472 0 0.0
.debug_abbrev 1063995 1064172 177 0.0
.debug_aranges 102776 102776 0 0.0
.debug_frame 346552 346552 0 0.0
.debug_info 22459348 22460280 932 0.0
.debug_line 3273170 3273464 294 0.0
.debug_loc 3316718 3317839 1121 0.0
.debug_ranges 305400 305736 336 0.1
.debug_str 3244969 3245086 117 0.0
.heap 845896 845896 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 473074 473074 0 0.0
.symtab 377936 377936 0 0.0
.text 1445128 1445200 72 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1149312 1149344 32 0.0
.bss 109860 109860 0 0.0
.data 848 848 0 0.0
.text 596412 596444 32 0.0
lock-app qpg6105+debug (read/write) 1115060 1115084 24 0.0
.bss 106332 106332 0 0.0
.data 836 836 0 0.0
.text 562156 562180 24 0.0
telink all-clusters-app tlsr9518adk80d (read/write) 937352 937424 72 0.0
bss 81620 81620 0 0.0
noinit 43440 43440 0 0.0
text 648702 648752 50 0.0
all-clusters-minimal-app tlsr9518adk80d (read/write) 875344 875416 72 0.0
bss 80844 80844 0 0.0
noinit 43440 43440 0 0.0
text 612690 612738 48 0.0
light-switch-app tlsr9518adk80d (read/write) 790700 790772 72 0.0
bss 72468 72468 0 0.0
noinit 43520 43520 0 0.0
text 554152 554198 46 0.0
lighting-app tlsr9518adk80d (read/write) 874924 874996 72 0.0
bss 82232 82232 0 0.0
noinit 43520 43520 0 0.0
text 624114 624162 48 0.0
ota-requestor-app tlsr9518adk80d (read/write) 805192 805264 72 0.0
bss 74040 74040 0 0.0
noinit 43520 43520 0 0.0
text 565532 565582 50 0.0

@andy31415
Copy link
Contributor

@emargolis this somehow triggered clang-tidy:

...
/Users/runner/work/connectedhomeip/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__algorithm/find_if.h:25:9: note: Calling 'operator()'
    if (__pred(*__first))
        ^~~~~~~~~~~~~~~~
/Users/runner/work/connectedhomeip/connectedhomeip/out/default/../../src/platform/Darwin/DnssdImpl.cpp:244:55: note: Null pointer passed as 1st argument to string comparison function
                                               return strcmp(name, service.mName) == 0 && type == GetFullType(&service) &&
                                                      ^      ~~~~

I am unsure how, but this needs fixing before we can merge the PR.

This PR attempts to identify all cases where %s specifiers in the logging APIs
(ChipLogError(), ChipLogProgress(), ChipLogDetail()) don't have a guaranteed
non-null string parameter.

In all identified cases the issue is fixed using StringOrNullMarker() helper
method to guarantee it doesn't happen.
@emargolis emargolis force-pushed the emargolis/feature/prevent-null-str-in-logging branch from e85e239 to 35e10a4 Compare November 16, 2022 21:32
@github-actions
Copy link

github-actions bot commented Nov 16, 2022

PR #23604: Size comparison from bbf3111 to 35e10a4

Increases (50 builds for bl602, bl702, cc13x2_26x2, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section bbf3111 35e10a4 change % change
bl602 lighting-app bl602 (read/write) 1375778 1375890 112 0.0
.text 1059628 1059742 114 0.0
bl602+rpc (read/write) 1421602 1421714 112 0.0
.text 1091122 1091236 114 0.0
bl702 lighting-app bl702 (read/write) 1195655 1195703 48 0.0
.debug_abbrev 1523925 1524147 222 0.0
.debug_frame 485340 485344 4 0.0
.debug_info 39163108 39163723 615 0.0
.debug_line 5273098 5273288 190 0.0
.debug_loc 3367914 3368311 397 0.0
.debug_ranges 360296 360440 144 0.0
.debug_str 3463623 3463740 117 0.0
.text 955956 956002 46 0.0
bl702+rpc (read/write) 1283795 1283843 48 0.0
.debug_abbrev 1667955 1668177 222 0.0
.debug_frame 512544 512548 4 0.0
.debug_info 43432310 43432924 614 0.0
.debug_line 5668467 5668657 190 0.0
.debug_loc 3562150 3562561 411 0.0
.debug_ranges 383320 383464 144 0.0
.debug_str 3860938 3861055 117 0.0
.text 1029656 1029700 44 0.0
cc13x2_26x2 lock-mtd LP_CC2652R7 (read only) 661075 661115 40 0.0
.rodata 103307 103315 8 0.0
.text 557288 557320 32 0.0
pump-app LP_CC2652R7 (read only) 689007 689055 48 0.0
.rodata 90759 90767 8 0.0
.text 597764 597804 40 0.0
pump-controller-app LP_CC2652R7 (read only) 673291 673339 48 0.0
.rodata 86307 86315 8 0.0
.text 586504 586544 40 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 974444 974484 40 0.0
.text 819996 820036 40 0.0
BRD4161A+rs911x (read/write) 1035208 1035280 72 0.0
.text 846436 846508 72 0.0
BRD4187C (read/write) 1147032 1147064 32 0.0
.text 981264 981296 32 0.0
lock-app BRD4161A+wf200 (read/write) 1160400 1160480 80 0.0
.text 1000092 1000172 80 0.0
window-app BRD4187C (read/write) 1140268 1140300 32 0.0
.text 973060 973092 32 0.0
esp32 all-clusters-app c3devkit (read only) 1224618 1224828 210 0.0
.flash.text 1224618 1224828 210 0.0
m5stack (read only) 1234463 1234527 64 0.0
.flash.text 1229079 1229143 64 0.0
k32w light k32w0+release (read/write) 672072 672112 40 0.0
.text 592372 592412 40 0.0
linux all-clusters-app debug (read only) 3087657 3088393 736 0.0
.rodata 281131 281291 160 0.1
.text 2622034 2622610 576 0.0
all-clusters-minimal-app debug (read only) 2913385 2914089 704 0.0
.rodata 280651 280779 128 0.0
.text 2451282 2451858 576 0.0
bridge-app debug+rpc (read only) 2412305 2412929 624 0.0
.rodata 210880 210944 64 0.0
.text 2034066 2034626 560 0.0
chip-tool debug (read only) 11081481 11082097 616 0.0
.rodata 592029 592133 104 0.0
.text 8965748 8966260 512 0.0
chip-tool-ipv6only arm64 (read only) 10435580 10436044 464 0.0
.text 8261380 8261844 464 0.0
lighting-app debug+rpc (read only) 2643329 2643985 656 0.0
.rodata 227744 227840 96 0.0
.text 2238882 2239442 560 0.0
lock-app debug (read only) 2602601 2603225 624 0.0
.rodata 244072 244136 64 0.0
.text 2186818 2187378 560 0.0
ota-provider-app debug (read only) 2398769 2399393 624 0.0
.rodata 216552 216616 64 0.0
.text 2013666 2014226 560 0.0
ota-requestor-app debug (read only) 2564081 2564721 640 0.0
.rodata 223632 223696 64 0.0
.text 2162802 2163378 576 0.0
shell debug (read only) 2623761 2624369 608 0.0
.rodata 239442 239506 64 0.0
.text 2224802 2225346 544 0.0
thermostat-no-ble arm64 (read only) 2394796 2395292 496 0.0
.text 2005920 2006416 496 0.0
tv-app debug (read only) 3257121 3257809 688 0.0
.rodata 268408 268536 128 0.0
.text 2794722 2795282 560 0.0
tv-casting-app debug (read only) 5583201 5583809 608 0.0
.rodata 355193 355321 128 0.0
.text 4952338 4952818 480 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2452592 2452664 72 0.0
.text 1415236 1415308 72 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1188127 1188159 32 0.0
text 817248 817284 36 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1167539 1167587 48 0.0
text 805798 805834 36 0.0
light-switch-app nrf52840dk_nrf52840 (read/write) 1100255 1100303 48 0.0
text 760658 760698 40 0.0
lighting-app nrf52840dk_nrf52840+rpc (read/write) 1148975 1149015 40 0.0
rodata 116740 116748 8 0.0
text 801850 801886 36 0.0
nrf52840dongle_nrf52840 (read/write) 1086143 1086183 40 0.0
rodata 94412 94420 8 0.0
text 753056 753096 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1080698 1080730 32 0.0
text 736632 736668 36 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1133879 1133911 32 0.0
text 771872 771908 36 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1036518 1036566 48 0.0
text 684058 684094 36 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1089159 1089191 32 0.0
text 752454 752490 36 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1075463 1075511 48 0.0
text 742552 742588 36 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read/write) 1746708 1746780 72 0.0
.debug_abbrev 1235724 1235901 177 0.0
.debug_info 27026555 27027490 935 0.0
.debug_line 3687259 3687553 294 0.0
.debug_loc 3605093 3606214 1121 0.0
.debug_ranges 339592 339928 336 0.1
.debug_str 3432518 3432635 117 0.0
.text 1546944 1547016 72 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read/write) 1689244 1689316 72 0.0
.debug_abbrev 1227567 1227744 177 0.0
.debug_info 26763185 26764118 933 0.0
.debug_line 3708243 3708537 294 0.0
.debug_loc 3592699 3593820 1121 0.0
.debug_ranges 338208 338544 336 0.1
.debug_str 3421538 3421655 117 0.0
.text 1490216 1490288 72 0.0
light cy8ckit_062s2_43012 (read/write) 1607420 1607492 72 0.0
.debug_abbrev 1062028 1062205 177 0.0
.debug_info 22228395 22229329 934 0.0
.debug_line 3277368 3277662 294 0.0
.debug_loc 3290184 3291305 1121 0.0
.debug_ranges 303488 303824 336 0.1
.debug_str 3227073 3227190 117 0.0
.text 1416576 1416648 72 0.0
lock cy8ckit_062s2_43012 (read/write) 1641428 1641500 72 0.0
.debug_abbrev 1064003 1064180 177 0.0
.debug_info 22462022 22462954 932 0.0
.debug_line 3274488 3274782 294 0.0
.debug_loc 3318037 3319158 1121 0.0
.debug_ranges 305448 305784 336 0.1
.debug_str 3246430 3246547 117 0.0
.text 1445592 1445664 72 0.0
qpg lighting-app qpg6105+debug (read/write) 1151072 1151104 32 0.0
.text 598172 598204 32 0.0
lock-app qpg6105+debug (read/write) 1116768 1116800 32 0.0
.text 563864 563896 32 0.0
telink all-clusters-app tlsr9518adk80d (read/write) 937656 937728 72 0.0
text 649006 649058 52 0.0
all-clusters-minimal-app tlsr9518adk80d (read/write) 875648 875720 72 0.0
text 612994 613042 48 0.0
light-switch-app tlsr9518adk80d (read/write) 791004 791076 72 0.0
text 554454 554502 48 0.0
lighting-app tlsr9518adk80d (read/write) 875228 875300 72 0.0
text 624416 624466 50 0.0
ota-requestor-app tlsr9518adk80d (read/write) 805496 805568 72 0.0
text 565834 565882 48 0.0
Decreases (5 builds for cc13x2_26x2, cyw30739)
platform target config section bbf3111 35e10a4 change % change
cc13x2_26x2 lock-mtd LP_CC2652R7 (read/write) 183284 183244 -40 -0.0
pump-app LP_CC2652R7 (read/write) 160832 160784 -48 -0.0
pump-controller-app LP_CC2652R7 (read/write) 176644 176596 -48 -0.0
cyw30739 lock cyw930739m2evb_01 (read/write) 591602 591594 -8 -0.0
.app_xip_area 462516 462508 -8 -0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 543978 543970 -8 -0.0
.app_xip_area 425708 425700 -8 -0.0
Full report (59 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section bbf3111 35e10a4 change % change
bl602 lighting-app bl602 (read/write) 1375778 1375890 112 0.0
.bss 90041 90041 0 0.0
.data 9984 9984 0 0.0
.text 1059628 1059742 114 0.0
bl602+rpc (read/write) 1421602 1421714 112 0.0
.bss 98081 98081 0 0.0
.data 10376 10376 0 0.0
.text 1091122 1091236 114 0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1195655 1195703 48 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67166 67166 0 0.0
.bss_psram 30048 30048 0 0.0
.comment 48 48 0 0.0
.data 4048 4048 0 0.0
.debug_abbrev 1523925 1524147 222 0.0
.debug_aranges 132328 132328 0 0.0
.debug_frame 485340 485344 4 0.0
.debug_info 39163108 39163723 615 0.0
.debug_line 5273098 5273288 190 0.0
.debug_loc 3367914 3368311 397 0.0
.debug_ranges 360296 360440 144 0.0
.debug_str 3463623 3463740 117 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116568 116568 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 566910 566910 0 0.0
.symtab 171888 171888 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
955956 956002 46 0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1283795 1283843 48 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75214 75214 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4576 4576 0 0.0
.debug_abbrev 1667955 1668177 222 0.0
.debug_aranges 140392 140392 0 0.0
.debug_frame 512544 512548 4 0.0
.debug_info 43432310 43432924 614 0.0
.debug_line 5668467 5668657 190 0.0
.debug_loc 3562150 3562561 411 0.0
.debug_ranges 383320 383464 144 0.0
.debug_str 3860938 3861055 117 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 130200 130200 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 627125 627125 0 0.0
.symtab 190000 190000 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1029656 1029700 44 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 678427 678427 0 0.0
(read/write) 173108 173108 0 0.0
.bss 81228 81228 0 0.0
.data 3380 3380 0 0.0
.rodata 89851 89851 0 0.0
.text 588264 588264 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 642723 642723 0 0.0
(read/write) 157996 157996 0 0.0
.bss 80500 80500 0 0.0
.data 3380 3380 0 0.0
.rodata 78987 78987 0 0.0
.text 563416 563416 0 0.0
lock-ftd LP_CC2652R7 (read only) 676559 676559 0 0.0
(read/write) 172544 172544 0 0.0
.bss 78884 78884 0 0.0
.data 3304 3304 0 0.0
.rodata 77271 77271 0 0.0
.text 598808 598808 0 0.0
lock-mtd LP_CC2652R7 (read only) 661075 661115 40 0.0
(read/write) 183284 183244 -40 -0.0
.bss 74140 74140 0 0.0
.data 3304 3304 0 0.0
.rodata 103307 103315 8 0.0
.text 557288 557320 32 0.0
pump-app LP_CC2652R7 (read only) 689007 689055 48 0.0
(read/write) 160832 160784 -48 -0.0
.bss 78852 78852 0 0.0
.data 3296 3296 0 0.0
.rodata 90759 90767 8 0.0
.text 597764 597804 40 0.0
pump-controller-app LP_CC2652R7 (read only) 673291 673339 48 0.0
(read/write) 176644 176596 -48 -0.0
.bss 78948 78948 0 0.0
.data 3292 3292 0 0.0
.rodata 86307 86315 8 0.0
.text 586504 586544 40 0.0
shell LP_CC2652R7 (read only) 669646 669646 0 0.0
(read/write) 184208 184208 0 0.0
.bss 83548 83548 0 0.0
.data 3376 3376 0 0.0
.rodata 86598 86598 0 0.0
.text 582732 582732 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 587494 587494 0 0.0
.app_xip_area 463704 463704 0 0.0
.bss 66208 66208 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 591602 591594 -8 -0.0
.app_xip_area 462516 462508 -8 -0.0
.bss 71496 71496 0 0.0
.data 736 736 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 543978 543970 -8 -0.0
.app_xip_area 425708 425700 -8 -0.0
.bss 60736 60736 0 0.0
.data 684 684 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 974444 974484 40 0.0
.bss 152260 152260 0 0.0
.data 2168 2168 0 0.0
.text 819996 820036 40 0.0
BRD4161A+rs911x (read/write) 1035208 1035280 72 0.0
.bss 186736 186736 0 0.0
.data 2012 2012 0 0.0
.text 846436 846508 72 0.0
BRD4187C (read/write) 1147032 1147064 32 0.0
.bss 138656 138656 0 0.0
.data 2516 2516 0 0.0
.text 981264 981296 32 0.0
lock-app BRD4161A+wf200 (read/write) 1160400 1160480 80 0.0
.bss 158264 158264 0 0.0
.data 2020 2020 0 0.0
.text 1000092 1000172 80 0.0
window-app BRD4187C (read/write) 1140268 1140300 32 0.0
.bss 140072 140072 0 0.0
.data 2540 2540 0 0.0
.text 973060 973092 32 0.0
esp32 all-clusters-app c3devkit (read only) 1224618 1224828 210 0.0
(read/write) 1788614 1788614 0 0.0
.dram0.bss 76944 76944 0 0.0
.dram0.data 13840 13840 0 0.0
.flash.rodata 258184 258184 0 0.0
.flash.text 1224618 1224828 210 0.0
.iram0.text 65204 65204 0 0.0
m5stack (read only) 1234463 1234527 64 0.0
(read/write) 564420 564420 0 0.0
.dram0.bss 82320 82320 0 0.0
.dram0.data 34296 34296 0 0.0
.flash.rodata 315136 315136 0 0.0
.flash.text 1229079 1229143 64 0.0
.iram0.text 123939 123939 0 0.0
k32w contact k32w0+release (read/write) 662052 662052 0 0.0
.bss 77112 77112 0 0.0
.data 2104 2104 0 0.0
.text 563724 563724 0 0.0
light k32w0+release (read/write) 672072 672112 40 0.0
.bss 74912 74912 0 0.0
.data 2060 2060 0 0.0
.text 592372 592412 40 0.0
lock k32w0+release (read/write) 633612 633612 0 0.0
.bss 75672 75672 0 0.0
.data 2080 2080 0 0.0
.text 553132 553132 0 0.0
linux all-clusters-app debug (read only) 3087657 3088393 736 0.0
(read/write) 158472 158472 0 0.0
.bss 62464 62464 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 87144 87144 0 0.0
.dynamic 608 608 0 0.0
.got 4768 4768 0 0.0
.init 27 27 0 0.0
.init_array 1184 1184 0 0.0
.rodata 281131 281291 160 0.1
.text 2622034 2622610 576 0.0
all-clusters-minimal-app debug (read only) 2913385 2914089 704 0.0
(read/write) 149872 149872 0 0.0
.bss 61664 61664 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 79512 79512 0 0.0
.dynamic 608 608 0 0.0
.got 4680 4680 0 0.0
.init 27 27 0 0.0
.init_array 1160 1160 0 0.0
.rodata 280651 280779 128 0.0
.text 2451282 2451858 576 0.0
bridge-app debug+rpc (read only) 2412305 2412929 624 0.0
(read/write) 129608 129608 0 0.0
.bss 51008 51008 0 0.0
.data 3792 3792 0 0.0
.data.rel.ro 68776 68776 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 210880 210944 64 0.0
.text 2034066 2034626 560 0.0
chip-tool debug (read only) 11081481 11082097 616 0.0
(read/write) 658464 658464 0 0.0
.bss 25912 25912 0 0.0
.data 2754 2754 0 0.0
.data.rel.ro 623200 623200 0 0.0
.dynamic 608 608 0 0.0
.got 5184 5184 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 592029 592133 104 0.0
.text 8965748 8966260 512 0.0
chip-tool-ipv6only arm64 (read only) 10435580 10436044 464 0.0
(read/write) 706529 706529 0 0.0
.bss 33905 33905 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 650832 650832 0 0.0
.dynamic 560 560 0 0.0
.got 13928 13928 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 518412 518412 0 0.0
.text 8261380 8261844 464 0.0
lighting-app debug+rpc (read only) 2643329 2643985 656 0.0
(read/write) 132456 132456 0 0.0
.bss 49984 49984 0 0.0
.data 2288 2288 0 0.0
.data.rel.ro 73992 73992 0 0.0
.dynamic 608 608 0 0.0
.got 4632 4632 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 227744 227840 96 0.0
.text 2238882 2239442 560 0.0
lock-app debug (read only) 2602601 2603225 624 0.0
(read/write) 127376 127376 0 0.0
.bss 48416 48416 0 0.0
.data 1904 1904 0 0.0
.data.rel.ro 70840 70840 0 0.0
.dynamic 608 608 0 0.0
.got 4664 4664 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 244072 244136 64 0.0
.text 2186818 2187378 560 0.0
ota-provider-app debug (read only) 2398769 2399393 624 0.0
(read/write) 120904 120904 0 0.0
.bss 47936 47936 0 0.0
.data 2128 2128 0 0.0
.data.rel.ro 64760 64760 0 0.0
.dynamic 608 608 0 0.0
.got 4680 4680 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 216552 216616 64 0.0
.text 2013666 2014226 560 0.0
ota-requestor-app debug (read only) 2564081 2564721 640 0.0
(read/write) 129248 129248 0 0.0
.bss 50464 50464 0 0.0
.data 2496 2496 0 0.0
.data.rel.ro 70120 70120 0 0.0
.dynamic 608 608 0 0.0
.got 4672 4672 0 0.0
.init 27 27 0 0.0
.init_array 856 856 0 0.0
.rodata 223632 223696 64 0.0
.text 2162802 2163378 576 0.0
shell debug (read only) 2623761 2624369 608 0.0
(read/write) 142968 142968 0 0.0
.bss 57864 57864 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78040 78040 0 0.0
.dynamic 608 608 0 0.0
.got 4128 4128 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 239442 239506 64 0.0
.text 2224802 2225346 544 0.0
thermostat-no-ble arm64 (read only) 2394796 2395292 496 0.0
(read/write) 143665 143665 0 0.0
.bss 55329 55329 0 0.0
.data 1816 1816 0 0.0
.data.rel.ro 77256 77256 0 0.0
.dynamic 560 560 0 0.0
.got 5192 5192 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 144980 144980 0 0.0
.text 2005920 2006416 496 0.0
tv-app debug (read only) 3257121 3257809 688 0.0
(read/write) 261992 261992 0 0.0
.bss 170648 170648 0 0.0
.data 4256 4256 0 0.0
.data.rel.ro 80384 80384 0 0.0
.dynamic 608 608 0 0.0
.got 5000 5000 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 268408 268536 128 0.0
.text 2794722 2795282 560 0.0
tv-casting-app debug (read only) 5583201 5583809 608 0.0
(read/write) 161880 161880 0 0.0
.bss 52120 52120 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 101216 101216 0 0.0
.dynamic 608 608 0 0.0
.got 4912 4912 0 0.0
.init 27 27 0 0.0
.init_array 1048 1048 0 0.0
.rodata 355193 355321 128 0.0
.text 4952338 4952818 480 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2452592 2452664 72 0.0
.bss 215012 215012 0 0.0
.data 5872 5872 0 0.0
.text 1415236 1415308 72 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1188127 1188159 32 0.0
bss 145285 145285 0 0.0
rodata 144516 144516 0 0.0
text 817248 817284 36 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1167539 1167587 48 0.0
bss 144512 144512 0 0.0
rodata 136304 136304 0 0.0
text 805798 805834 36 0.0
light-switch-app nrf52840dk_nrf52840 (read/write) 1100255 1100303 48 0.0
bss 136891 136891 0 0.0
rodata 121668 121668 0 0.0
text 760658 760698 40 0.0
lighting-app nrf52840dk_nrf52840+rpc (read/write) 1148975 1149015 40 0.0
bss 148073 148073 0 0.0
rodata 116740 116748 8 0.0
text 801850 801886 36 0.0
nrf52840dongle_nrf52840 (read/write) 1086143 1086183 40 0.0
bss 154334 154334 0 0.0
rodata 94412 94420 8 0.0
text 753056 753096 40 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1080698 1080730 32 0.0
bss 143016 143016 0 0.0
rodata 117964 117964 0 0.0
text 736632 736668 36 0.0
lock-app nrf52840dk_nrf52840 (read/write) 1133879 1133911 32 0.0
bss 137896 137896 0 0.0
rodata 143204 143204 0 0.0
text 771872 771908 36 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 1036518 1036566 48 0.0
bss 133781 133781 0 0.0
rodata 135608 135608 0 0.0
text 684058 684094 36 0.0
pump-app nrf52840dk_nrf52840 (read/write) 1089159 1089191 32 0.0
bss 136720 136720 0 0.0
rodata 118940 118940 0 0.0
text 752454 752490 36 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 1075463 1075511 48 0.0
bss 136487 136487 0 0.0
rodata 115420 115420 0 0.0
text 742552 742588 36 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 841968 841968 0 0.0
(read/write) 1746708 1746780 72 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188712 188712 0 0.0
.comment 204 204 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 2664 2664 0 0.0
.debug_abbrev 1235724 1235901 177 0.0
.debug_aranges 110728 110728 0 0.0
.debug_frame 371396 371396 0 0.0
.debug_info 27026555 27027490 935 0.0
.debug_line 3687259 3687553 294 0.0
.debug_loc 3605093 3606214 1121 0.0
.debug_ranges 339592 339928 336 0.1
.debug_str 3432518 3432635 117 0.0
.heap 841968 841968 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 570636 570636 0 0.0
.symtab 421600 421600 0 0.0
.text 1546944 1547016 72 0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842704 842704 0 0.0
(read/write) 1689244 1689316 72 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187976 187976 0 0.0
.comment 204 204 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 2664 2664 0 0.0
.debug_abbrev 1227567 1227744 177 0.0
.debug_aranges 110200 110200 0 0.0
.debug_frame 374476 374476 0 0.0
.debug_info 26763185 26764118 933 0.0
.debug_line 3708243 3708537 294 0.0
.debug_loc 3592699 3593820 1121 0.0
.debug_ranges 338208 338544 336 0.1
.debug_str 3421538 3421655 117 0.0
.heap 842704 842704 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 534725 534725 0 0.0
.symtab 408032 408032 0 0.0
.text 1490216 1490288 72 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850888 850888 0 0.0
(read/write) 1607420 1607492 72 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180000 180000 0 0.0
.comment 204 204 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 2456 2456 0 0.0
.debug_abbrev 1062028 1062205 177 0.0
.debug_aranges 102400 102400 0 0.0
.debug_frame 344788 344788 0 0.0
.debug_info 22228395 22229329 934 0.0
.debug_line 3277368 3277662 294 0.0
.debug_loc 3290184 3291305 1121 0.0
.debug_ranges 303488 303824 336 0.1
.debug_str 3227073 3227190 117 0.0
.heap 850888 850888 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 471050 471050 0 0.0
.symtab 376400 376400 0 0.0
.text 1416576 1416648 72 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845896 845896 0 0.0
(read/write) 1641428 1641500 72 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184976 184976 0 0.0
.comment 204 204 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 2472 2472 0 0.0
.debug_abbrev 1064003 1064180 177 0.0
.debug_aranges 102800 102800 0 0.0
.debug_frame 346664 346664 0 0.0
.debug_info 22462022 22462954 932 0.0
.debug_line 3274488 3274782 294 0.0
.debug_loc 3318037 3319158 1121 0.0
.debug_ranges 305448 305784 336 0.1
.debug_str 3246430 3246547 117 0.0
.heap 845896 845896 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 473453 473453 0 0.0
.symtab 378096 378096 0 0.0
.text 1445592 1445664 72 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1151072 1151104 32 0.0
.bss 111116 111116 0 0.0
.data 848 848 0 0.0
.text 598172 598204 32 0.0
lock-app qpg6105+debug (read/write) 1116768 1116800 32 0.0
.bss 106564 106564 0 0.0
.data 836 836 0 0.0
.text 563864 563896 32 0.0
telink all-clusters-app tlsr9518adk80d (read/write) 937656 937728 72 0.0
bss 81620 81620 0 0.0
noinit 43440 43440 0 0.0
text 649006 649058 52 0.0
all-clusters-minimal-app tlsr9518adk80d (read/write) 875648 875720 72 0.0
bss 80844 80844 0 0.0
noinit 43440 43440 0 0.0
text 612994 613042 48 0.0
light-switch-app tlsr9518adk80d (read/write) 791004 791076 72 0.0
bss 72468 72468 0 0.0
noinit 43520 43520 0 0.0
text 554454 554502 48 0.0
lighting-app tlsr9518adk80d (read/write) 875228 875300 72 0.0
bss 82232 82232 0 0.0
noinit 43520 43520 0 0.0
text 624416 624466 50 0.0
ota-requestor-app tlsr9518adk80d (read/write) 805496 805568 72 0.0
bss 74040 74040 0 0.0
noinit 43520 43520 0 0.0
text 565834 565882 48 0.0

@emargolis emargolis merged commit 406bdfe into project-chip:master Nov 17, 2022
adbridge pushed a commit to ARM-software/connectedhomeip that referenced this pull request Nov 18, 2022
This PR attempts to identify all cases where %s specifiers in the logging APIs
(ChipLogError(), ChipLogProgress(), ChipLogDetail()) don't have a guaranteed
non-null string parameter.

In all identified cases the issue is fixed using StringOrNullMarker() helper
method to guarantee it doesn't happen.
adbridge pushed a commit to ARM-software/connectedhomeip that referenced this pull request Nov 18, 2022
This PR attempts to identify all cases where %s specifiers in the logging APIs
(ChipLogError(), ChipLogProgress(), ChipLogDetail()) don't have a guaranteed
non-null string parameter.

In all identified cases the issue is fixed using StringOrNullMarker() helper
method to guarantee it doesn't happen.
rawadhilal88 pushed a commit to sharadb-amazon/connectedhomeip that referenced this pull request Feb 22, 2023
…at fixes DNS-SD browsing

Add an API to stop a DNS-SD browse operation. (project-chip#22823)

* Add an API to stop a DNS-SD browse operation.

Most backends don't implement this yet. Darwin does, and no longer
stops Browse operations itself.

Fixes project-chip#19194

May provide a way toward fixing
project-chip#13275

* Address review comments.

* Address more review comments.

[darwin] Use DNSServiceReconfirmRecord for A and AAAA records to miti… (project-chip#23067)

* [Dnssd] Add ReconfirmRecord method to verify address that appears to be out of date

* [SetUpCodePairer] Ask Dnssd to reconfirm discovered addresses if connecting to them ends with a CHIP_ERROR_TIMEOUT

Fix Logging When Trying to Log Nullptr To Strings (project-chip#23604)

This PR attempts to identify all cases where %s specifiers in the logging APIs
(ChipLogError(), ChipLogProgress(), ChipLogDetail()) don't have a guaranteed
non-null string parameter.

In all identified cases the issue is fixed using StringOrNullMarker() helper
method to guarantee it doesn't happen.

Use the "right" byte-swapping function for port in Darwin DnssdImpl. (project-chip#23894)

The incoming port is in host byte order and we are converting to network byte
order, so should use htons (which happens to do the same thing as ntohs, so no
behavior change).

Co-authored-by: Andrei Litvin <andy314@gmail.com>

Add a way for Resolver consumers to cancel operational resolve attempts. (project-chip#24010)

* Add a way for Resolver consumers to cancel operational resolve attempts.

Adds a way for consumers to notify Resolver when they no longer care
about an operational resolve, so a Resolver implementation can keep
track of how many consumers are interested and stop work as desired if
no one is interested.

Fixes project-chip#23881

* Address review comments.

* Address review comments.

Make sure we stop resolves triggered by a browse when the browse stops on Darwin. (project-chip#24733)

* Make sure we stop resolves triggered by a browse when the browse stops on Darwin.

Without this change, if there is a PTR record that matches whatever we are
browsing but no corresponding SRV record, we would end up leaking a resolve
forever.

Tested by modifying minimal mdns SrvResponder::AddAllResponses to no-op instead
of actually adding any responses, then trying to commission the device running
the modified minimal mdns.  Without this change, when the browse stops the
resolves it triggered keep going.  With this change, termination of the browse
also terminates the resolves.

Fixes project-chip#24074

* Also avoid leaking ResolveContext instances.

* Fix handling of multiple interfaces.

* Address review comment.

Improve discovery logging on Darwin. (project-chip#24846)

1) Use progress, not detail, logging, because detail logging is not actually
   persisted in system logs.
2) Add logging to a few functions that were missing it.

Remove the address type argument from ResolveNodeId. (project-chip#24006)

All consumers were passing kAny in practice, and some of the backends
(e.g. minimal mdns) had no capability to filter by type anyway.
rawadhilal88 pushed a commit to sharadb-amazon/connectedhomeip that referenced this pull request Feb 22, 2023
This PR attempts to identify all cases where %s specifiers in the logging APIs
(ChipLogError(), ChipLogProgress(), ChipLogDetail()) don't have a guaranteed
non-null string parameter.

In all identified cases the issue is fixed using StringOrNullMarker() helper
method to guarantee it doesn't happen.
sharadb-amazon pushed a commit to sharadb-amazon/connectedhomeip that referenced this pull request Mar 9, 2023
This PR attempts to identify all cases where %s specifiers in the logging APIs
(ChipLogError(), ChipLogProgress(), ChipLogDetail()) don't have a guaranteed
non-null string parameter.

In all identified cases the issue is fixed using StringOrNullMarker() helper
method to guarantee it doesn't happen.
sharadb-amazon pushed a commit to sharadb-amazon/connectedhomeip that referenced this pull request Mar 17, 2023
This PR attempts to identify all cases where %s specifiers in the logging APIs
(ChipLogError(), ChipLogProgress(), ChipLogDetail()) don't have a guaranteed
non-null string parameter.

In all identified cases the issue is fixed using StringOrNullMarker() helper
method to guarantee it doesn't happen.
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.

[1.0] Logging APIs Could Try to Log Nullptr While Logging Strings
3 participants