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 the ReadClient destructor to call OnDeallocatePaths. #21660

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

This is actually somewhat dangerous, because there is a good chance ~ReadClient
is running from under the destructor of the ReadClient::Callback and we are
invoking a virtual method on the callback. But this is the only way to ensure
we don't leak. ReadClient::Callback implementations need to be able to handle
this.

Fixes #21658

Problem

We never call OnDeallocatePaths if a ReadClient with auto-resubscribe is destroyed.

Change overview

Call it.

Testing

LSAN_OPTIONS="detect_leaks=1" chip-tool interactive start

and at the interactive prompt run:

basic subscribe data-model-revision 1 100 17 0 --auto-resubscribe true

quit()

Without this PR it shows path leaks.

@github-actions
Copy link

github-actions bot commented Aug 5, 2022

PR #21660: Size comparison from daf5030 to d8ef26c

Increases (18 builds for bl602, cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section daf5030 d8ef26c change % change
bl602 lighting-app bl602 (read/write) 1380298 1380354 56 0.0
.text 1048400 1048460 60 0.0
bl602+rpc (read/write) 1425546 1425610 64 0.0
.text 1079900 1079964 64 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584842 584882 40 0.0
.app_xip_area 461644 461684 40 0.0
lock cyw930739m2evb_01 (read/write) 590770 590818 48 0.0
.app_xip_area 462788 462836 48 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 589882 589930 48 0.0
.app_xip_area 467500 467548 48 0.0
k32w light k32w0+release (read/write) 644460 644508 48 0.0
.text 569976 570024 48 0.0
lock k32w0+release (read/write) 701796 701844 48 0.0
.text 626832 626880 48 0.0
linux chip-tool-ipv6only arm64 (read only) 9856140 9856348 208 0.0
.text 7764452 7764660 208 0.0
thermostat-no-ble arm64 (read only) 2349068 2349196 128 0.0
.text 1972064 1972192 128 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2453688 2453752 64 0.0
.text 1416332 1416396 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177519 1177583 64 0.0
text 812744 812804 60 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157575 1157639 64 0.0
text 801896 801956 60 0.0
p6 all-clusters-app default (read/write) 1690580 1690644 64 0.0
.text 1530376 1530440 64 0.0
all-clusters-minimal-app default (read/write) 1634772 1634836 64 0.0
.text 1475288 1475352 64 0.0
light-app default (read/write) 1555060 1555124 64 0.0
.text 1403896 1403960 64 0.0
lock-app default (read/write) 1592348 1592412 64 0.0
.text 1436688 1436752 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805828 805900 72 0.0
text 569630 569704 74 0.0
lighting-app tlsr9518adk80d (read/write) 827500 827572 72 0.0
text 587470 587542 72 0.0
Full report (18 builds for bl602, cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section daf5030 d8ef26c change % change
bl602 lighting-app bl602 (read/write) 1380298 1380354 56 0.0
.bss 119746 119746 0 0.0
.data 4480 4480 0 0.0
.text 1048400 1048460 60 0.0
bl602+rpc (read/write) 1425546 1425610 64 0.0
.bss 127186 127186 0 0.0
.data 4600 4600 0 0.0
.text 1079900 1079964 64 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584842 584882 40 0.0
.app_xip_area 461644 461684 40 0.0
.bss 65640 65640 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) 590770 590818 48 0.0
.app_xip_area 462788 462836 48 0.0
.bss 70424 70424 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) 589882 589930 48 0.0
.app_xip_area 467500 467548 48 0.0
.bss 64880 64880 0 0.0
.data 688 688 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
k32w light k32w0+release (read/write) 644460 644508 48 0.0
.bss 69712 69712 0 0.0
.data 2044 2044 0 0.0
.text 569976 570024 48 0.0
lock k32w0+release (read/write) 701796 701844 48 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626832 626880 48 0.0
linux chip-tool-ipv6only arm64 (read only) 9856140 9856348 208 0.0
(read/write) 694097 694097 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 639336 639336 0 0.0
.dynamic 560 560 0 0.0
.got 13624 13624 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 464460 464460 0 0.0
.text 7764452 7764660 208 0.0
thermostat-no-ble arm64 (read only) 2349068 2349196 128 0.0
(read/write) 141617 141617 0 0.0
.bss 55313 55313 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75832 75832 0 0.0
.dynamic 560 560 0 0.0
.got 5024 5024 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139572 139572 0 0.0
.text 1972064 1972192 128 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453688 2453752 64 0.0
.bss 214556 214556 0 0.0
.data 5872 5872 0 0.0
.text 1416332 1416396 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177519 1177583 64 0.0
bss 143222 143222 0 0.0
rodata 142704 142704 0 0.0
text 812744 812804 60 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157575 1157639 64 0.0
bss 142460 142460 0 0.0
rodata 134400 134400 0 0.0
text 801896 801956 60 0.0
p6 all-clusters-app default (read only) 881528 881528 0 0.0
(read/write) 1690580 1690644 64 0.0
.bss 149168 149168 0 0.0
.data 2648 2648 0 0.0
.text 1530376 1530440 64 0.0
all-clusters-minimal-app default (read only) 882248 882248 0 0.0
(read/write) 1634772 1634836 64 0.0
.bss 148448 148448 0 0.0
.data 2648 2648 0 0.0
.text 1475288 1475352 64 0.0
light-app default (read only) 890568 890568 0 0.0
(read/write) 1555060 1555124 64 0.0
.bss 140336 140336 0 0.0
.data 2440 2440 0 0.0
.text 1403896 1403960 64 0.0
lock-app default (read only) 886072 886072 0 0.0
(read/write) 1592348 1592412 64 0.0
.bss 144816 144816 0 0.0
.data 2456 2456 0 0.0
.text 1436688 1436752 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805828 805900 72 0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569630 569704 74 0.0
lighting-app tlsr9518adk80d (read/write) 827500 827572 72 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 587470 587542 72 0.0

@bzbarsky-apple bzbarsky-apple force-pushed the fix-read-client-cleanup branch from d8ef26c to 0e3aed1 Compare August 5, 2022 05:36
@github-actions github-actions bot added the tests label Aug 5, 2022
@github-actions
Copy link

github-actions bot commented Aug 5, 2022

PR #21660: Size comparison from daf5030 to 0e3aed1

Increases (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section daf5030 0e3aed1 change % change
bl602 lighting-app bl602 (read/write) 1380298 1380362 64 0.0
.text 1048400 1048464 64 0.0
bl602+rpc (read/write) 1425546 1425618 72 0.0
.text 1079900 1079968 68 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 670647 670695 48 0.0
.text 581852 581900 48 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 636159 636207 48 0.0
.text 558108 558156 48 0.0
lock-ftd LP_CC2652R7 (read only) 673123 673171 48 0.0
.text 596096 596144 48 0.0
lock-mtd LP_CC2652R7 (read only) 655595 655651 56 0.0
.text 553680 553736 56 0.0
pump-app LP_CC2652R7 (read only) 682639 682695 56 0.0
.text 592908 592964 56 0.0
pump-controller-app LP_CC2652R7 (read only) 667103 667159 56 0.0
.text 581832 581888 56 0.0
shell LP_CC2652R7 (read only) 663314 663362 48 0.0
.text 577572 577620 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584842 584882 40 0.0
.app_xip_area 461644 461684 40 0.0
lock cyw930739m2evb_01 (read/write) 590770 590818 48 0.0
.app_xip_area 462788 462836 48 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 589882 589930 48 0.0
.app_xip_area 467500 467548 48 0.0
efr32 lighting-app BRD4161A (read/write) 1096572 1096620 48 0.0
.text 961636 961684 48 0.0
BRD4161A+rpc (read/write) 1150868 1150916 48 0.0
.text 999036 999084 48 0.0
BRD4161A+rs911x (read/write) 985860 985908 48 0.0
.text 821600 821648 48 0.0
lock-app BRD4161A+wf200 (read/write) 1136456 1136504 48 0.0
.text 989548 989596 48 0.0
window-app BRD4161A (read/write) 1088312 1088360 48 0.0
.text 951904 951952 48 0.0
esp32 all-clusters-app c3devkit (read only) 1025656 1025726 70 0.0
.flash.text 1025656 1025726 70 0.0
m5stack (read only) 1079027 1079067 40 0.0
.flash.text 1073643 1073683 40 0.0
k32w light k32w0+release (read/write) 644460 644508 48 0.0
.text 569976 570024 48 0.0
lock k32w0+release (read/write) 701796 701844 48 0.0
.text 626832 626880 48 0.0
linux all-clusters-app debug (read only) 3021713 3021889 176 0.0
.text 2570338 2570514 176 0.0
all-clusters-minimal-app debug (read only) 2863561 2863737 176 0.0
.text 2414754 2414930 176 0.0
bridge-app debug+rpc (read only) 2369433 2369609 176 0.0
.text 2003090 2003266 176 0.0
chip-tool debug (read only) 10440169 10440489 320 0.0
.text 8411412 8411732 320 0.0
chip-tool-ipv6only arm64 (read only) 9856140 9856348 208 0.0
.text 7764452 7764660 208 0.0
lighting-app debug+rpc (read only) 2592017 2592209 192 0.0
.text 2201858 2202050 192 0.0
lock-app debug (read only) 2576281 2576457 176 0.0
.text 2173186 2173362 176 0.0
ota-provider-app debug (read only) 2354881 2355057 176 0.0
.text 1981826 1982002 176 0.0
ota-requestor-app debug (read only) 2475425 2475601 176 0.0
.text 2090258 2090434 176 0.0
shell debug (read only) 2592553 2592729 176 0.0
.text 2201282 2201458 176 0.0
thermostat-no-ble arm64 (read only) 2349068 2349196 128 0.0
.text 1972064 1972192 128 0.0
tv-app debug (read only) 3164265 3164553 288 0.0
.text 2717474 2717762 288 0.0
tv-casting-app debug (read only) 5400985 5401321 336 0.0
.text 4792562 4792898 336 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2453688 2453752 64 0.0
.text 1416332 1416396 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177519 1177583 64 0.0
text 812744 812804 60 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157575 1157639 64 0.0
text 801896 801956 60 0.0
p6 all-clusters-app default (read/write) 1690580 1690644 64 0.0
.text 1530376 1530440 64 0.0
all-clusters-minimal-app default (read/write) 1634772 1634836 64 0.0
.text 1475288 1475352 64 0.0
light-app default (read/write) 1555060 1555124 64 0.0
.text 1403896 1403960 64 0.0
lock-app default (read/write) 1592348 1592412 64 0.0
.text 1436688 1436752 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805828 805900 72 0.0
text 569630 569704 74 0.0
lighting-app tlsr9518adk80d (read/write) 827500 827572 72 0.0
text 587470 587544 74 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section daf5030 0e3aed1 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 180736 180688 -48 -0.0
lock-ftd LP_CC2652R7 (read/write) 168444 168396 -48 -0.0
lock-mtd LP_CC2652R7 (read/write) 181660 181604 -56 -0.0
pump-app LP_CC2652R7 (read/write) 159736 159680 -56 -0.0
pump-controller-app LP_CC2652R7 (read/write) 175408 175352 -56 -0.0
shell LP_CC2652R7 (read/write) 183588 183540 -48 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section daf5030 0e3aed1 change % change
bl602 lighting-app bl602 (read/write) 1380298 1380362 64 0.0
.bss 119746 119746 0 0.0
.data 4480 4480 0 0.0
.text 1048400 1048464 64 0.0
bl602+rpc (read/write) 1425546 1425618 72 0.0
.bss 127186 127186 0 0.0
.data 4600 4600 0 0.0
.text 1079900 1079968 68 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 670647 670695 48 0.0
(read/write) 180736 180688 -48 -0.0
.bss 74276 74276 0 0.0
.data 3372 3372 0 0.0
.rodata 88479 88479 0 0.0
.text 581852 581900 48 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 636159 636207 48 0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77727 77727 0 0.0
.text 558108 558156 48 0.0
lock-ftd LP_CC2652R7 (read only) 673123 673171 48 0.0
(read/write) 168444 168396 -48 -0.0
.bss 71348 71348 0 0.0
.data 3296 3296 0 0.0
.rodata 76547 76547 0 0.0
.text 596096 596144 48 0.0
lock-mtd LP_CC2652R7 (read only) 655595 655651 56 0.0
(read/write) 181660 181604 -56 -0.0
.bss 67036 67036 0 0.0
.data 3296 3296 0 0.0
.rodata 101435 101435 0 0.0
.text 553680 553736 56 0.0
pump-app LP_CC2652R7 (read only) 682639 682695 56 0.0
(read/write) 159736 159680 -56 -0.0
.bss 71388 71388 0 0.0
.data 3296 3296 0 0.0
.rodata 89247 89247 0 0.0
.text 592908 592964 56 0.0
pump-controller-app LP_CC2652R7 (read only) 667103 667159 56 0.0
(read/write) 175408 175352 -56 -0.0
.bss 71524 71524 0 0.0
.data 3292 3292 0 0.0
.rodata 84791 84791 0 0.0
.text 581832 581888 56 0.0
shell LP_CC2652R7 (read only) 663314 663362 48 0.0
(read/write) 183588 183540 -48 -0.0
.bss 76596 76596 0 0.0
.data 3376 3376 0 0.0
.rodata 85426 85426 0 0.0
.text 577572 577620 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584842 584882 40 0.0
.app_xip_area 461644 461684 40 0.0
.bss 65640 65640 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) 590770 590818 48 0.0
.app_xip_area 462788 462836 48 0.0
.bss 70424 70424 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) 589882 589930 48 0.0
.app_xip_area 467500 467548 48 0.0
.bss 64880 64880 0 0.0
.data 688 688 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1096572 1096620 48 0.0
.bss 132844 132844 0 0.0
.data 2068 2068 0 0.0
.text 961636 961684 48 0.0
BRD4161A+rpc (read/write) 1150868 1150916 48 0.0
.bss 149532 149532 0 0.0
.data 2280 2280 0 0.0
.text 999036 999084 48 0.0
BRD4161A+rs911x (read/write) 985860 985908 48 0.0
.bss 162184 162184 0 0.0
.data 2056 2056 0 0.0
.text 821600 821648 48 0.0
lock-app BRD4161A+wf200 (read/write) 1136456 1136504 48 0.0
.bss 144824 144824 0 0.0
.data 2064 2064 0 0.0
.text 989548 989596 48 0.0
window-app BRD4161A (read/write) 1088312 1088360 48 0.0
.bss 134292 134292 0 0.0
.data 2096 2096 0 0.0
.text 951904 951952 48 0.0
esp32 all-clusters-app c3devkit (read only) 1025656 1025726 70 0.0
(read/write) 1487234 1487234 0 0.0
.dram0.bss 70336 70336 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216864 216864 0 0.0
.flash.text 1025656 1025726 70 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1079027 1079067 40 0.0
(read/write) 489240 489240 0 0.0
.dram0.bss 75840 75840 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 247260 247260 0 0.0
.flash.text 1073643 1073683 40 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 644460 644508 48 0.0
.bss 69712 69712 0 0.0
.data 2044 2044 0 0.0
.text 569976 570024 48 0.0
lock k32w0+release (read/write) 701796 701844 48 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626832 626880 48 0.0
linux all-clusters-app debug (read only) 3021713 3021889 176 0.0
(read/write) 155688 155688 0 0.0
.bss 61888 61888 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 85352 85352 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1152 1152 0 0.0
.rodata 272491 272491 0 0.0
.text 2570338 2570514 176 0.0
all-clusters-minimal-app debug (read only) 2863561 2863737 176 0.0
(read/write) 147488 147488 0 0.0
.bss 61152 61152 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77992 77992 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 272555 272555 0 0.0
.text 2414754 2414930 176 0.0
bridge-app debug+rpc (read only) 2369433 2369609 176 0.0
(read/write) 127584 127584 0 0.0
.bss 50592 50592 0 0.0
.data 3600 3600 0 0.0
.data.rel.ro 67544 67544 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 203336 203336 0 0.0
.text 2003090 2003266 176 0.0
chip-tool debug (read only) 10440169 10440489 320 0.0
(read/write) 646432 646432 0 0.0
.bss 24856 24856 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 611784 611784 0 0.0
.dynamic 608 608 0 0.0
.got 5104 5104 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 532373 532373 0 0.0
.text 8411412 8411732 320 0.0
chip-tool-ipv6only arm64 (read only) 9856140 9856348 208 0.0
(read/write) 694097 694097 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 639336 639336 0 0.0
.dynamic 560 560 0 0.0
.got 13624 13624 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 464460 464460 0 0.0
.text 7764452 7764660 208 0.0
lighting-app debug+rpc (read only) 2592017 2592209 192 0.0
(read/write) 130200 130200 0 0.0
.bss 49728 49728 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72440 72440 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 912 912 0 0.0
.rodata 219088 219088 0 0.0
.text 2201858 2202050 192 0.0
lock-app debug (read only) 2576281 2576457 176 0.0
(read/write) 125568 125568 0 0.0
.bss 48256 48256 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69592 69592 0 0.0
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 236080 236080 0 0.0
.text 2173186 2173362 176 0.0
ota-provider-app debug (read only) 2354881 2355057 176 0.0
(read/write) 119048 119048 0 0.0
.bss 47808 47808 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63416 63416 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 209176 209176 0 0.0
.text 1981826 1982002 176 0.0
ota-requestor-app debug (read only) 2475425 2475601 176 0.0
(read/write) 126440 126440 0 0.0
.bss 50176 50176 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 68072 68072 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 212672 212672 0 0.0
.text 2090258 2090434 176 0.0
shell debug (read only) 2592553 2592729 176 0.0
(read/write) 141872 141872 0 0.0
.bss 57800 57800 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 77008 77008 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 1024 1024 0 0.0
.rodata 233042 233042 0 0.0
.text 2201282 2201458 176 0.0
thermostat-no-ble arm64 (read only) 2349068 2349196 128 0.0
(read/write) 141617 141617 0 0.0
.bss 55313 55313 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75832 75832 0 0.0
.dynamic 560 560 0 0.0
.got 5024 5024 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139572 139572 0 0.0
.text 1972064 1972192 128 0.0
tv-app debug (read only) 3164265 3164553 288 0.0
(read/write) 257736 257736 0 0.0
.bss 167352 167352 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 79088 79088 0 0.0
.dynamic 608 608 0 0.0
.got 4864 4864 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 257000 257000 0 0.0
.text 2717474 2717762 288 0.0
tv-casting-app debug (read only) 5400985 5401321 336 0.0
(read/write) 158824 158824 0 0.0
.bss 51384 51384 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98584 98584 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 340433 340433 0 0.0
.text 4792562 4792898 336 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453688 2453752 64 0.0
.bss 214556 214556 0 0.0
.data 5872 5872 0 0.0
.text 1416332 1416396 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177519 1177583 64 0.0
bss 143222 143222 0 0.0
rodata 142704 142704 0 0.0
text 812744 812804 60 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157575 1157639 64 0.0
bss 142460 142460 0 0.0
rodata 134400 134400 0 0.0
text 801896 801956 60 0.0
p6 all-clusters-app default (read only) 881528 881528 0 0.0
(read/write) 1690580 1690644 64 0.0
.bss 149168 149168 0 0.0
.data 2648 2648 0 0.0
.text 1530376 1530440 64 0.0
all-clusters-minimal-app default (read only) 882248 882248 0 0.0
(read/write) 1634772 1634836 64 0.0
.bss 148448 148448 0 0.0
.data 2648 2648 0 0.0
.text 1475288 1475352 64 0.0
light-app default (read only) 890568 890568 0 0.0
(read/write) 1555060 1555124 64 0.0
.bss 140336 140336 0 0.0
.data 2440 2440 0 0.0
.text 1403896 1403960 64 0.0
lock-app default (read only) 886072 886072 0 0.0
(read/write) 1592348 1592412 64 0.0
.bss 144816 144816 0 0.0
.data 2456 2456 0 0.0
.text 1436688 1436752 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805828 805900 72 0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569630 569704 74 0.0
lighting-app tlsr9518adk80d (read/write) 827500 827572 72 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 587470 587544 74 0.0

@bzbarsky-apple bzbarsky-apple force-pushed the fix-read-client-cleanup branch from 0e3aed1 to 9274ebb Compare August 5, 2022 07:31
@github-actions
Copy link

github-actions bot commented Aug 5, 2022

PR #21660: Size comparison from 753415d to 9274ebb

Increases (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 753415d 9274ebb change % change
bl602 lighting-app bl602 (read/write) 1380298 1380362 64 0.0
.text 1048400 1048464 64 0.0
bl602+rpc (read/write) 1425546 1425610 64 0.0
.text 1079900 1079964 64 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 670647 670695 48 0.0
.text 581852 581900 48 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 636159 636207 48 0.0
.text 558108 558156 48 0.0
lock-ftd LP_CC2652R7 (read only) 673123 673171 48 0.0
.text 596096 596144 48 0.0
lock-mtd LP_CC2652R7 (read only) 655595 655651 56 0.0
.text 553680 553736 56 0.0
pump-app LP_CC2652R7 (read only) 682639 682695 56 0.0
.text 592908 592964 56 0.0
pump-controller-app LP_CC2652R7 (read only) 667103 667159 56 0.0
.text 581832 581888 56 0.0
shell LP_CC2652R7 (read only) 663314 663362 48 0.0
.text 577572 577620 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584834 584874 40 0.0
.app_xip_area 461636 461676 40 0.0
lock cyw930739m2evb_01 (read/write) 590762 590818 56 0.0
.app_xip_area 462780 462836 56 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 589882 589930 48 0.0
.app_xip_area 467500 467548 48 0.0
efr32 lighting-app BRD4161A (read/write) 1096572 1096620 48 0.0
.text 961636 961684 48 0.0
BRD4161A+rpc (read/write) 1150868 1150916 48 0.0
.text 999036 999084 48 0.0
BRD4161A+rs911x (read/write) 985860 985908 48 0.0
.text 821600 821648 48 0.0
lock-app BRD4161A+wf200 (read/write) 1136456 1136520 64 0.0
.text 989548 989612 64 0.0
window-app BRD4161A (read/write) 1088312 1088360 48 0.0
.text 951904 951952 48 0.0
esp32 all-clusters-app c3devkit (read only) 1025656 1025726 70 0.0
.flash.text 1025656 1025726 70 0.0
m5stack (read only) 1079027 1079067 40 0.0
.flash.text 1073643 1073683 40 0.0
k32w light k32w0+release (read/write) 644460 644508 48 0.0
.text 569976 570024 48 0.0
lock k32w0+release (read/write) 701796 701844 48 0.0
.text 626832 626880 48 0.0
linux all-clusters-app debug (read only) 3021713 3021889 176 0.0
.text 2570338 2570514 176 0.0
all-clusters-minimal-app debug (read only) 2863561 2863737 176 0.0
.text 2414754 2414930 176 0.0
bridge-app debug+rpc (read only) 2369433 2369609 176 0.0
.text 2003090 2003266 176 0.0
chip-tool debug (read only) 10440169 10440489 320 0.0
.text 8411412 8411732 320 0.0
chip-tool-ipv6only arm64 (read only) 9856140 9856348 208 0.0
.text 7764452 7764660 208 0.0
lighting-app debug+rpc (read only) 2592017 2592209 192 0.0
.text 2201858 2202050 192 0.0
lock-app debug (read only) 2576281 2576457 176 0.0
.text 2173186 2173362 176 0.0
ota-provider-app debug (read only) 2354881 2355057 176 0.0
.text 1981826 1982002 176 0.0
ota-requestor-app debug (read only) 2475425 2475601 176 0.0
.text 2090258 2090434 176 0.0
shell debug (read only) 2592553 2592729 176 0.0
.text 2201282 2201458 176 0.0
thermostat-no-ble arm64 (read only) 2349068 2349196 128 0.0
.text 1972064 1972192 128 0.0
tv-app debug (read only) 3164265 3164553 288 0.0
.text 2717474 2717762 288 0.0
tv-casting-app debug (read only) 5400985 5401321 336 0.0
.text 4792562 4792898 336 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2453688 2453752 64 0.0
.text 1416332 1416396 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177519 1177567 48 0.0
text 812744 812800 56 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157575 1157639 64 0.0
text 801896 801956 60 0.0
p6 all-clusters-app default (read/write) 1690580 1690644 64 0.0
.text 1530376 1530440 64 0.0
all-clusters-minimal-app default (read/write) 1634772 1634836 64 0.0
.text 1475288 1475352 64 0.0
light-app default (read/write) 1555060 1555124 64 0.0
.text 1403896 1403960 64 0.0
lock-app default (read/write) 1592348 1592412 64 0.0
.text 1436688 1436752 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805820 805900 80 0.0
text 569628 569704 76 0.0
lighting-app tlsr9518adk80d (read/write) 827492 827572 80 0.0
text 587468 587546 78 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section 753415d 9274ebb change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 180736 180688 -48 -0.0
lock-ftd LP_CC2652R7 (read/write) 168444 168396 -48 -0.0
lock-mtd LP_CC2652R7 (read/write) 181660 181604 -56 -0.0
pump-app LP_CC2652R7 (read/write) 159736 159680 -56 -0.0
pump-controller-app LP_CC2652R7 (read/write) 175408 175352 -56 -0.0
shell LP_CC2652R7 (read/write) 183588 183540 -48 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 753415d 9274ebb change % change
bl602 lighting-app bl602 (read/write) 1380298 1380362 64 0.0
.bss 119746 119746 0 0.0
.data 4480 4480 0 0.0
.text 1048400 1048464 64 0.0
bl602+rpc (read/write) 1425546 1425610 64 0.0
.bss 127186 127186 0 0.0
.data 4600 4600 0 0.0
.text 1079900 1079964 64 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 670647 670695 48 0.0
(read/write) 180736 180688 -48 -0.0
.bss 74276 74276 0 0.0
.data 3372 3372 0 0.0
.rodata 88479 88479 0 0.0
.text 581852 581900 48 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 636159 636207 48 0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77727 77727 0 0.0
.text 558108 558156 48 0.0
lock-ftd LP_CC2652R7 (read only) 673123 673171 48 0.0
(read/write) 168444 168396 -48 -0.0
.bss 71348 71348 0 0.0
.data 3296 3296 0 0.0
.rodata 76547 76547 0 0.0
.text 596096 596144 48 0.0
lock-mtd LP_CC2652R7 (read only) 655595 655651 56 0.0
(read/write) 181660 181604 -56 -0.0
.bss 67036 67036 0 0.0
.data 3296 3296 0 0.0
.rodata 101435 101435 0 0.0
.text 553680 553736 56 0.0
pump-app LP_CC2652R7 (read only) 682639 682695 56 0.0
(read/write) 159736 159680 -56 -0.0
.bss 71388 71388 0 0.0
.data 3296 3296 0 0.0
.rodata 89247 89247 0 0.0
.text 592908 592964 56 0.0
pump-controller-app LP_CC2652R7 (read only) 667103 667159 56 0.0
(read/write) 175408 175352 -56 -0.0
.bss 71524 71524 0 0.0
.data 3292 3292 0 0.0
.rodata 84791 84791 0 0.0
.text 581832 581888 56 0.0
shell LP_CC2652R7 (read only) 663314 663362 48 0.0
(read/write) 183588 183540 -48 -0.0
.bss 76596 76596 0 0.0
.data 3376 3376 0 0.0
.rodata 85426 85426 0 0.0
.text 577572 577620 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584834 584874 40 0.0
.app_xip_area 461636 461676 40 0.0
.bss 65640 65640 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) 590762 590818 56 0.0
.app_xip_area 462780 462836 56 0.0
.bss 70424 70424 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) 589882 589930 48 0.0
.app_xip_area 467500 467548 48 0.0
.bss 64880 64880 0 0.0
.data 688 688 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1096572 1096620 48 0.0
.bss 132844 132844 0 0.0
.data 2068 2068 0 0.0
.text 961636 961684 48 0.0
BRD4161A+rpc (read/write) 1150868 1150916 48 0.0
.bss 149532 149532 0 0.0
.data 2280 2280 0 0.0
.text 999036 999084 48 0.0
BRD4161A+rs911x (read/write) 985860 985908 48 0.0
.bss 162184 162184 0 0.0
.data 2056 2056 0 0.0
.text 821600 821648 48 0.0
lock-app BRD4161A+wf200 (read/write) 1136456 1136520 64 0.0
.bss 144824 144824 0 0.0
.data 2064 2064 0 0.0
.text 989548 989612 64 0.0
window-app BRD4161A (read/write) 1088312 1088360 48 0.0
.bss 134292 134292 0 0.0
.data 2096 2096 0 0.0
.text 951904 951952 48 0.0
esp32 all-clusters-app c3devkit (read only) 1025656 1025726 70 0.0
(read/write) 1487234 1487234 0 0.0
.dram0.bss 70336 70336 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 216864 216864 0 0.0
.flash.text 1025656 1025726 70 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1079027 1079067 40 0.0
(read/write) 489240 489240 0 0.0
.dram0.bss 75840 75840 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 247260 247260 0 0.0
.flash.text 1073643 1073683 40 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 644460 644508 48 0.0
.bss 69712 69712 0 0.0
.data 2044 2044 0 0.0
.text 569976 570024 48 0.0
lock k32w0+release (read/write) 701796 701844 48 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626832 626880 48 0.0
linux all-clusters-app debug (read only) 3021713 3021889 176 0.0
(read/write) 155688 155688 0 0.0
.bss 61888 61888 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 85352 85352 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1152 1152 0 0.0
.rodata 272491 272491 0 0.0
.text 2570338 2570514 176 0.0
all-clusters-minimal-app debug (read only) 2863561 2863737 176 0.0
(read/write) 147488 147488 0 0.0
.bss 61152 61152 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 77992 77992 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 272555 272555 0 0.0
.text 2414754 2414930 176 0.0
bridge-app debug+rpc (read only) 2369433 2369609 176 0.0
(read/write) 127584 127584 0 0.0
.bss 50592 50592 0 0.0
.data 3600 3600 0 0.0
.data.rel.ro 67544 67544 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 203336 203336 0 0.0
.text 2003090 2003266 176 0.0
chip-tool debug (read only) 10440169 10440489 320 0.0
(read/write) 646432 646432 0 0.0
.bss 24856 24856 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 611784 611784 0 0.0
.dynamic 608 608 0 0.0
.got 5104 5104 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 532373 532373 0 0.0
.text 8411412 8411732 320 0.0
chip-tool-ipv6only arm64 (read only) 9856140 9856348 208 0.0
(read/write) 694097 694097 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 639336 639336 0 0.0
.dynamic 560 560 0 0.0
.got 13624 13624 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 464460 464460 0 0.0
.text 7764452 7764660 208 0.0
lighting-app debug+rpc (read only) 2592017 2592209 192 0.0
(read/write) 130200 130200 0 0.0
.bss 49728 49728 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72440 72440 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 912 912 0 0.0
.rodata 219088 219088 0 0.0
.text 2201858 2202050 192 0.0
lock-app debug (read only) 2576281 2576457 176 0.0
(read/write) 125568 125568 0 0.0
.bss 48256 48256 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69592 69592 0 0.0
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 236080 236080 0 0.0
.text 2173186 2173362 176 0.0
ota-provider-app debug (read only) 2354881 2355057 176 0.0
(read/write) 119048 119048 0 0.0
.bss 47808 47808 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63416 63416 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 209176 209176 0 0.0
.text 1981826 1982002 176 0.0
ota-requestor-app debug (read only) 2475425 2475601 176 0.0
(read/write) 126440 126440 0 0.0
.bss 50176 50176 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 68072 68072 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 832 832 0 0.0
.rodata 212672 212672 0 0.0
.text 2090258 2090434 176 0.0
shell debug (read only) 2592553 2592729 176 0.0
(read/write) 141872 141872 0 0.0
.bss 57800 57800 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 77008 77008 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 1024 1024 0 0.0
.rodata 233042 233042 0 0.0
.text 2201282 2201458 176 0.0
thermostat-no-ble arm64 (read only) 2349068 2349196 128 0.0
(read/write) 141617 141617 0 0.0
.bss 55313 55313 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75832 75832 0 0.0
.dynamic 560 560 0 0.0
.got 5024 5024 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139572 139572 0 0.0
.text 1972064 1972192 128 0.0
tv-app debug (read only) 3164265 3164553 288 0.0
(read/write) 257736 257736 0 0.0
.bss 167352 167352 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 79088 79088 0 0.0
.dynamic 608 608 0 0.0
.got 4864 4864 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 257000 257000 0 0.0
.text 2717474 2717762 288 0.0
tv-casting-app debug (read only) 5400985 5401321 336 0.0
(read/write) 158824 158824 0 0.0
.bss 51384 51384 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98584 98584 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 340433 340433 0 0.0
.text 4792562 4792898 336 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453688 2453752 64 0.0
.bss 214556 214556 0 0.0
.data 5872 5872 0 0.0
.text 1416332 1416396 64 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177519 1177567 48 0.0
bss 143222 143222 0 0.0
rodata 142704 142704 0 0.0
text 812744 812800 56 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157575 1157639 64 0.0
bss 142460 142460 0 0.0
rodata 134400 134400 0 0.0
text 801896 801956 60 0.0
p6 all-clusters-app default (read only) 881528 881528 0 0.0
(read/write) 1690580 1690644 64 0.0
.bss 149168 149168 0 0.0
.data 2648 2648 0 0.0
.text 1530376 1530440 64 0.0
all-clusters-minimal-app default (read only) 882248 882248 0 0.0
(read/write) 1634772 1634836 64 0.0
.bss 148448 148448 0 0.0
.data 2648 2648 0 0.0
.text 1475288 1475352 64 0.0
light-app default (read only) 890568 890568 0 0.0
(read/write) 1555060 1555124 64 0.0
.bss 140336 140336 0 0.0
.data 2440 2440 0 0.0
.text 1403896 1403960 64 0.0
lock-app default (read only) 886072 886072 0 0.0
(read/write) 1592348 1592412 64 0.0
.bss 144816 144816 0 0.0
.data 2456 2456 0 0.0
.text 1436688 1436752 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 805820 805900 80 0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569628 569704 76 0.0
lighting-app tlsr9518adk80d (read/write) 827492 827572 80 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 587468 587546 78 0.0

@woody-apple woody-apple enabled auto-merge (squash) August 9, 2022 14:27
This is actually somewhat dangerous, because there is a good chance ~ReadClient
is running from under the destructor of the ReadClient::Callback and we are
invoking a virtual method on the callback.  But this is the only way to ensure
we don't leak.  ReadClient::Callback implementations need to be able to handle
this.

Fixes project-chip#21658
@woody-apple woody-apple force-pushed the fix-read-client-cleanup branch from 9274ebb to b7718f3 Compare August 10, 2022 05:50
@github-actions
Copy link

github-actions bot commented Aug 10, 2022

PR #21660: Size comparison from 397d642 to b7718f3

Increases (42 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, telink)
platform target config section 397d642 b7718f3a change % change
bl602 lighting-app bl602 (read/write) 1380170 1380234 64 0.0
.text 1048348 1048408 60 0.0
bl602+rpc (read/write) 1425426 1425482 56 0.0
.text 1079848 1079908 60 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 671071 671119 48 0.0
.text 582284 582332 48 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 636599 636647 48 0.0
.text 558548 558596 48 0.0
lock-ftd LP_CC2652R7 (read only) 672907 672955 48 0.0
.text 596016 596064 48 0.0
lock-mtd LP_CC2652R7 (read only) 655515 655571 56 0.0
.text 553672 553728 56 0.0
pump-app LP_CC2652R7 (read only) 683155 683219 64 0.0
.text 593356 593420 64 0.0
pump-controller-app LP_CC2652R7 (read only) 667615 667671 56 0.0
.text 582272 582328 56 0.0
shell LP_CC2652R7 (read only) 663746 663794 48 0.0
.text 578012 578060 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584774 584822 48 0.0
.app_xip_area 461576 461624 48 0.0
lock cyw930739m2evb_01 (read/write) 590710 590750 40 0.0
.app_xip_area 462728 462768 40 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 597098 597154 56 0.0
.app_xip_area 474620 474676 56 0.0
efr32 lighting-app BRD4161A (read/write) 1096596 1096660 64 0.0
.text 961660 961724 64 0.0
BRD4161A+rpc (read/write) 1150860 1150924 64 0.0
.text 999028 999092 64 0.0
BRD4161A+rs911x (read/write) 986116 986180 64 0.0
.text 821856 821920 64 0.0
lock-app BRD4161A+wf200 (read/write) 1136692 1136740 48 0.0
.text 989784 989832 48 0.0
window-app BRD4161A (read/write) 1088328 1088392 64 0.0
.text 951920 951984 64 0.0
esp32 all-clusters-app c3devkit (read only) 1026246 1026314 68 0.0
.flash.text 1026246 1026314 68 0.0
m5stack (read only) 1079499 1079543 44 0.0
.flash.text 1074115 1074159 44 0.0
k32w light k32w0+release (read/write) 643772 643820 48 0.0
.text 569288 569336 48 0.0
lock k32w0+release (read/write) 701204 701268 64 0.0
.text 626240 626304 64 0.0
linux all-clusters-app debug (read only) 3026897 3027057 160 0.0
.text 2574546 2574706 160 0.0
all-clusters-minimal-app debug (read only) 2867169 2867329 160 0.0
.text 2417394 2417554 160 0.0
bridge-app debug+rpc (read only) 2366345 2366521 176 0.0
.text 2001362 2001538 176 0.0
chip-tool debug (read only) 10600785 10601105 320 0.0
.text 8558068 8558388 320 0.0
chip-tool-ipv6only arm64 (read only) 10009948 10010172 224 0.0
.text 7905684 7905908 224 0.0
lighting-app debug+rpc (read only) 2589785 2589961 176 0.0
.text 2200034 2200210 176 0.0
lock-app debug (read only) 2574225 2574385 160 0.0
.text 2171442 2171602 160 0.0
ota-provider-app debug (read only) 2351537 2351713 176 0.0
.text 1979842 1980018 176 0.0
ota-requestor-app debug (read only) 2516361 2516537 176 0.0
.text 2128994 2129170 176 0.0
shell debug (read only) 2595281 2595457 176 0.0
.text 2203522 2203698 176 0.0
thermostat-no-ble arm64 (read only) 2351468 2351596 128 0.0
.text 1974224 1974352 128 0.0
tv-app debug (read only) 3169617 3169889 272 0.0
.text 2721698 2721970 272 0.0
tv-casting-app debug (read only) 5410321 5410657 336 0.0
.text 4800594 4800930 336 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1178087 1178135 48 0.0
text 813240 813296 56 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1158111 1158159 48 0.0
text 802360 802416 56 0.0
p6 all-clusters-app default (read/write) 1694084 1694148 64 0.0
.text 1533872 1533936 64 0.0
all-clusters-minimal-app default (read/write) 1638268 1638332 64 0.0
.text 1478776 1478840 64 0.0
light-app default (read/write) 1556956 1557020 64 0.0
.text 1405784 1405848 64 0.0
lock-app default (read/write) 1594268 1594332 64 0.0
.text 1438600 1438664 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 806288 806360 72 0.0
text 569992 570066 74 0.0
lighting-app tlsr9518adk80d (read/write) 828096 828168 72 0.0
text 587968 588040 72 0.0
Decreases (6 builds for cc13x2_26x2)
platform target config section 397d642 b7718f3a change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 180312 180264 -48 -0.0
lock-ftd LP_CC2652R7 (read/write) 168660 168612 -48 -0.0
lock-mtd LP_CC2652R7 (read/write) 181740 181684 -56 -0.0
pump-app LP_CC2652R7 (read/write) 159220 159156 -64 -0.0
pump-controller-app LP_CC2652R7 (read/write) 174896 174840 -56 -0.0
shell LP_CC2652R7 (read/write) 183156 183108 -48 -0.0
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 397d642 b7718f3a change % change
bl602 lighting-app bl602 (read/write) 1380170 1380234 64 0.0
.bss 119746 119746 0 0.0
.data 4480 4480 0 0.0
.text 1048348 1048408 60 0.0
bl602+rpc (read/write) 1425426 1425482 56 0.0
.bss 127186 127186 0 0.0
.data 4600 4600 0 0.0
.text 1079848 1079908 60 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 671071 671119 48 0.0
(read/write) 180312 180264 -48 -0.0
.bss 74276 74276 0 0.0
.data 3372 3372 0 0.0
.rodata 88471 88471 0 0.0
.text 582284 582332 48 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 636599 636647 48 0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77727 77727 0 0.0
.text 558548 558596 48 0.0
lock-ftd LP_CC2652R7 (read only) 672907 672955 48 0.0
(read/write) 168660 168612 -48 -0.0
.bss 71348 71348 0 0.0
.data 3296 3296 0 0.0
.rodata 76411 76411 0 0.0
.text 596016 596064 48 0.0
lock-mtd LP_CC2652R7 (read only) 655515 655571 56 0.0
(read/write) 181740 181684 -56 -0.0
.bss 67036 67036 0 0.0
.data 3296 3296 0 0.0
.rodata 101363 101363 0 0.0
.text 553672 553728 56 0.0
pump-app LP_CC2652R7 (read only) 683155 683219 64 0.0
(read/write) 159220 159156 -64 -0.0
.bss 71388 71388 0 0.0
.data 3296 3296 0 0.0
.rodata 89315 89315 0 0.0
.text 593356 593420 64 0.0
pump-controller-app LP_CC2652R7 (read only) 667615 667671 56 0.0
(read/write) 174896 174840 -56 -0.0
.bss 71524 71524 0 0.0
.data 3292 3292 0 0.0
.rodata 84863 84863 0 0.0
.text 582272 582328 56 0.0
shell LP_CC2652R7 (read only) 663746 663794 48 0.0
(read/write) 183156 183108 -48 -0.0
.bss 76596 76596 0 0.0
.data 3376 3376 0 0.0
.rodata 85418 85418 0 0.0
.text 578012 578060 48 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584774 584822 48 0.0
.app_xip_area 461576 461624 48 0.0
.bss 65640 65640 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) 590710 590750 40 0.0
.app_xip_area 462728 462768 40 0.0
.bss 70424 70424 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) 597098 597154 56 0.0
.app_xip_area 474620 474676 56 0.0
.bss 64952 64952 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) 1096596 1096660 64 0.0
.bss 132844 132844 0 0.0
.data 2068 2068 0 0.0
.text 961660 961724 64 0.0
BRD4161A+rpc (read/write) 1150860 1150924 64 0.0
.bss 149532 149532 0 0.0
.data 2280 2280 0 0.0
.text 999028 999092 64 0.0
BRD4161A+rs911x (read/write) 986116 986180 64 0.0
.bss 162184 162184 0 0.0
.data 2056 2056 0 0.0
.text 821856 821920 64 0.0
lock-app BRD4161A+wf200 (read/write) 1136692 1136740 48 0.0
.bss 144824 144824 0 0.0
.data 2064 2064 0 0.0
.text 989784 989832 48 0.0
window-app BRD4161A (read/write) 1088328 1088392 64 0.0
.bss 134292 134292 0 0.0
.data 2096 2096 0 0.0
.text 951920 951984 64 0.0
esp32 all-clusters-app c3devkit (read only) 1026246 1026314 68 0.0
(read/write) 1487426 1487426 0 0.0
.dram0.bss 70336 70336 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 217056 217056 0 0.0
.flash.text 1026246 1026314 68 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1079499 1079543 44 0.0
(read/write) 489392 489392 0 0.0
.dram0.bss 75840 75840 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 247412 247412 0 0.0
.flash.text 1074115 1074159 44 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 643772 643820 48 0.0
.bss 69712 69712 0 0.0
.data 2044 2044 0 0.0
.text 569288 569336 48 0.0
lock k32w0+release (read/write) 701204 701268 64 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626240 626304 64 0.0
linux all-clusters-app debug (read only) 3026897 3027057 160 0.0
(read/write) 155752 155752 0 0.0
.bss 61888 61888 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 85416 85416 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1152 1152 0 0.0
.rodata 273419 273419 0 0.0
.text 2574546 2574706 160 0.0
all-clusters-minimal-app debug (read only) 2867169 2867329 160 0.0
(read/write) 147488 147488 0 0.0
.bss 61152 61152 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 78008 78008 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 273547 273547 0 0.0
.text 2417394 2417554 160 0.0
bridge-app debug+rpc (read only) 2366345 2366521 176 0.0
(read/write) 127416 127416 0 0.0
.bss 50592 50592 0 0.0
.data 3600 3600 0 0.0
.data.rel.ro 67368 67368 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 202504 202504 0 0.0
.text 2001362 2001538 176 0.0
chip-tool debug (read only) 10600785 10601105 320 0.0
(read/write) 647520 647520 0 0.0
.bss 24856 24856 0 0.0
.data 3266 3266 0 0.0
.data.rel.ro 612856 612856 0 0.0
.dynamic 608 608 0 0.0
.got 5104 5104 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 543861 543861 0 0.0
.text 8558068 8558388 320 0.0
chip-tool-ipv6only arm64 (read only) 10009948 10010172 224 0.0
(read/write) 695217 695217 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 640416 640416 0 0.0
.dynamic 560 560 0 0.0
.got 13664 13664 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 474396 474396 0 0.0
.text 7905684 7905908 224 0.0
lighting-app debug+rpc (read only) 2589785 2589961 176 0.0
(read/write) 130008 130008 0 0.0
.bss 49728 49728 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72248 72248 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 912 912 0 0.0
.rodata 219184 219184 0 0.0
.text 2200034 2200210 176 0.0
lock-app debug (read only) 2574225 2574385 160 0.0
(read/write) 125376 125376 0 0.0
.bss 48256 48256 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69416 69416 0 0.0
.dynamic 608 608 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 236272 236272 0 0.0
.text 2171442 2171602 160 0.0
ota-provider-app debug (read only) 2351537 2351713 176 0.0
(read/write) 118848 118848 0 0.0
.bss 47808 47808 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 63224 63224 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 760 760 0 0.0
.rodata 208344 208344 0 0.0
.text 1979842 1980018 176 0.0
ota-requestor-app debug (read only) 2516361 2516537 176 0.0
(read/write) 127152 127152 0 0.0
.bss 50272 50272 0 0.0
.data 2304 2304 0 0.0
.data.rel.ro 68632 68632 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 840 840 0 0.0
.rodata 214944 214944 0 0.0
.text 2128994 2129170 176 0.0
shell debug (read only) 2595281 2595457 176 0.0
(read/write) 141904 141904 0 0.0
.bss 57800 57800 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 77024 77024 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 1024 1024 0 0.0
.rodata 233554 233554 0 0.0
.text 2203522 2203698 176 0.0
thermostat-no-ble arm64 (read only) 2351468 2351596 128 0.0
(read/write) 141681 141681 0 0.0
.bss 55313 55313 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75880 75880 0 0.0
.dynamic 560 560 0 0.0
.got 5040 5040 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139716 139716 0 0.0
.text 1974224 1974352 128 0.0
tv-app debug (read only) 3169617 3169889 272 0.0
(read/write) 257864 257864 0 0.0
.bss 167480 167480 0 0.0
.data 4736 4736 0 0.0
.data.rel.ro 79096 79096 0 0.0
.dynamic 608 608 0 0.0
.got 4864 4864 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 258152 258152 0 0.0
.text 2721698 2721970 272 0.0
tv-casting-app debug (read only) 5410321 5410657 336 0.0
(read/write) 158984 158984 0 0.0
.bss 51448 51448 0 0.0
.data 2432 2432 0 0.0
.data.rel.ro 98672 98672 0 0.0
.dynamic 608 608 0 0.0
.got 4784 4784 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 341425 341425 0 0.0
.text 4800594 4800930 336 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2452848 2452848 0 0.0
.bss 214556 214556 0 0.0
.data 5872 5872 0 0.0
.text 1415492 1415492 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1178087 1178135 48 0.0
bss 143222 143222 0 0.0
rodata 142776 142776 0 0.0
text 813240 813296 56 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1158111 1158159 48 0.0
bss 142460 142460 0 0.0
rodata 134472 134472 0 0.0
text 802360 802416 56 0.0
p6 all-clusters-app default (read only) 881520 881520 0 0.0
(read/write) 1694084 1694148 64 0.0
.bss 149168 149168 0 0.0
.data 2656 2656 0 0.0
.text 1533872 1533936 64 0.0
all-clusters-minimal-app default (read only) 882240 882240 0 0.0
(read/write) 1638268 1638332 64 0.0
.bss 148448 148448 0 0.0
.data 2656 2656 0 0.0
.text 1478776 1478840 64 0.0
light-app default (read only) 890560 890560 0 0.0
(read/write) 1556956 1557020 64 0.0
.bss 140336 140336 0 0.0
.data 2448 2448 0 0.0
.text 1405784 1405848 64 0.0
lock-app default (read only) 886064 886064 0 0.0
(read/write) 1594268 1594332 64 0.0
.bss 144816 144816 0 0.0
.data 2464 2464 0 0.0
.text 1438600 1438664 64 0.0
telink light-switch-app tlsr9518adk80d (read/write) 806288 806360 72 0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569992 570066 74 0.0
lighting-app tlsr9518adk80d (read/write) 828096 828168 72 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 587968 588040 72 0.0

@woody-apple
Copy link
Contributor

Fast tracking given this has had enough time for review.

@woody-apple woody-apple disabled auto-merge August 16, 2022 03:47
@woody-apple woody-apple merged commit 1cb778e into project-chip:master Aug 16, 2022
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this pull request Sep 1, 2022
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this pull request Sep 2, 2022
bzbarsky-apple added a commit that referenced this pull request Sep 2, 2022
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
…p#21660)

This is actually somewhat dangerous, because there is a good chance ~ReadClient
is running from under the destructor of the ReadClient::Callback and we are
invoking a virtual method on the callback.  But this is the only way to ensure
we don't leak.  ReadClient::Callback implementations need to be able to handle
this.

Fixes project-chip#21658
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
@bzbarsky-apple bzbarsky-apple deleted the fix-read-client-cleanup branch October 18, 2022 03:13
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.

Make ReadClient destructor clean up properly.
3 participants