Skip to content

Sonar test#1

Open
silabs-ArghyaD wants to merge 3 commits into
mainfrom
sonar-test
Open

Sonar test#1
silabs-ArghyaD wants to merge 3 commits into
mainfrom
sonar-test

Conversation

@silabs-ArghyaD
Copy link
Copy Markdown
Owner

Summary

Related issues

Testing

Readability checklist

The checklist below will help the reviewer finish PR review in time and keep the
code readable:

  • PR title is
    descriptive
  • Apply the
    “When in Rome…”
    rule (coding style)
  • PR size is short
  • Try to avoid "squashing" and "force-update" in commit history
  • CI time didn't increase

See: Pull Request Guidelines

silabs-ArghyaD pushed a commit that referenced this pull request Aug 22, 2025
From https://github.com/project-chip/connectedhomeip/actions/runs/15194288746/job/42737814688:

```
2025-05-22T20:37:05.0327720Z WARNING: ThreadSanitizer: data race (pid=29252)
2025-05-22T20:37:05.0327900Z   Read of size 8 at 0x7b5000047358 by thread T42:
2025-05-22T20:37:05.0328160Z     #0 -[MTRDevice_Concrete state] <null> (Matter:x86_64+0x1a86673)
2025-05-22T20:37:05.0328690Z     #1 -[MTRDevice_Concrete _performScheduledTimeUpdate] <null> (Matter:x86_64+0x1a32c83)
...
2025-05-22T20:37:05.0330160Z   Previous write of size 8 at 0x7b5000047358 by thread T44:
2025-05-22T20:37:05.0330470Z     #0 -[MTRDevice_Concrete _changeState:] <null> (Matter:x86_64+0x1a3a64c)
2025-05-22T20:37:05.0330990Z     #1 -[MTRDevice_Concrete _handleUnsolicitedMessageFromPublisher] <null> (Matter:x86_64+0x1a41bee)
```

Co-authored-by: Andrei Litvin <andy314@gmail.com>
silabs-ArghyaD pushed a commit that referenced this pull request Oct 16, 2025
* Fix ActiveTCPConnectionState being leaked when CASE connections are closed (e.g. via ExpireAllSessionsOnLogicalFabric)

* Support multiple connections to same peer by sharing a single TCP socket

* Unit test with multiple connections, to simulate SessionManager

* Use automatic ref-counting throughout; limit visibility of explicit ref/deref

* Address review comments from https://github.com/project-chip/connectedhomeip/pull/40817/files

* Address review comments from https://github.com/project-chip/connectedhomeip/pull/40817/files

* Additional review comments & fixes

* Check for invalid nullptr input

* * Tighten/hide usage of ref-counting internals, using new method names to catch wrong usages of manual ref counting
* Use a consistent Free() for all inet connections which does clean-up such as closing the connections before freeing memory back to pool

* Apply clang tidy suggestions

* Apply review suggestions

* Undo simplification; this was likely intended to force  memory allocation on the matter thread

* Apply review suggestions

* Go back to using && and std::move as previous impl did (EndPointHandle now has a move operator/ctor)

* Make call to HandleAcceptError explicit, as that's all we're doing anyway, and set mAppState
Remove unnecessary initialization as it's now done @ top of method
Fixes CI failure:

==68889==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000030 (pc 0x000104884514 bp 0x00016b642490 sp 0x00016b642410 T0)
==68889==The signal is caused by a READ memory access.
==68889==Hint: address points to the zero page.
    #0 0x104884514 in chip::Transport::TCPBase::FindActiveConnection(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&) TCP.cpp:205
    #1 0x1048826a8 in chip::Transport::TCPBase::HandleAcceptError(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::ChipError) TCP.cpp:664
    #2 0x10488181c in chip::Transport::TCPBase::HandleIncomingConnection(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::Inet::IPAddress const&, unsigned short) TCP.cpp:623
    #3 0x1048b3328 in chip::Inet::TCPEndPointImplSockets::HandleIncomingConnection() TCPEndPointImplSockets.cpp:1066
    #4 0x1048b13ac in chip::Inet::TCPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) TCPEndPointImplSockets.cpp:797
    #5 0x1048a96a8 in chip::Inet::TCPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) TCPEndPointImplSockets.cpp:783
    #6 0x10493f870 in chip::System::LayerImplDispatch::SocketWatch::HandleEvents(chip::System::LayerImplDispatch::SelectSets const&) const SystemLayerImplDispatchSockets.mm:245
    #7 0x10493e800 in chip::System::LayerImplDispatch::SocketWatchPool::HandleEvents(chip::System::LayerImplDispatch::SelectSets const&) const SystemLayerImplDispatchSockets.mm:204
    #8 0x10493df84 in chip::System::LayerImplDispatch::HandleSocketsAndTimerEvents(std::__1::chrono::duration<unsigned int, std::__1::ratio<1l, 1000l>>) SystemLayerImplDispatchSockets.mm:172
    #9 0x104930e28 in chip::System::LayerImplDispatch::HandleDispatchQueueEvents(std::__1::chrono::duration<unsigned int, std::__1::ratio<1l, 1000l>>) SystemLayerImplDispatch.mm:298

* Fix errors merging to head

* Apply code review suggestion
silabs-ArghyaD pushed a commit that referenced this pull request Oct 16, 2025
* [NXP] enable mbedtls 3.x for mcxw72 (#41443)

* [NXP][cmake][mcxw72] Enable Mbedtls 3.x

Signed-off-by: Marius Preda <marius.preda@nxp.com>

* Update nxp submodules

Signed-off-by: Martin Girardot <martin.girardot@nxp.com>

* Restyled by clang-format

* Fix PR comment

Signed-off-by: Martin Girardot <martin.girardot@nxp.com>

* Restyled by clang-format

---------

Signed-off-by: Marius Preda <marius.preda@nxp.com>
Signed-off-by: Martin Girardot <martin.girardot@nxp.com>
Co-authored-by: Marius Preda <marius.preda@nxp.com>
Co-authored-by: Restyled.io <commits@restyled.io>

* Generate TimeSync cluster using Alchemy (#41446)

* [Realtek] add CONFIG_DAC_KEY_ENC (#41421)

* [Realtek] add CONFIG_DAC_KEY_ENC

* [Realtek] Improve code maintainability

* Add more unit tests for `SoftwareDiagnostics` cluster (#41246)

* Test `ResetWatermarks` command execution.

* Add event generation testing (kindof)

* Add comments

* Add event generation testing for `SoftwareDiagnosticsCluster`

* Add a `GetProvider` function to `ScopedDiagnosticsProvider` and small fixes

* Restyled by whitespace

* Restyled by clang-format

* Restyled by gn

* Use `strlen` instead of `sizeof`

* Shutdown the cluster

---------

Co-authored-by: Restyled.io <commits@restyled.io>

* Bump third_party/imgui/repo from `ee3d16f` to `5af650f` (#41435)

Bumps [third_party/imgui/repo](https://github.com/ocornut/imgui) from `ee3d16f` to `5af650f`.
- [Release notes](https://github.com/ocornut/imgui/releases)
- [Commits](ocornut/imgui@ee3d16f...5af650f)

---
updated-dependencies:
- dependency-name: third_party/imgui/repo
  dependency-version: 5af650fc6d27daf585edbd9ac872465f756a65e9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump third_party/simw-top-mini/repo from `5c42397` to `d712a48` (#41432)

Bumps [third_party/simw-top-mini/repo](https://github.com/NXP/plug-and-trust) from `5c42397` to `d712a48`.
- [Release notes](https://github.com/NXP/plug-and-trust/releases)
- [Commits](NXP/plug-and-trust@5c42397...d712a48)

---
updated-dependencies:
- dependency-name: third_party/simw-top-mini/repo
  dependency-version: d712a48071b0efe437786851fbe63aaaa913cd72
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump third_party/libwebsockets/repo from `388b1d3` to `edc6a44` (#41434)

Bumps [third_party/libwebsockets/repo](https://github.com/warmcat/libwebsockets) from `388b1d3` to `edc6a44`.
- [Commits](warmcat/libwebsockets@388b1d3...edc6a44)

---
updated-dependencies:
- dependency-name: third_party/libwebsockets/repo
  dependency-version: edc6a44ea2f779a7291b8b155a2152cfd05ba863
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump third_party/ot-br-posix/repo from `eb30645` to `e9b1f3c` (#41431)

Bumps [third_party/ot-br-posix/repo](https://github.com/openthread/ot-br-posix) from `eb30645` to `e9b1f3c`.
- [Release notes](https://github.com/openthread/ot-br-posix/releases)
- [Commits](openthread/ot-br-posix@eb30645...e9b1f3c)

---
updated-dependencies:
- dependency-name: third_party/ot-br-posix/repo
  dependency-version: e9b1f3c3d93eb104c1f3ad6fc1785dd185256061
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [NXP] Ensuring that Python always uses UTF-8 encoding when invoked from CMakeLists.txt (#41445)

This change addresses potential parsing issues that can occur in environments
where the system's default encoding differs from UTF-8.

Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com>

* Revert "Parallelize submodule checkout (#41335)" (#41425)

This reverts commit 82e6d0e.

Signed-off-by: Maciej Grela <enki@fsck.pl>

* Various AccessControl cluster cleanups: (#41420)

* Remove redundant namespace prefixes that are covered by existing "using".
* Fix references to "logging" or "sending" events to talk about generating them.
* Consistently use kRootEndpointId for events.

* Migrate Localization Configuration cluster to be code driven (#40717)

* [Localization Configuration]: Migrate Localization Configuration cluster to be code driven.

* Update zap and regen

* Restyler

* Removed redundent destroy.

* Update API return type and documentation.

* Add an api to set default locale.

* Remove separate logic files, add some error handeling.

* Move FeatureMap and ClusterRevision to external and zap regen

* Use new integration with error handeling.

* Zap regen

* Fix build

* Fix CI

* Fix conflicts

* Use RAII and update error return.

* rebase

* Bump github/codeql-action from 3 to 4 (#41433)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [Ameba] Update docker image (#41303)

* Updated the guides for code driven writing_clusters (#41409)

* Updated the guides for code driven writing_clusters

- More checkmark-list for migration (easier to follow)
- Added details for EventInfo and layout/design
- Overall readability updates

* Self-review: wording update

* Add guidance on PRs for easy review.

* More details on the renames.

* Restyle.

* Remove line split on strings (#41449)

* Remove line split on strings

* Trying to get past the Restyler

* More Restyler faking out

* Restyler

* Generate PowerTopology cluster with Alchemy (#41388)

* Groupcast cluster server skeleton. (#41132)

* Groupcast cluster server skeleton.

* Code review.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Address issue#41311 (#41415)

* Followup to TCP changes in pr/40817 (#40904)

* Fix ActiveTCPConnectionState being leaked when CASE connections are closed (e.g. via ExpireAllSessionsOnLogicalFabric)

* Support multiple connections to same peer by sharing a single TCP socket

* Unit test with multiple connections, to simulate SessionManager

* Use automatic ref-counting throughout; limit visibility of explicit ref/deref

* Address review comments from https://github.com/project-chip/connectedhomeip/pull/40817/files

* Address review comments from https://github.com/project-chip/connectedhomeip/pull/40817/files

* Additional review comments & fixes

* Check for invalid nullptr input

* * Tighten/hide usage of ref-counting internals, using new method names to catch wrong usages of manual ref counting
* Use a consistent Free() for all inet connections which does clean-up such as closing the connections before freeing memory back to pool

* Apply clang tidy suggestions

* Apply review suggestions

* Undo simplification; this was likely intended to force  memory allocation on the matter thread

* Apply review suggestions

* Go back to using && and std::move as previous impl did (EndPointHandle now has a move operator/ctor)

* Make call to HandleAcceptError explicit, as that's all we're doing anyway, and set mAppState
Remove unnecessary initialization as it's now done @ top of method
Fixes CI failure:

==68889==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000030 (pc 0x000104884514 bp 0x00016b642490 sp 0x00016b642410 T0)
==68889==The signal is caused by a READ memory access.
==68889==Hint: address points to the zero page.
    #0 0x104884514 in chip::Transport::TCPBase::FindActiveConnection(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&) TCP.cpp:205
    #1 0x1048826a8 in chip::Transport::TCPBase::HandleAcceptError(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::ChipError) TCP.cpp:664
    #2 0x10488181c in chip::Transport::TCPBase::HandleIncomingConnection(chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::Inet::EndPointHandle<chip::Inet::TCPEndPoint> const&, chip::Inet::IPAddress const&, unsigned short) TCP.cpp:623
    #3 0x1048b3328 in chip::Inet::TCPEndPointImplSockets::HandleIncomingConnection() TCPEndPointImplSockets.cpp:1066
    #4 0x1048b13ac in chip::Inet::TCPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) TCPEndPointImplSockets.cpp:797
    #5 0x1048a96a8 in chip::Inet::TCPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) TCPEndPointImplSockets.cpp:783
    #6 0x10493f870 in chip::System::LayerImplDispatch::SocketWatch::HandleEvents(chip::System::LayerImplDispatch::SelectSets const&) const SystemLayerImplDispatchSockets.mm:245
    #7 0x10493e800 in chip::System::LayerImplDispatch::SocketWatchPool::HandleEvents(chip::System::LayerImplDispatch::SelectSets const&) const SystemLayerImplDispatchSockets.mm:204
    #8 0x10493df84 in chip::System::LayerImplDispatch::HandleSocketsAndTimerEvents(std::__1::chrono::duration<unsigned int, std::__1::ratio<1l, 1000l>>) SystemLayerImplDispatchSockets.mm:172
    #9 0x104930e28 in chip::System::LayerImplDispatch::HandleDispatchQueueEvents(std::__1::chrono::duration<unsigned int, std::__1::ratio<1l, 1000l>>) SystemLayerImplDispatch.mm:298

* Fix errors merging to head

* Apply code review suggestion

* binding: move bind cluster structures and classes namespace to chip::app::Clusters and add accessingFabricIndex parameter for ListAttributeWriteNotification (#41423)

* binding: move bind cluster namespace

* Update examples/light-switch-app/infineon/cyw30739/src/AppShellCommands.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* typo fix

* Restyled by clang-format

* reserve ForNode and ForGroup functions for Binding::TableEntry

* Restyled by clang-format

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>

* Generate ICDManagement cluster with Alchemy (#41353)

* ACL Extension Event fix (#41454)

* Removed ACL Extension event from data models where ACL extension feature is not enabled, regenerated .matter files

* reverted the m5 stack submodule

* Darwin: Expose MTRSetupPayload subPayloads and concatenated properties (#41450)

* Darwin: Expose MTRSetupPayload subPayloads and concatenated properties

Re-generate the qrCodeString from the actual sub-payloads on demand. This means
sub-payloads can be mutated without requiring special handling or API.

Attempting to mutate a concatenated payload object as if it wasn't concatenated
drops the subsequent payloads, i.e. legacy code that is unaware of concatenated
codes (but uses MTRSetupPayload in a mutable way) will simply work on the first
payload.

Expand the tests for concatenated codes.

* restyle

* Update src/darwin/Framework/CHIP/MTRSetupPayload.mm

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/darwin/Framework/CHIP/MTRSetupPayload.h

Co-authored-by: terafin <jwood@me.com>

* Update src/darwin/Framework/CHIP/MTRSetupPayload.h

Co-authored-by: terafin <jwood@me.com>

* Apply suggestion from @woody-apple

* Apply suggestion from @woody-apple

---------

Co-authored-by: Justin Wood <woody@apple.com>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
Co-authored-by: terafin <jwood@me.com>

* [SL-ONLY] Regenerate ZAP files for Silabs apps

---------

Signed-off-by: Marius Preda <marius.preda@nxp.com>
Signed-off-by: Martin Girardot <martin.girardot@nxp.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com>
Signed-off-by: Maciej Grela <enki@fsck.pl>
Co-authored-by: Martin Girardot <165289184+Martin-NXP@users.noreply.github.com>
Co-authored-by: Marius Preda <marius.preda@nxp.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Moises Terrones <moises.tersal@gmail.com>
Co-authored-by: Realtek-pankore <86098180+pankore@users.noreply.github.com>
Co-authored-by: Hayk Khachatryan <69189182+Hayk10002@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gatien Chapon <43855183+chapongatien@users.noreply.github.com>
Co-authored-by: Maciej Grela <enki@fsck.pl>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
Co-authored-by: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com>
Co-authored-by: Andrei Litvin <andy314@gmail.com>
Co-authored-by: marktrayer <m.trayer@samsung.com>
Co-authored-by: Ricardo Casallas <77841255+rcasallas-silabs@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Marcos B <15697303+gmarcosb@users.noreply.github.com>
Co-authored-by: Wang Qixiang <43193572+wqx6@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com>
Co-authored-by: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com>
Co-authored-by: Justin Wood <woody@apple.com>
Co-authored-by: terafin <jwood@me.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
silabs-ArghyaD pushed a commit that referenced this pull request Dec 4, 2025
* Batch #1 nodiscard errors: tests

* Fix CI failures & merge head

* Fix CI

* Fix tizen CI

* Clang tidy

* Fix CI after clang tidy fix

* Clang tidy
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity.

@github-actions github-actions Bot added the Stale label Dec 31, 2025
silabs-ArghyaD pushed a commit that referenced this pull request Feb 9, 2026
* Batch #1 nodiscard errors: tests

* Fix CI failures & merge head

* Fix CI

* Fix tizen CI

* Clang tidy

* Fix CI after clang tidy fix

* Clang tidy
silabs-ArghyaD pushed a commit that referenced this pull request Apr 8, 2026
…e rename) (#43135)

* Rename

* Restyled by whitespace

---------

Co-authored-by: Restyled.io <commits@restyled.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant