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 write attribute for ARM64 Apple Platform devices #25524

Merged

Conversation

tehampson
Copy link
Contributor

Problem: On M1 Macbooks, calling WriteAttributes or WriteGroupAttributes results in a segfault. The issue was because we did not specify the argtyes attribute for the regular, non-variadic, function arguments. Additionally it was found that we had issue passing in uint16_t non-variadic types, to overcome this we simply pass the values as size_t and cast it to the expected uint16_t type.

@github-actions
Copy link

github-actions bot commented Mar 7, 2023

PR #25524: Size comparison from fec6560 to 9c8776f

Increases (7 builds for bl702, efr32, esp32, psoc6, telink)
platform target config section fec6560 9c8776f change % change
bl702 lighting-app bl702+rpc .debug_info 45028072 45028073 1 0.0
.text 1032198 1032200 2 0.0
efr32 lock-app BRD4161A+wf200 (read/write) 1056708 1056724 16 0.0
.text 904048 904064 16 0.0
esp32 all-clusters-app c3devkit (read only) 1050994 1050996 2 0.0
.flash.text 1050994 1050996 2 0.0
psoc6 lock cy8ckit_062s2_43012 .debug_info 23121994 2312199 1 0.0
telink all-clusters-minimal-app tlsr9518adk80d (read/write) 955972 955980 8 0.0
text 651468 651470 2 0.0
contact-sensor-app tlsr9518adk80d text 581928 581930 2 0.0
window-covering tlsr9518adk80d (read/write) 942612 942620 8 0.0
text 648724 648726 2 0.0
Decreases (8 builds for bl602, cyw30739, efr32, nrfconnect, telink)
platform target config section fec6560 9c8776f change % change
bl602 lighting-app bl602 .text 1027910 1027908 -2 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 586810 586802 -8 -0.0
.app_xip_area 463692 463684 -8 -0.0
efr32 lighting-app BRD4187C (read/write) 1013828 1013820 -8 -0.0
.text 838360 838352 -8 -0.0
nrfconnect all-clusters-app nrf7002dk_nrf5340_cpuapp (read/write) 1373056 1373040 -16 -0.0
text 767920 767916 -4 -0.0
telink lighting-app-rpc tlsr9518adk80d (read/write) 1023064 1023056 -8 -0.0
text 705686 705684 -2 -0.0
lock-app tlsr9518adk80d text 609700 609698 -2 -0.0
ota-requestor-app tlsr9518adk80d text 606654 606652 -2 -0.0
temperature-measurement-app tlsr9518adk80d (read/write) 848772 848764 -8 -0.0
text 573474 573472 -2 -0.0
Full report (49 builds for bl602, bl702, cc13x2_26x2, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section fec6560 9c8776f change % change
bl602 lighting-app bl602 (read/write) 1351854 1351854 0 0.0
.bss 94690 94690 0 0.0
.data 9744 9744 0 0.0
.text 1027910 1027908 -2 -0.0
bl602+rpc (read/write) 1397302 1397302 0 0.0
.bss 102738 102738 0 0.0
.data 10136 10136 0 0.0
.text 1058842 1058842 0 0.0
bl702 lighting-app bl702 (read only) 3358 3358 0 0.0
(read/write) 1190459 1190459 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 69793 69793 0 0.0
.bss_psram 30064 30064 0 0.0
.comment 48 48 0 0.0
.data 4072 4072 0 0.0
.debug_abbrev 1552063 1552063 0 0.0
.debug_aranges 134312 134312 0 0.0
.debug_frame 492516 492516 0 0.0
.debug_info 40616000 40616000 0 0.0
.debug_line 5283137 5283137 0 0.0
.debug_loc 3420402 3420402 0 0.0
.debug_ranges 372976 372976 0 0.0
.debug_str 3581498 3581498 0 0.0
.hbn 536 536 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 107904 107904 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 575121 575121 0 0.0
.symtab 173776 173776 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
957532 957532 0 0.0
bl702+rpc (read only) 3358 3358 0 0.0
(read/write) 1280343 1280343 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 77841 77841 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4616 4616 0 0.0
.debug_abbrev 1700366 1700366 0 0.0
.debug_aranges 142552 142552 0 0.0
.debug_frame 520204 520204 0 0.0
.debug_info 45028072 45028073 1 0.0
.debug_line 5681899 5681899 0 0.0
.debug_loc 3617055 3617055 0 0.0
.debug_ranges 396752 396752 0 0.0
.debug_str 3985035 3985035 0 0.0
.hbn 536 536 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 122016 122016 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 636010 636010 0 0.0
.symtab 192096 192096 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
1032198 1032200 2 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 680935 680935 0 0.0
(read/write) 170136 170136 0 0.0
.bss 80764 80764 0 0.0
.data 3352 3352 0 0.0
.rodata 88527 88527 0 0.0
.text 592092 592092 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 644063 644063 0 0.0
(read/write) 157432 157432 0 0.0
.bss 79964 79964 0 0.0
.data 3352 3352 0 0.0
.rodata 78399 78399 0 0.0
.text 565344 565344 0 0.0
lock-ftd LP_CC2652R7 (read only) 677343 677343 0 0.0
(read/write) 171104 171104 0 0.0
.bss 78228 78228 0 0.0
.data 3316 3316 0 0.0
.rodata 76711 76711 0 0.0
.text 600152 600152 0 0.0
lock-mtd LP_CC2652R7 (read only) 663931 663931 0 0.0
(read/write) 179764 179764 0 0.0
.bss 73476 73476 0 0.0
.data 3316 3316 0 0.0
.rodata 103523 103523 0 0.0
.text 559928 559928 0 0.0
pump-app LP_CC2652R7 (read only) 690531 690531 0 0.0
(read/write) 158660 158660 0 0.0
.bss 78204 78204 0 0.0
.data 3280 3280 0 0.0
.rodata 91083 91083 0 0.0
.text 598968 598968 0 0.0
pump-controller-app LP_CC2652R7 (read only) 675483 675483 0 0.0
(read/write) 173844 173844 0 0.0
.bss 78340 78340 0 0.0
.data 3304 3304 0 0.0
.rodata 86971 86971 0 0.0
.text 588032 588032 0 0.0
shell LP_CC2652R7 (read only) 672382 672382 0 0.0
(read/write) 180760 180760 0 0.0
.bss 82836 82836 0 0.0
.data 3348 3348 0 0.0
.rodata 85430 85430 0 0.0
.text 586640 586640 0 0.0
cc32xx lock CC3235SF_LAUNCHXL (read only) 644425 644425 0 0.0
(read/write) 203688 203688 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197088 197088 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930235 930235 0 0.0
.debug_aranges 87336 87336 0 0.0
.debug_frame 300028 300028 0 0.0
.debug_info 2026706 2026706 0 0.0
.debug_line 2659698 2659698 0 0.0
.debug_loc 2802749 2802749 0 0.0
.debug_ranges 282952 282952 0 0.0
.debug_str 3023892 3023892 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105929 105929 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 378514 378514 0 0.0
.symtab 256624 256624 0 0.0
.text 0 0 0 0.0
536372 536372 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 586810 586802 -8 -0.0
.app_xip_area 463692 463684 -8 -0.0
.bss 65560 65560 0 0.0
.data 740 740 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 590778 590778 0 0.0
.app_xip_area 462364 462364 0 0.0
.bss 70848 70848 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) 551822 551822 0 0.0
.app_xip_area 434208 434208 0 0.0
.bss 60096 60096 0 0.0
.data 696 696 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs9116 (read/write) 1030964 1030964 0 0.0
.bss 179284 179284 0 0.0
.data 2060 2060 0 0.0
.text 849600 849600 0 0.0
BRD4187C (read/write) 1013828 1013820 -8 -0.0
.bss 148176 148176 0 0.0
.data 2696 2696 0 0.0
.text 838360 838352 -8 -0.0
lock-app BRD4161A+wf200 (read/write) 1056708 1056724 16 0.0
.bss 150572 150572 0 0.0
.data 2068 2068 0 0.0
.text 904048 904064 16 0.0
window-app BRD4187C (read/write) 1130372 1130372 0 0.0
.bss 132608 132608 0 0.0
.data 2588 2588 0 0.0
.text 970580 970580 0 0.0
esp32 all-clusters-app c3devkit (read only) 1050994 1050996 2 0.0
(read/write) 1585690 1585690 0 0.0
.dram0.bss 77824 77824 0 0.0
.dram0.data 13752 13752 0 0.0
.flash.rodata 222352 222352 0 0.0
.flash.text 1050994 1050996 2 0.0
.iram0.text 72896 72896 0 0.0
m5stack (read only) 1102755 1102755 0 0.0
(read/write) 501755 501755 0 0.0
.dram0.bss 82864 82864 0 0.0
.dram0.data 34040 34040 0 0.0
.flash.rodata 251080 251080 0 0.0
.flash.text 1097371 1097371 0 0.0
.iram0.text 124855 124855 0 0.0
k32w contact k32w0+release (read/write) 671228 671228 0 0.0
.bss 65276 65276 0 0.0
.data 2204 2204 0 0.0
.text 572348 572348 0 0.0
light k32w0+release (read/write) 670280 670280 0 0.0
.bss 64948 64948 0 0.0
.data 2192 2192 0 0.0
.text 571740 571740 0 0.0
lock k32w0+release (read/write) 626724 626724 0 0.0
.bss 63084 63084 0 0.0
.data 2136 2136 0 0.0
.text 546488 546488 0 0.0
linux chip-tool-ipv6only arm64 (read only) 12156404 12156404 0 0.0
(read/write) 733448 733448 0 0.0
.bss 34296 34296 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 675552 675552 0 0.0
.dynamic 560 560 0 0.0
.got 15376 15376 0 0.0
.init 24 24 0 0.0
.init_array 216 216 0 0.0
.rodata 588308 588308 0 0.0
.text 9827476 9827476 0 0.0
thermostat-no-ble arm64 (read only) 2520900 2520900 0 0.0
(read/write) 145224 145224 0 0.0
.bss 56344 56344 0 0.0
.data 1784 1784 0 0.0
.data.rel.ro 77688 77688 0 0.0
.dynamic 560 560 0 0.0
.got 5360 5360 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 150800 150800 0 0.0
.text 2107712 2107712 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2467600 2467600 0 0.0
.bss 215804 215804 0 0.0
.data 5880 5880 0 0.0
.text 1430244 1430244 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1168052 1168052 0 0.0
bss 143423 143423 0 0.0
rodata 136352 136352 0 0.0
text 808436 808436 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1373056 1373040 -16 -0.0
bss 105902 105902 0 0.0
rodata 213740 213740 0 0.0
text 767920 767916 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1113072 1113072 0 0.0
bss 142579 142579 0 0.0
rodata 113196 113196 0 0.0
text 777580 777580 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 0 0 0 0.0
(read only) 841000 841000 0 0.0
(read/write) 1762844 1762844 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189704 189704 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2640 2640 0 0.0
.debug_abbrev 1253593 1253593 0 0.0
.debug_aranges 111456 111456 0 0.0
.debug_frame 374632 374632 0 0.0
.debug_info 27984098 27984098 0 0.0
.debug_line 3794608 3794608 0 0.0
.debug_loc 3698465 3698465 0 0.0
.debug_ranges 364848 364848 0 0.0
.debug_str 3533116 3533116 0 0.0
.heap 841000 841000 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 581588 581588 0 0.0
.symtab 426032 426032 0 0.0
.text 1562112 1562112 0 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 0 0 0 0.0
(read only) 841808 841808 0 0.0
(read/write) 1703028 1703028 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188904 188904 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2632 2632 0 0.0
.debug_abbrev 1238926 1238926 0 0.0
.debug_aranges 110688 110688 0 0.0
.debug_frame 376968 376968 0 0.0
.debug_info 27528563 27528563 0 0.0
.debug_line 3802107 3802107 0 0.0
.debug_loc 3681667 3681667 0 0.0
.debug_ranges 362784 362784 0 0.0
.debug_str 3520238 3520238 0 0.0
.heap 841808 841808 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 541297 541297 0 0.0
.symtab 410944 410944 0 0.0
.text 1503104 1503104 0 0.0
.zero.table 8 8 0 0.0
light cy8ckit_062s2_43012 0 0 0 0.0
(read only) 850072 850072 0 0.0
(read/write) 1616804 1616804 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180808 180808 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2464 2464 0 0.0
.debug_abbrev 1074281 1074281 0 0.0
.debug_aranges 102896 102896 0 0.0
.debug_frame 347252 347252 0 0.0
.debug_info 22870337 22870337 0 0.0
.debug_line 3354986 3354986 0 0.0
.debug_loc 3357137 3357137 0 0.0
.debug_ranges 321304 321304 0 0.0
.debug_str 3319009 3319009 0 0.0
.heap 850072 850072 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 477014 477014 0 0.0
.symtab 378928 378928 0 0.0
.text 1425144 1425144 0 0.0
.zero.table 8 8 0 0.0
lock cy8ckit_062s2_43012 0 0 0 0.0
(read only) 845096 845096 0 0.0
(read/write) 1650620 1650620 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 185768 185768 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2480 2480 0 0.0
.debug_abbrev 1076225 1076225 0 0.0
.debug_aranges 103296 103296 0 0.0
.debug_frame 349016 349016 0 0.0
.debug_info 23121994 2312199 1 0.0
.debug_line 3357131 3357131 0 0.0
.debug_loc 3381645 3381645 0 0.0
.debug_ranges 323856 323856 0 0.0
.debug_str 3337811 3337811 0 0.0
.heap 845096 845096 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 480738 480738 0 0.0
.symtab 381104 381104 0 0.0
.text 1453984 1453984 0 0.0
.zero.table 8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1152020 1152020 0 0.0
.bss 99812 99812 0 0.0
.data 852 852 0 0.0
.text 599116 599116 0 0.0
lock-app qpg6105+debug (read/write) 1119084 1119084 0 0.0
.bss 96292 96292 0 0.0
.data 864 864 0 0.0
.text 566184 566184 0 0.0
telink all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1021012 1021012 0 0.0
bss 97908 97908 0 0.0
text 690398 690398 0 0.0
all-clusters-minimal-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 955972 955980 8 0.0
bss 96960 96960 0 0.0
text 651468 651470 2 0.0
contact-sensor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 860260 860260 0 0.0
bss 89124 89124 0 0.0
text 581928 581930 2 0.0
light-switch-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 876132 876132 0 0.0
bss 89212 89212 0 0.0
text 596080 596080 0 0.0
lighting-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 954892 954892 0 0.0
bss 97340 97340 0 0.0
text 662584 662584 0 0.0
lighting-app-rpc tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1023064 1023056 -8 -0.0
bss 98904 98904 0 0.0
text 705686 705684 -2 -0.0
lock-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 914288 914288 0 0.0
bss 89776 89776 0 0.0
text 609700 609698 -2 -0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 889060 889060 0 0.0
bss 90136 90136 0 0.0
text 606654 606652 -2 -0.0
pump-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 865732 865732 0 0.0
bss 89240 89240 0 0.0
text 587712 587712 0 0.0
pump-controller-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 852992 852992 0 0.0
bss 89040 89040 0 0.0
text 578036 578036 0 0.0
temperature-measurement-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 848772 848764 -8 -0.0
bss 88900 88900 0 0.0
text 573474 573472 -2 -0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 880276 880276 0 0.0
bss 90604 90604 0 0.0
text 597606 597606 0 0.0
window-covering tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 942612 942620 8 0.0
bss 99012 99012 0 0.0
text 648724 648726 2 0.0

@pullapprove pullapprove bot requested a review from joonhaengHeo March 7, 2023 21:48
@tehampson tehampson merged commit 3889a44 into project-chip:master Mar 7, 2023
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants