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

Fixing UBSan issues that showed up in all-clusters app #35580

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

Alami-Amine
Copy link
Contributor

@Alami-Amine Alami-Amine commented Sep 13, 2024

  • Fixing undefinedBehaviour Sanitizer issues showing up while running ubsan-sanitized all-clusters-app
  • Fix for two issues in the PR:
  1. BufferWriter.cpp:76:16: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long')

    • when size becomes 0 and we are in while (size-- > 0), then size will become less than 0, which should be avoided since it is an unsigned (although technically it wraps around, UBSAN complains about it).
    • Fix: stop size from decrement past 0, by moving size-- inside the loop
  2. CHIPMemString.h:88:22: runtime error: null pointer passed as argument 2, which is declared to never be null

    • when PI= is in mDNS TXT record (its value is empty) , and Dnssd::Internal::GetPairingInstruction calls CopyString, source is an empty bytespan and source.data() will return a null pointer, that will be passed to memcpy
    • Fix: avoid memcpy in that case.

To Reproduce

$ out/linux-x64-all-clusters-ubsan-clang/chip-all-clusters-app 
.
..
...
[1726243039.356984][104063:104063] CHIP:DIS: Responding with _L3840._sub._matterc._udp.local
[1726243039.356989][104063:104063] CHIP:DIS: Responding with _CM._sub._matterc._udp.local
[1726243039.357000][104063:104063] CHIP:DIS: Responding with C769D87C1A751176._matterc._udp.local
[1726243039.357004][104063:104063] CHIP:DIS: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: C769D87C1A751176.
../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/lib/support/BufferWriter.cpp:76:16: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/lib/support/BufferWriter.cpp:76:16 
[1726243039.359102][104063:104063] CHIP:DIS: mDNS service published: _matterc._udp
[1726243039.359121][104063:104063] CHIP:DIS: Updating services using commissioning mode 1
[1726243039.360108][104063:104063] CHIP:DIS: CHIP minimal mDNS started advertising.
.
..
...
[1726243039.365925][104063:104063] CHIP:DMG: Endpoint 1, Cluster 0x0000_005D update version to ab663630
[1726243039.365935][104063:104063] CHIP:DMG: Endpoint 1, Cluster 0x0000_005D update version to ab663631
[1726243039.365946][104063:104063] CHIP:DMG: Endpoint 1, Cluster 0x0000_005D update version to ab663632
[1726243039.365974][104063:104063] CHIP:EVL: LogEvent event number: 0x00000000000C0003 priority: 1, endpoint id:  0x1 cluster id: 0x0000_005D event id: 0x0 Epoch timestamp: 0x00000191EC1A6885
[1726243039.365987][104063:104063] CHIP:SVR: WaterHeaterManagementInstance::Init()
[1726243039.365996][104063:104063] CHIP:DMG: Endpoint 1, Cluster 0x0000_0094 update version to 30cc246a
../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/lib/support/CHIPMemString.h:88:22: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/lib/support/CHIPMemString.h:88:22 
[1726243039.373334][104063:104064] CHIP:DL: CREATE service object at /chipoble/967f/service
[1726243039.373482][104063:104064] CHIP:DL: Create characteristic object at /chipoble/967f/service/c1
[1726243039.373571][104063:104064] CHIP:DL: Create characteristic object at /chipoble/967f/service/c2
[1726243039.373607][104063:104064] CHIP:DL: CHIP BTP C1 /chipoble/967f/service

Copy link

Review changes with SemanticDiff.

Copy link

github-actions bot commented Sep 13, 2024

PR #35580: Size comparison from 7789409 to 512efaf

Full report (51 builds for bl602, bl702, bl702l, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, tizen)
platform target config section 7789409 512efaf change % change
bl602 lighting-app bl602 FLASH 1278156 1278180 24 0.0
RAM 95832 95832 0 0.0
bl602+mfd FLASH 1292010 1292034 24 0.0
RAM 95968 95968 0 0.0
bl602+rpc FLASH 1317120 1317144 24 0.0
RAM 104256 104256 0 0.0
bl702 lighting-app bl702 FLASH 943860 943852 -8 -0.0
RAM 15153 15153 0 0.0
bl702+mfd FLASH 946260 946252 -8 -0.0
RAM 15305 15305 0 0.0
bl702+rpc FLASH 1039180 1039172 -8 -0.0
RAM 24173 24173 0 0.0
bl706-eth FLASH 646056 646048 -8 -0.0
RAM 25241 25241 0 0.0
bl706-wifi FLASH 894048 894040 -8 -0.0
RAM 14477 14477 0 0.0
bl702l lighting-app bl702l FLASH 960520 960512 -8 -0.0
RAM 16812 16812 0 0.0
bl702l+mfd FLASH 963142 963134 -8 -0.0
RAM 16964 16964 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 677233 677241 8 0.0
RAM 78492 78492 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 697085 697093 8 0.0
RAM 81132 81132 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 697085 697093 8 0.0
RAM 81132 81132 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 654021 654029 8 0.0
RAM 73560 73560 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 613433 613441 8 0.0
RAM 71460 71460 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633069 633077 8 0.0
RAM 74004 74004 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633069 633077 8 0.0
RAM 74004 74004 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 632545 632561 16 0.0
RAM 74508 74508 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 652261 652269 8 0.0
RAM 77052 77052 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 652261 652269 8 0.0
RAM 77052 77052 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 608057 608073 16 0.0
RAM 68596 68596 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 627909 627925 16 0.0
RAM 71236 71236 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 627909 627925 16 0.0
RAM 71236 71236 0 0.0
efr32 lighting-app BRD4187C FLASH 932464 932464 0 0.0
RAM 135060 135060 0 0.0
lock-app BRD2605a FLASH 739940 739932 -8 -0.0
RAM 231212 231212 0 0.0
BRD4338a FLASH 740588 740580 -8 -0.0
RAM 231244 231244 0 0.0
window-app BRD4187C FLASH 1015500 1015492 -8 -0.0
RAM 127000 127000 0 0.0
esp32 all-clusters-app c3devkit DRAM 94168 94168 0 0.0
FLASH 1539596 1539588 -8 -0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115112 115112 0 0.0
FLASH 1549894 1549898 4 0.0
IRAM 117039 117039 0 0.0
linux chip-tool-ipv6only arm64 unknown 20384 20384 0 0.0
FLASH 11341508 11341540 32 0.0
RAM 612376 612376 0 0.0
thermostat-no-ble arm64 unknown 9336 9336 0 0.0
FLASH 4333156 4333204 48 0.0
RAM 242400 242400 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915168 915172 4 0.0
RAM 142272 142272 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886464 886468 4 0.0
RAM 140411 140411 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846520 846528 8 0.0
RAM 141090 141090 0 0.0
nxp contact k32w0+release FLASH 580500 580500 0 0.0
RAM 70720 70720 0 0.0
k32w1+release FLASH 593256 593264 8 0.0
RAM 62560 62560 0 0.0
mcxw71+release FLASH 593008 593016 8 0.0
RAM 62560 62560 0 0.0
light k32w0+release FLASH 616296 616312 16 0.0
RAM 70184 70184 0 0.0
k32w1+release FLASH 679504 679512 8 0.0
RAM 48176 48176 0 0.0
mcxw71+release FLASH 679504 679512 8 0.0
RAM 48176 48176 0 0.0
lock k32w1+release FLASH 701816 701824 8 0.0
RAM 66716 66716 0 0.0
mcxw71+release FLASH 701824 701832 8 0.0
RAM 66716 66716 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646988 1647004 16 0.0
RAM 210968 210968 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1550612 1550628 16 0.0
RAM 207680 207680 0 0.0
light cy8ckit_062s2_43012 FLASH 1466436 1466436 0 0.0
RAM 200672 200672 0 0.0
lock cy8ckit_062s2_43012 FLASH 1462956 1462956 0 0.0
RAM 225024 225024 0 0.0
qpg lighting-app qpg6105+debug FLASH 659060 659068 8 0.0
RAM 105220 105220 0 0.0
lock-app qpg6105+debug FLASH 616968 616976 8 0.0
RAM 99688 99688 0 0.0
stm32 light STM32WB5MM-DK FLASH 480544 480552 8 0.0
RAM 144676 144676 0 0.0
tizen all-clusters-app arm unknown 4852 4852 0 0.0
FLASH 1724808 1724828 20 0.0
RAM 89608 89608 0 0.0
chip-tool-ubsan arm unknown 10284 10284 0 0.0
FLASH 17532010 17532058 48 0.0
RAM 7609740 7609756 16 0.0

Copy link

github-actions bot commented Sep 13, 2024

PR #35580: Size comparison from 7789409 to c9ccaff

Full report (82 builds for bl602, bl702, bl702l, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 7789409 c9ccaff change % change
bl602 lighting-app bl602 FLASH 1278156 1278180 24 0.0
RAM 95832 95832 0 0.0
bl602+mfd FLASH 1292010 1292034 24 0.0
RAM 95968 95968 0 0.0
bl602+rpc FLASH 1317120 1317144 24 0.0
RAM 104256 104256 0 0.0
bl702 lighting-app bl702 FLASH 943860 943854 -6 -0.0
RAM 15153 15153 0 0.0
bl702+mfd FLASH 946260 946254 -6 -0.0
RAM 15305 15305 0 0.0
bl702+rpc FLASH 1039180 1039174 -6 -0.0
RAM 24173 24173 0 0.0
bl706-eth FLASH 646056 646050 -6 -0.0
RAM 25241 25241 0 0.0
bl706-wifi FLASH 894048 894042 -6 -0.0
RAM 14477 14477 0 0.0
bl702l lighting-app bl702l FLASH 960520 960514 -6 -0.0
RAM 16812 16812 0 0.0
bl702l+mfd FLASH 963142 963136 -6 -0.0
RAM 16964 16964 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 677233 677241 8 0.0
RAM 78492 78492 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 697085 697093 8 0.0
RAM 81132 81132 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 697085 697093 8 0.0
RAM 81132 81132 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 654021 654029 8 0.0
RAM 73560 73560 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 613433 613441 8 0.0
RAM 71460 71460 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633069 633077 8 0.0
RAM 74004 74004 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633069 633077 8 0.0
RAM 74004 74004 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 632545 632561 16 0.0
RAM 74508 74508 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 652261 652269 8 0.0
RAM 77052 77052 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 652261 652269 8 0.0
RAM 77052 77052 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 608057 608073 16 0.0
RAM 68596 68596 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 627909 627925 16 0.0
RAM 71236 71236 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 627909 627925 16 0.0
RAM 71236 71236 0 0.0
efr32 lighting-app BRD4187C FLASH 932464 932464 0 0.0
RAM 135060 135060 0 0.0
lock-app BRD2605a FLASH 739940 739932 -8 -0.0
RAM 231212 231212 0 0.0
BRD4338a FLASH 740588 740580 -8 -0.0
RAM 231244 231244 0 0.0
window-app BRD4187C FLASH 1015500 1015492 -8 -0.0
RAM 127000 127000 0 0.0
esp32 all-clusters-app c3devkit DRAM 94168 94168 0 0.0
FLASH 1539596 1539590 -6 -0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115112 115112 0 0.0
FLASH 1549894 1549910 16 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2771087 2771113 26 0.0
RAM 128928 128928 0 0.0
all-clusters-app debug unknown 5456 5456 0 0.0
FLASH 6082608 6082634 26 0.0
RAM 514432 514432 0 0.0
all-clusters-minimal-app debug unknown 5352 5352 0 0.0
FLASH 5406670 5406696 26 0.0
RAM 240784 240784 0 0.0
bridge-app debug unknown 5336 5336 0 0.0
FLASH 4740144 4740170 26 0.0
RAM 217824 217824 0 0.0
chip-tool debug unknown 5888 5888 0 0.0
FLASH 12676228 12676254 26 0.0
RAM 562250 562250 0 0.0
chip-tool-ipv6only arm64 unknown 20384 20384 0 0.0
FLASH 11341508 11341540 32 0.0
RAM 612376 612376 0 0.0
fabric-admin debug unknown 5720 5720 0 0.0
FLASH 10978783 10978807 24 0.0
RAM 561306 561306 0 0.0
fabric-bridge-app debug unknown 4568 4568 0 0.0
FLASH 4562880 4562906 26 0.0
RAM 204440 204440 0 0.0
lighting-app debug+rpc+ui unknown 5984 5984 0 0.0
FLASH 5676465 5676481 16 0.0
RAM 228112 228112 0 0.0
lock-app debug unknown 5272 5272 0 0.0
FLASH 4789428 4789454 26 0.0
RAM 203912 203912 0 0.0
ota-provider-app debug unknown 4648 4648 0 0.0
FLASH 4422612 4422636 24 0.0
RAM 197616 197616 0 0.0
ota-requestor-app debug unknown 4584 4584 0 0.0
FLASH 4561356 4561380 24 0.0
RAM 202184 202184 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3107773 3107805 32 0.0
RAM 159624 159624 0 0.0
thermostat-no-ble arm64 unknown 9336 9336 0 0.0
FLASH 4333156 4333204 48 0.0
RAM 242400 242400 0 0.0
tv-app debug unknown 5552 5552 0 0.0
FLASH 6022117 6022133 16 0.0
RAM 587104 587104 0 0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 10883789 10883805 16 0.0
RAM 650224 650224 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915168 915172 4 0.0
RAM 142272 142272 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886464 886468 4 0.0
RAM 140411 140411 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846520 846528 8 0.0
RAM 141090 141090 0 0.0
nxp contact k32w0+release FLASH 580500 580500 0 0.0
RAM 70720 70720 0 0.0
k32w1+release FLASH 593256 593264 8 0.0
RAM 62560 62560 0 0.0
mcxw71+release FLASH 593008 593016 8 0.0
RAM 62560 62560 0 0.0
light k32w0+release FLASH 616296 616312 16 0.0
RAM 70184 70184 0 0.0
k32w1+release FLASH 679504 679512 8 0.0
RAM 48176 48176 0 0.0
mcxw71+release FLASH 679504 679512 8 0.0
RAM 48176 48176 0 0.0
lock k32w1+release FLASH 701816 701824 8 0.0
RAM 66716 66716 0 0.0
mcxw71+release FLASH 701824 701832 8 0.0
RAM 66716 66716 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646988 1647004 16 0.0
RAM 210968 210968 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1550612 1550628 16 0.0
RAM 207680 207680 0 0.0
light cy8ckit_062s2_43012 FLASH 1466436 1466436 0 0.0
RAM 200672 200672 0 0.0
lock cy8ckit_062s2_43012 FLASH 1462956 1462956 0 0.0
RAM 225024 225024 0 0.0
qpg lighting-app qpg6105+debug FLASH 659060 659068 8 0.0
RAM 105220 105220 0 0.0
lock-app qpg6105+debug FLASH 616968 616976 8 0.0
RAM 99688 99688 0 0.0
stm32 light STM32WB5MM-DK FLASH 480544 480552 8 0.0
RAM 144676 144676 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 621690 621684 -6 -0.0
RAM 50964 50964 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 688192 688186 -6 -0.0
RAM 148400 148400 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 779878 779872 -6 -0.0
RAM 110768 110768 0 0.0
bridge-app tlsr9258a FLASH 680710 680704 -6 -0.0
RAM 91620 91620 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621454 621448 -6 -0.0
RAM 50916 50916 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 707390 707384 -6 -0.0
RAM 74256 74256 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 624608 624602 -6 -0.0
RAM 144292 144292 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 810016 810010 -6 -0.0
RAM 99424 99424 0 0.0
lock-app-dfu tlsr9528a FLASH 655210 655204 -6 -0.0
RAM 66976 66976 0 0.0
ota-requestor-app tlsr9258a FLASH 696686 696680 -6 -0.0
RAM 91212 91212 0 0.0
pump-app-usb tlsr9518adk80d FLASH 633042 633036 -6 -0.0
RAM 55792 55792 0 0.0
pump-controller-app tlsr9518adk80d FLASH 610232 610226 -6 -0.0
RAM 53036 53036 0 0.0
shell tlsr9518adk80d FLASH 467176 467170 -6 -0.0
RAM 68668 68668 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 628236 628230 -6 -0.0
RAM 52636 52636 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 652368 652362 -6 -0.0
RAM 56584 56584 0 0.0
thermostat tlsr9518adk80d FLASH 636966 636960 -6 -0.0
RAM 53440 53440 0 0.0
window-covering tlsr9118bdk40d FLASH 523142 523136 -6 -0.0
RAM 97268 97268 0 0.0
tizen all-clusters-app arm unknown 4852 4852 0 0.0
FLASH 1724808 1724824 16 0.0
RAM 89608 89608 0 0.0
chip-tool-ubsan arm unknown 10284 10284 0 0.0
FLASH 17532010 17532050 40 0.0
RAM 7609740 7609756 16 0.0

@Alami-Amine Alami-Amine changed the title fixing ubsan issues in all-clusters-app Fixing UBSan issues that showed up in all-clusters app Sep 13, 2024
src/lib/support/CHIPMemString.h Outdated Show resolved Hide resolved
src/lib/support/BufferWriter.cpp Outdated Show resolved Hide resolved
Error Message: BufferWriter.cpp:76:16: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long')

when size becomes 0 and we are in while (size-- > 0), then size will become less than 0, which should be avoided since it is an unsigned (although technically it wraps around, UBSAN complains about it).
Fix: stop size from decrement past 0, by moving size-- inside the loop
Error Message: CHIPMemString.h:88:22: runtime error: null pointer passed as argument 2, which is declared to never be null

when PI= is in mDNS TXT record (its value is empty) , and Dnssd::Internal::GetPairingInstruction calls CopyString, source is an empty bytespan and source.data() will return a null pointer, that will be passed to memcpy
Fix: avoid memcpy in that case.
Copy link

github-actions bot commented Sep 15, 2024

PR #35580: Size comparison from a068855 to 557bdf9

Full report (82 builds for bl602, bl702, bl702l, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section a068855 557bdf9 change % change
bl602 lighting-app bl602 FLASH 1278156 1278180 24 0.0
RAM 95832 95832 0 0.0
bl602+mfd FLASH 1292010 1292034 24 0.0
RAM 95968 95968 0 0.0
bl602+rpc FLASH 1317120 1317144 24 0.0
RAM 104256 104256 0 0.0
bl702 lighting-app bl702 FLASH 943860 943854 -6 -0.0
RAM 15153 15153 0 0.0
bl702+mfd FLASH 946260 946254 -6 -0.0
RAM 15305 15305 0 0.0
bl702+rpc FLASH 1039180 1039174 -6 -0.0
RAM 24173 24173 0 0.0
bl706-eth FLASH 646056 646050 -6 -0.0
RAM 25241 25241 0 0.0
bl706-wifi FLASH 894048 894042 -6 -0.0
RAM 14477 14477 0 0.0
bl702l lighting-app bl702l FLASH 960520 960514 -6 -0.0
RAM 16812 16812 0 0.0
bl702l+mfd FLASH 963142 963136 -6 -0.0
RAM 16964 16964 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 677233 677241 8 0.0
RAM 78492 78492 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 697085 697093 8 0.0
RAM 81132 81132 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 697085 697093 8 0.0
RAM 81132 81132 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 654021 654029 8 0.0
RAM 73560 73560 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 613433 613441 8 0.0
RAM 71460 71460 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633069 633077 8 0.0
RAM 74004 74004 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633069 633077 8 0.0
RAM 74004 74004 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 632545 632561 16 0.0
RAM 74508 74508 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 652261 652269 8 0.0
RAM 77052 77052 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 652261 652269 8 0.0
RAM 77052 77052 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 608057 608073 16 0.0
RAM 68596 68596 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 627909 627925 16 0.0
RAM 71236 71236 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 627909 627925 16 0.0
RAM 71236 71236 0 0.0
efr32 lighting-app BRD4187C FLASH 932464 932464 0 0.0
RAM 135060 135060 0 0.0
lock-app BRD2605a FLASH 739940 739932 -8 -0.0
RAM 231212 231212 0 0.0
BRD4338a FLASH 740588 740580 -8 -0.0
RAM 231244 231244 0 0.0
window-app BRD4187C FLASH 1015500 1015492 -8 -0.0
RAM 127000 127000 0 0.0
esp32 all-clusters-app c3devkit DRAM 94168 94168 0 0.0
FLASH 1539596 1539590 -6 -0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115112 115112 0 0.0
FLASH 1549894 1549910 16 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2771087 2771113 26 0.0
RAM 128928 128928 0 0.0
all-clusters-app debug unknown 5456 5456 0 0.0
FLASH 6082608 6082634 26 0.0
RAM 514432 514432 0 0.0
all-clusters-minimal-app debug unknown 5352 5352 0 0.0
FLASH 5406670 5406696 26 0.0
RAM 240784 240784 0 0.0
bridge-app debug unknown 5336 5336 0 0.0
FLASH 4740144 4740170 26 0.0
RAM 217824 217824 0 0.0
chip-tool debug unknown 5888 5888 0 0.0
FLASH 12676228 12676254 26 0.0
RAM 562250 562250 0 0.0
chip-tool-ipv6only arm64 unknown 20384 20384 0 0.0
FLASH 11341508 11341540 32 0.0
RAM 612376 612376 0 0.0
fabric-admin debug unknown 5720 5720 0 0.0
FLASH 10978783 10978807 24 0.0
RAM 561306 561306 0 0.0
fabric-bridge-app debug unknown 4568 4568 0 0.0
FLASH 4562880 4562906 26 0.0
RAM 204440 204440 0 0.0
lighting-app debug+rpc+ui unknown 5984 5984 0 0.0
FLASH 5676465 5676481 16 0.0
RAM 228112 228112 0 0.0
lock-app debug unknown 5272 5272 0 0.0
FLASH 4789428 4789454 26 0.0
RAM 203912 203912 0 0.0
ota-provider-app debug unknown 4648 4648 0 0.0
FLASH 4422612 4422636 24 0.0
RAM 197616 197616 0 0.0
ota-requestor-app debug unknown 4584 4584 0 0.0
FLASH 4561356 4561380 24 0.0
RAM 202184 202184 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3107773 3107805 32 0.0
RAM 159624 159624 0 0.0
thermostat-no-ble arm64 unknown 9336 9336 0 0.0
FLASH 4333156 4333204 48 0.0
RAM 242400 242400 0 0.0
tv-app debug unknown 5552 5552 0 0.0
FLASH 6022117 6022133 16 0.0
RAM 587104 587104 0 0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 10883789 10883805 16 0.0
RAM 650224 650224 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915168 915172 4 0.0
RAM 142272 142272 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886464 886468 4 0.0
RAM 140411 140411 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846520 846528 8 0.0
RAM 141090 141090 0 0.0
nxp contact k32w0+release FLASH 580500 580500 0 0.0
RAM 70720 70720 0 0.0
k32w1+release FLASH 593256 593264 8 0.0
RAM 62560 62560 0 0.0
mcxw71+release FLASH 593008 593016 8 0.0
RAM 62560 62560 0 0.0
light k32w0+release FLASH 616296 616312 16 0.0
RAM 70184 70184 0 0.0
k32w1+release FLASH 679504 679512 8 0.0
RAM 48176 48176 0 0.0
mcxw71+release FLASH 679504 679512 8 0.0
RAM 48176 48176 0 0.0
lock k32w1+release FLASH 701816 701824 8 0.0
RAM 66716 66716 0 0.0
mcxw71+release FLASH 701824 701832 8 0.0
RAM 66716 66716 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646988 1647004 16 0.0
RAM 210968 210968 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1550612 1550628 16 0.0
RAM 207680 207680 0 0.0
light cy8ckit_062s2_43012 FLASH 1466436 1466436 0 0.0
RAM 200672 200672 0 0.0
lock cy8ckit_062s2_43012 FLASH 1462956 1462956 0 0.0
RAM 225024 225024 0 0.0
qpg lighting-app qpg6105+debug FLASH 659060 659068 8 0.0
RAM 105220 105220 0 0.0
lock-app qpg6105+debug FLASH 616968 616976 8 0.0
RAM 99688 99688 0 0.0
stm32 light STM32WB5MM-DK FLASH 480544 480552 8 0.0
RAM 144676 144676 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 621690 621684 -6 -0.0
RAM 50964 50964 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 688192 688186 -6 -0.0
RAM 148400 148400 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 779878 779872 -6 -0.0
RAM 110768 110768 0 0.0
bridge-app tlsr9258a FLASH 680710 680704 -6 -0.0
RAM 91620 91620 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621454 621448 -6 -0.0
RAM 50916 50916 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 707390 707384 -6 -0.0
RAM 74256 74256 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 624608 624602 -6 -0.0
RAM 144292 144292 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 810016 810010 -6 -0.0
RAM 99424 99424 0 0.0
lock-app-dfu tlsr9528a FLASH 655210 655204 -6 -0.0
RAM 66976 66976 0 0.0
ota-requestor-app tlsr9258a FLASH 696686 696680 -6 -0.0
RAM 91212 91212 0 0.0
pump-app-usb tlsr9518adk80d FLASH 633042 633036 -6 -0.0
RAM 55792 55792 0 0.0
pump-controller-app tlsr9518adk80d FLASH 610232 610226 -6 -0.0
RAM 53036 53036 0 0.0
shell tlsr9518adk80d FLASH 467176 467170 -6 -0.0
RAM 68668 68668 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 628236 628230 -6 -0.0
RAM 52636 52636 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 652368 652362 -6 -0.0
RAM 56584 56584 0 0.0
thermostat tlsr9518adk80d FLASH 636966 636960 -6 -0.0
RAM 53440 53440 0 0.0
window-covering tlsr9118bdk40d FLASH 523142 523136 -6 -0.0
RAM 97268 97268 0 0.0
tizen all-clusters-app arm unknown 4852 4852 0 0.0
FLASH 1724808 1724824 16 0.0
RAM 89608 89608 0 0.0
chip-tool-ubsan arm unknown 10284 10284 0 0.0
FLASH 17532010 17532050 40 0.0
RAM 7609740 7609756 16 0.0

@andy31415 andy31415 merged commit 5a9e314 into project-chip:master Sep 17, 2024
68 checks passed
yyzhong-g pushed a commit to yyzhong-g/connectedhomeip that referenced this pull request Dec 12, 2024
…35580)

* Fix for unsigned integer overflow:
Error Message: BufferWriter.cpp:76:16: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long')

when size becomes 0 and we are in while (size-- > 0), then size will become less than 0, which should be avoided since it is an unsigned (although technically it wraps around, UBSAN complains about it).
Fix: stop size from decrement past 0, by moving size-- inside the loop

* Fix null pointer passed to non-null argument in CHIPMemString.h
Error Message: CHIPMemString.h:88:22: runtime error: null pointer passed as argument 2, which is declared to never be null

when PI= is in mDNS TXT record (its value is empty) , and Dnssd::Internal::GetPairingInstruction calls CopyString, source is an empty bytespan and source.data() will return a null pointer, that will be passed to memcpy
Fix: avoid memcpy in that case.
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.

5 participants