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

Map CHIP_ERROR_FABRIC_EXISTS into a dedicated Darwin error code. #22271

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

This allows detection of this case without having to examine the
"underlyingError" of the NSError's userInfo.

Fixes #22214

Problem

See #22214

Change overview

Add a new Objective C error code constant for the "fabric exists" case.

This allows detection of this case without having to examine the
"underlyingError" of the NSError's userInfo.

Fixes project-chip#22214
@github-actions
Copy link

github-actions bot commented Aug 30, 2022

PR #22271: Size comparison from 3be848d to a8cc022

Increases (2 builds for esp32, psoc6)
platform target config section 3be848d a8cc022 change % change
esp32 all-clusters-app m5stack (read/write) 490772 490780 8 0.0
.flash.rodata 247344 247352 8 0.0
psoc6 all-clusters-minimal cy8ckit_062s2_43012 .debug_info 26438272 26438273 1 0.0
Decreases (3 builds for psoc6, telink)
platform target config section 3be848d a8cc022 change % change
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 26701650 26701649 -1 -0.0
telink light-switch-app tlsr9518adk80d text 571264 571262 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 830564 830556 -8 -0.0
text 589376 589372 -4 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, telink)
platform target config section 3be848d a8cc022 change % change
bl602 lighting-app bl602 (read/write) 1385118 1385118 0 0.0
.bss 120274 120274 0 0.0
.data 4488 4488 0 0.0
.text 1051520 1051520 0 0.0
bl602+rpc (read/write) 1431006 1431006 0 0.0
.bss 127706 127706 0 0.0
.data 4600 4600 0 0.0
.text 1083532 1083532 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 673051 673051 0 0.0
(read/write) 178340 178340 0 0.0
.bss 74284 74284 0 0.0
.data 3372 3372 0 0.0
.rodata 88835 88835 0 0.0
.text 583900 583900 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 637747 637747 0 0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77979 77979 0 0.0
.text 559444 559444 0 0.0
lock-ftd LP_CC2652R7 (read only) 674087 674087 0 0.0
(read/write) 167616 167616 0 0.0
.bss 71484 71484 0 0.0
.data 3296 3296 0 0.0
.rodata 76671 76671 0 0.0
.text 596936 596936 0 0.0
lock-mtd LP_CC2652R7 (read only) 657027 657027 0 0.0
(read/write) 180364 180364 0 0.0
.bss 67172 67172 0 0.0
.data 3296 3296 0 0.0
.rodata 101883 101883 0 0.0
.text 554664 554664 0 0.0
pump-app LP_CC2652R7 (read only) 684811 684811 0 0.0
(read/write) 157596 157596 0 0.0
.bss 71420 71420 0 0.0
.data 3296 3296 0 0.0
.rodata 89947 89947 0 0.0
.text 594380 594380 0 0.0
pump-controller-app LP_CC2652R7 (read only) 669311 669311 0 0.0
(read/write) 173208 173208 0 0.0
.bss 71532 71532 0 0.0
.data 3292 3292 0 0.0
.rodata 85503 85503 0 0.0
.text 583328 583328 0 0.0
shell LP_CC2652R7 (read only) 665758 665758 0 0.0
(read/write) 181152 181152 0 0.0
.bss 76604 76604 0 0.0
.data 3376 3376 0 0.0
.rodata 85782 85782 0 0.0
.text 579660 579660 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 586754 586754 0 0.0
.app_xip_area 463412 463412 0 0.0
.bss 65776 65776 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592506 592506 0 0.0
.app_xip_area 464380 464380 0 0.0
.bss 70560 70560 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 599498 599498 0 0.0
.app_xip_area 476876 476876 0 0.0
.bss 65088 65088 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1107616 1107616 0 0.0
.bss 136332 136332 0 0.0
.data 2072 2072 0 0.0
.text 969192 969192 0 0.0
BRD4161A+rpc (read/write) 971636 971636 0 0.0
.bss 150844 150844 0 0.0
.data 2252 2252 0 0.0
.text 818520 818520 0 0.0
BRD4161A+rs911x (read/write) 1001352 1001352 0 0.0
.bss 169088 169088 0 0.0
.data 2064 2064 0 0.0
.text 830180 830180 0 0.0
lock-app BRD4161A+wf200 (read/write) 1149796 1149796 0 0.0
.bss 152168 152168 0 0.0
.data 2072 2072 0 0.0
.text 995536 995536 0 0.0
window-app BRD4161A (read/write) 1098872 1098872 0 0.0
.bss 137772 137772 0 0.0
.data 2096 2096 0 0.0
.text 958984 958984 0 0.0
esp32 all-clusters-app c3devkit (read only) 1033554 1033554 0 0.0
(read/write) 1493486 1493486 0 0.0
.dram0.bss 71088 71088 0 0.0
.dram0.data 13696 13696 0 0.0
.flash.rodata 218032 218032 0 0.0
.flash.text 1033554 1033554 0 0.0
.iram0.text 65160 65160 0 0.0
m5stack (read only) 1085891 1085891 0 0.0
(read/write) 490772 490780 8 0.0
.dram0.bss 76608 76608 0 0.0
.dram0.data 34152 34152 0 0.0
.flash.rodata 247344 247352 8 0.0
.flash.text 1080507 1080507 0 0.0
.iram0.text 123939 123939 0 0.0
k32w light k32w0+release (read/write) 647356 647356 0 0.0
.bss 70424 70424 0 0.0
.data 2068 2068 0 0.0
.text 572136 572136 0 0.0
lock k32w0+release (read/write) 704352 704352 0 0.0
.bss 70864 70864 0 0.0
.data 2076 2076 0 0.0
.text 628684 628684 0 0.0
linux all-clusters-app debug (read only) 3043833 3043833 0 0.0
(read/write) 156032 156032 0 0.0
.bss 61792 61792 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 85768 85768 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1176 1176 0 0.0
.rodata 275307 275307 0 0.0
.text 2589090 2589090 0 0.0
all-clusters-minimal-app debug (read only) 2879633 2879633 0 0.0
(read/write) 147632 147632 0 0.0
.bss 61024 61024 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 78264 78264 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1160 1160 0 0.0
.rodata 275467 275467 0 0.0
.text 2427506 2427506 0 0.0
bridge-app debug+rpc (read only) 2377897 2377897 0 0.0
(read/write) 127752 127752 0 0.0
.bss 50656 50656 0 0.0
.data 3600 3600 0 0.0
.data.rel.ro 67640 67640 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 204168 204168 0 0.0
.text 2010818 2010818 0 0.0
chip-tool debug (read only) 10909393 10909393 0 0.0
(read/write) 657384 657384 0 0.0
.bss 25240 25240 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 622352 622352 0 0.0
.dynamic 608 608 0 0.0
.got 5096 5096 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 564213 564213 0 0.0
.text 8824340 8824340 0 0.0
chip-tool-ipv6only arm64 (read only) 10290068 10290068 0 0.0
(read/write) 705233 705233 0 0.0
.bss 33297 33297 0 0.0
.data 3280 3280 0 0.0
.data.rel.ro 649832 649832 0 0.0
.dynamic 560 560 0 0.0
.got 13848 13848 0 0.0
.init 24 24 0 0.0
.init_array 200 200 0 0.0
.rodata 494660 494660 0 0.0
.text 8142948 8142948 0 0.0
lighting-app debug+rpc (read only) 2602825 2602825 0 0.0
(read/write) 130536 130536 0 0.0
.bss 49792 49792 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72680 72680 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 221008 221008 0 0.0
.text 2210626 2210626 0 0.0
lock-app debug (read only) 2585793 2585793 0 0.0
(read/write) 125712 125712 0 0.0
.bss 48288 48288 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69688 69688 0 0.0
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 238000 238000 0 0.0
.text 2180850 2180850 0 0.0
ota-provider-app debug (read only) 2363049 2363049 0 0.0
(read/write) 119144 119144 0 0.0
.bss 47808 47808 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63512 63512 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 209976 209976 0 0.0
.text 1989314 1989314 0 0.0
ota-requestor-app debug (read only) 2528377 2528377 0 0.0
(read/write) 127552 127552 0 0.0
.bss 50368 50368 0 0.0
.data 2304 2304 0 0.0
.data.rel.ro 68920 68920 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 856 856 0 0.0
.rodata 216704 216704 0 0.0
.text 2138770 2138770 0 0.0
shell debug (read only) 2612137 2612137 0 0.0
(read/write) 142184 142184 0 0.0
.bss 57704 57704 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 77376 77376 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 1048 1048 0 0.0
.rodata 235410 235410 0 0.0
.text 2218018 2218018 0 0.0
thermostat-no-ble arm64 (read only) 2361844 2361844 0 0.0
(read/write) 141857 141857 0 0.0
.bss 55233 55233 0 0.0
.data 1680 1680 0 0.0
.data.rel.ro 76112 76112 0 0.0
.dynamic 560 560 0 0.0
.got 5056 5056 0 0.0
.init 24 24 0 0.0
.init_array 416 416 0 0.0
.rodata 141276 141276 0 0.0
.text 1982528 1982528 0 0.0
tv-app debug (read only) 3188841 3188841 0 0.0
(read/write) 258040 258040 0 0.0
.bss 167352 167352 0 0.0
.data 4752 4752 0 0.0
.data.rel.ro 79368 79368 0 0.0
.dynamic 608 608 0 0.0
.got 4856 4856 0 0.0
.init 27 27 0 0.0
.init_array 1080 1080 0 0.0
.rodata 259784 259784 0 0.0
.text 2739026 2739026 0 0.0
tv-casting-app debug (read only) 5509393 5509393 0 0.0
(read/write) 160536 160536 0 0.0
.bss 51352 51352 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 100304 100304 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 1048 1048 0 0.0
.rodata 344945 344945 0 0.0
.text 4892546 4892546 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2454936 2454936 0 0.0
.bss 215044 215044 0 0.0
.data 5872 5872 0 0.0
.text 1417580 1417580 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1180755 1180755 0 0.0
bss 143641 143641 0 0.0
rodata 143380 143380 0 0.0
text 814792 814792 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1159935 1159935 0 0.0
bss 142868 142868 0 0.0
rodata 134968 134968 0 0.0
text 803184 803184 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 842216 842216 0 0.0
(read/write) 1741812 1741812 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188464 188464 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 1221363 1221363 0 0.0
.debug_aranges 111704 111704 0 0.0
.debug_frame 372868 372868 0 0.0
.debug_info 26701650 26701649 -1 -0.0
.debug_line 3655208 3655208 0 0.0
.debug_loc 3568779 3568779 0 0.0
.debug_ranges 337568 337568 0 0.0
.debug_str 3426748 3426748 0 0.0
.heap 842216 842216 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 570503 570503 0 0.0
.symtab 421456 421456 0 0.0
.text 1542296 1542296 0 0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842952 842952 0 0.0
(read/write) 1684980 1684980 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187728 187728 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 1213202 1213202 0 0.0
.debug_aranges 111176 111176 0 0.0
.debug_frame 375948 375948 0 0.0
.debug_info 26438272 26438273 1 0.0
.debug_line 3675724 3675724 0 0.0
.debug_loc 3556416 3556416 0 0.0
.debug_ranges 336184 336184 0 0.0
.debug_str 3415753 3415753 0 0.0
.heap 842952 842952 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 534977 534977 0 0.0
.symtab 408048 408048 0 0.0
.text 1486200 1486200 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 851184 851184 0 0.0
(read/write) 1602284 1602284 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 179704 179704 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 1048021 1048021 0 0.0
.debug_aranges 103352 103352 0 0.0
.debug_frame 346216 346216 0 0.0
.debug_info 21900555 21900555 0 0.0
.debug_line 3246189 3246189 0 0.0
.debug_loc 3254757 3254757 0 0.0
.debug_ranges 301656 301656 0 0.0
.debug_str 3220973 3220973 0 0.0
.heap 851184 851184 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 468276 468276 0 0.0
.symtab 375136 375136 0 0.0
.text 1411736 1411736 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 846152 846152 0 0.0
(read/write) 1639956 1639956 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184720 184720 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 1055456 1055456 0 0.0
.debug_aranges 104024 104024 0 0.0
.debug_frame 349044 349044 0 0.0
.debug_info 22280302 22280302 0 0.0
.debug_line 3255010 3255010 0 0.0
.debug_loc 3294625 3294625 0 0.0
.debug_ranges 305000 305000 0 0.0
.debug_str 3248394 3248394 0 0.0
.heap 846152 846152 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 474491 474491 0 0.0
.symtab 378320 378320 0 0.0
.text 1444376 1444376 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 808664 808664 0 0.0
bss 71344 71344 0 0.0
noinit 43488 43488 0 0.0
text 571264 571262 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 830564 830556 -8 -0.0
bss 72200 72200 0 0.0
noinit 43488 43488 0 0.0
text 589376 589372 -4 -0.0

@andy31415
Copy link
Contributor

Accepted into master: platform specific change

@andy31415 andy31415 merged commit 3cb6025 into project-chip:master Aug 31, 2022
@bzbarsky-apple bzbarsky-apple deleted the add-error-code-for-fabric-exists branch August 31, 2022 21:25
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
…ject-chip#22271)

This allows detection of this case without having to examine the
"underlyingError" of the NSError's userInfo.

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

Return valid code MTRError when commissioning is attempted with duplicate NOC
2 participants