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

Make IntrusiveList lifetime documentation a little clearer. #13525

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

bzbarsky-apple
Copy link
Contributor

Also adds verification that a nonempty list is never destroyed, since
that would leave dangling pointers back to the list from the nodes
that weren't removed from it.

Problem

Documentation was not as clear as I'd like about the lifetime assumptions.

Change overview

Adjust the docs.

Testing

No behavior changes except adding a verification that nonempty lists are not destroyed.

Also adds verification that a nonempty list is never destroyed, since
that would leave dangling pointers back to the list from the nodes
that weren't removed from it.
@github-actions
Copy link

github-actions bot commented Jan 13, 2022

PR #13525: Size comparison from 8e43cab to 76afaef

Increases (28 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 8e43cab 76afaef change % change
efr32 lighting-app BRD4161A (read only) 831456 831520 64 0.0
.text 831448 831512 64 0.0
BRD4161A+rpc (read only) 818852 818916 64 0.0
.text 818844 818908 64 0.0
window-app BRD4161A (read only) 805336 805400 64 0.0
.text 805328 805392 64 0.0
esp32 all-clusters-app c3devkit (read only) 908600 908606 6 0.0
.flash.text 908600 908606 6 0.0
m5stack (read only) 957279 957283 4 0.0
.flash.text 951895 951899 4 0.0
k32w light k32w061+release (read/write) 657384 657400 16 0.0
.text 572596 572612 16 0.0
lock k32w061+release (read/write) 661668 661684 16 0.0
.text 576564 576580 16 0.0
linux chip-tool-ipv6only arm64 (read only) 7216412 7216492 80 0.0
.text 6090564 6090644 80 0.0
thermostat-no-ble arm64 (read only) 2040908 2040988 80 0.0
.text 1696448 1696528 80 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read/write) 2346360 2346424 64 0.0
.text 1308936 1309000 64 0.0
lock-app CY8CPROTO_062_4343W+release (read/write) 2304552 2304616 64 0.0
.text 1267152 1267216 64 0.0
shell CY8CPROTO_062_4343W+release (read/write) 2054392 2054456 64 0.0
.text 1016992 1017056 64 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 940411 940427 16 0.0
text 634632 634660 28 0.0
nrf52840dk_nrf52840+rpc (read/write) 925843 925859 16 0.0
text 629984 630012 28 0.0
nrf52840dongle_nrf52840 (read/write) 991071 991103 32 0.0
text 666828 666856 28 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 850238 850254 16 0.0
text 551552 551580 28 0.0
lock-app nrf52840dk_nrf52840 (read/write) 912651 912667 16 0.0
text 612624 612652 28 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 822718 822734 16 0.0
text 529584 529612 28 0.0
pump-app nrf52840dk_nrf52840 (read/write) 913963 913995 32 0.0
text 613884 613912 28 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 910763 910779 16 0.0
text 611372 611400 28 0.0
shell nrf52840dk_nrf52840 (read/write) 798627 798643 16 0.0
text 533968 533988 20 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 711446 711462 16 0.0
text 451648 451668 20 0.0
p6 all-clusters-app default (read/write) 2400512 2400576 64 0.0
.text 1358776 1358840 64 0.0
light-app default (read/write) 2326232 2326296 64 0.0
.text 1284496 1284560 64 0.0
lock-app default (read/write) 2298464 2298528 64 0.0
.text 1256728 1256792 64 0.0
qpg lighting-app qpg6105+debug (read only) 535100 535108 8 0.0
.text 529780 529788 8 0.0
lock-app qpg6105+debug (read only) 507008 507016 8 0.0
.text 501688 501696 8 0.0
telink lighting-app tlsr9518adk80d (read/write) 837062 837086 24 0.0
text 584334 584354 20 0.0
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 8e43cab 76afaef change % change
efr32 lighting-app BRD4161A (read only) 831456 831520 64 0.0
(read/write) 127612 127612 0 0.0
.bss 125732 125732 0 0.0
.data 1880 1880 0 0.0
.text 831448 831512 64 0.0
BRD4161A+rpc (read only) 818852 818916 64 0.0
(read/write) 144272 144272 0 0.0
.bss 142292 142292 0 0.0
.data 1980 1980 0 0.0
.text 818844 818908 64 0.0
window-app BRD4161A (read only) 805336 805400 64 0.0
(read/write) 126320 126320 0 0.0
.bss 124480 124480 0 0.0
.data 1836 1836 0 0.0
.text 805328 805392 64 0.0
esp32 all-clusters-app c3devkit (read only) 908600 908606 6 0.0
(read/write) 1316426 1316426 0 0.0
.dram0.bss 70488 70488 0 0.0
.dram0.data 14284 14284 0 0.0
.flash.rodata 178160 178160 0 0.0
.flash.text 908600 908606 6 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 957279 957283 4 0.0
(read/write) 448576 448576 0 0.0
.dram0.bss 74952 74952 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 207432 207432 0 0.0
.flash.text 951895 951899 4 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 657384 657400 16 0.0
.bss 77136 77136 0 0.0
.data 1852 1852 0 0.0
.text 572596 572612 16 0.0
lock k32w061+release (read/write) 661668 661684 16 0.0
.bss 77432 77432 0 0.0
.data 1872 1872 0 0.0
.text 576564 576580 16 0.0
linux chip-tool-ipv6only arm64 (read only) 7216412 7216492 80 0.0
(read/write) 346289 346289 0 0.0
.bss 55217 55217 0 0.0
.data 1096 1096 0 0.0
.data.rel.ro 227824 227824 0 0.0
.dynamic 560 560 0 0.0
.got 58448 58448 0 0.0
.init 24 24 0 0.0
.init_array 168 168 0 0.0
.rodata 392548 392548 0 0.0
.text 6090564 6090644 80 0.0
thermostat-no-ble arm64 (read only) 2040908 2040988 80 0.0
(read/write) 145969 145969 0 0.0
.bss 65089 65089 0 0.0
.data 880 880 0 0.0
.data.rel.ro 73016 73016 0 0.0
.dynamic 560 560 0 0.0
.got 4048 4048 0 0.0
.init 24 24 0 0.0
.init_array 304 304 0 0.0
.rodata 129868 129868 0 0.0
.text 1696448 1696528 80 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2346360 2346424 64 0.0
.bss 189188 189188 0 0.0
.data 5320 5320 0 0.0
.text 1308936 1309000 64 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2331392 2331392 0 0.0
.bss 180728 180728 0 0.0
.data 5552 5552 0 0.0
.text 1293992 1293992 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2304552 2304616 64 0.0
.bss 179768 179768 0 0.0
.data 5544 5544 0 0.0
.text 1267152 1267216 64 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139712 1139712 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103096 103096 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2054392 2054456 64 0.0
.bss 156876 156876 0 0.0
.data 4864 4864 0 0.0
.text 1016992 1017056 64 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 940411 940427 16 0.0
bss 119596 119596 0 0.0
rodata 108600 108600 0 0.0
text 634632 634660 28 0.0
nrf52840dk_nrf52840+rpc (read/write) 925843 925859 16 0.0
bss 116640 116640 0 0.0
rodata 101048 101048 0 0.0
text 629984 630012 28 0.0
nrf52840dongle_nrf52840 (read/write) 991071 991103 32 0.0
bss 122440 122440 0 0.0
rodata 113352 113352 0 0.0
text 666828 666856 28 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 850238 850254 16 0.0
bss 116384 116384 0 0.0
rodata 101776 101776 0 0.0
text 551552 551580 28 0.0
lock-app nrf52840dk_nrf52840 (read/write) 912651 912667 16 0.0
bss 118784 118784 0 0.0
rodata 103872 103872 0 0.0
text 612624 612652 28 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 822718 822734 16 0.0
bss 115600 115600 0 0.0
rodata 97096 97096 0 0.0
text 529584 529612 28 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 541835 541835 0 0.0
bss 52588 52588 0 0.0
rodata 50104 50104 0 0.0
text 376940 376940 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 913963 913995 32 0.0
bss 118544 118544 0 0.0
rodata 104088 104088 0 0.0
text 613884 613912 28 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 910763 910779 16 0.0
bss 118572 118572 0 0.0
rodata 103344 103344 0 0.0
text 611372 611400 28 0.0
shell nrf52840dk_nrf52840 (read/write) 798627 798643 16 0.0
bss 109776 109776 0 0.0
rodata 78376 78376 0 0.0
text 533968 533988 20 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 711446 711462 16 0.0
bss 107664 107664 0 0.0
rodata 72680 72680 0 0.0
text 451648 451668 20 0.0
p6 all-clusters-app default (read/write) 2400512 2400576 64 0.0
.bss 117460 117460 0 0.0
.data 2592 2592 0 0.0
.text 1358776 1358840 64 0.0
light-app default (read/write) 2326232 2326296 64 0.0
.bss 106040 106040 0 0.0
.data 2384 2384 0 0.0
.text 1284496 1284560 64 0.0
lock-app default (read/write) 2298464 2298528 64 0.0
.bss 104920 104920 0 0.0
.data 2344 2344 0 0.0
.text 1256728 1256792 64 0.0
qpg lighting-app qpg6105+debug (read only) 535100 535108 8 0.0
(read/write) 146940 146940 0 0.0
.bss 89336 89336 0 0.0
.data 1008 1008 0 0.0
.text 529780 529788 8 0.0
lock-app qpg6105+debug (read only) 507008 507016 8 0.0
(read/write) 146936 146936 0 0.0
.bss 88472 88472 0 0.0
.data 956 956 0 0.0
.text 501688 501696 8 0.0
persistent-storage-app qpg6105+debug (read only) 106848 106848 0 0.0
(read/write) 146940 146940 0 0.0
.bss 38504 38504 0 0.0
.data 288 288 0 0.0
.text 101528 101528 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 837062 837086 24 0.0
bss 87288 87288 0 0.0
noinit 37160 37160 0 0.0
text 584334 584354 20 0.0

@andy31415
Copy link
Contributor

Fast track: documentation updates and a clean change. Intrusive List has unit tests which exercise the changed code.

@andy31415 andy31415 merged commit 087b4a5 into project-chip:master Jan 13, 2022
@bzbarsky-apple bzbarsky-apple deleted the list-docs branch January 13, 2022 14:33
selissia pushed a commit to selissia/connectedhomeip that referenced this pull request Jan 28, 2022
…chip#13525)

Also adds verification that a nonempty list is never destroyed, since
that would leave dangling pointers back to the list from the nodes
that weren't removed from it.
step0035 pushed a commit to hank820/connectedhomeip that referenced this pull request Feb 8, 2022
…chip#13525)

Also adds verification that a nonempty list is never destroyed, since
that would leave dangling pointers back to the list from the nodes
that weren't removed from it.
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.

2 participants