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

Update cxx_rules #10

Merged
merged 1 commit into from
Mar 9, 2020
Merged

Conversation

rwalker-apple
Copy link
Contributor

  • support skipping GCOV, VALGRIND, etc. with make GCOV=, etc.
  • support seeing commands with make _@=

@woody-apple woody-apple self-requested a review March 4, 2020 19:53
Copy link
Contributor

@woody-apple woody-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine we'll iterate on this a lot, but this looks like a great start to me. Approved.

@robszewczyk
Copy link
Contributor

@rwalker-apple I have a favor to ask -- we just merged the CODEOWNERS; would you mind if we close this PR and resubmit just to test that the reviewers get tagged?

@rwalker-apple
Copy link
Contributor Author

@rwalker-apple I have a favor to ask -- we just merged the CODEOWNERS; would you mind if we close this PR and resubmit just to test that the reviewers get tagged?

np, rebased

@robszewczyk
Copy link
Contributor

@rwalker-apple I have a favor to ask -- we just merged the CODEOWNERS; would you mind if we close this PR and resubmit just to test that the reviewers get tagged?

np, rebased

That worked! Thanks!

Copy link
Contributor

@robszewczyk robszewczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A feature I found helpful and useful in other build systems was to have both the brief and verbose progress in the build. This change moves us in the direction, but not all the way there. I'm happy to approve, but I'd like to understand the end point.

$(_@)$(CPPCHECK) $(Module_Test_Includes) $($(*F)_Inc_FLAGS) $<
endif
ifdef GCOV
$(_@)mv $(*F).gc* $(Test_Dir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend abstracting all shell commands into the variables (very much along the lines of $(CC), $(CLANG_FORMAT)) Makes for a slightly easier reading experience. I imagine we will be building out the build system into a richer system over time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still unclear what we are building out in terms of the build system. Are we creating a bespoke build system from scratch or iterating on something that starts with a large swath of the features we want?

It'd be good to get some alignment on this before getting too far down a particular path here.

/cc/ @turon

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, this makes GCOV a first class top-level visible aspect of code coverage. In nlbuild-autotools (a turnkey packaging of GNU autotools), there is support for the 'make coverage' target but the actual platform- and system-specific implementation decides how to carry that out, with slightly differing behavior, for example, on gcc versus clang.

Copy link
Contributor Author

@rwalker-apple rwalker-apple Mar 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree very much that we'll be iterating on (or abandoning) this. We're also evaluating cmake and we can't be sure that we won't need to leverage investments in automake.

This PR is intended to be a small, incremental improvement to aid debugging the current system.

@rwalker-apple
Copy link
Contributor Author

A feature I found helpful and useful in other build systems was to have both the brief and verbose progress in the build. This change moves us in the direction, but not all the way there. I'm happy to approve, but I'd like to understand the end point.

Yep, I agree that'd be nice to have. We don't know the end point for this system, is intended to be a starting point to get us rolling.

@rwalker-apple rwalker-apple force-pushed the Update-cxx_rules branch 2 times, most recently from 07b9bd0 to 8a5fdaf Compare March 4, 2020 21:54
@woody-apple
Copy link
Contributor

@hawk248 @chrisdecenzo Any thoughts?

@woody-apple
Copy link
Contributor

@hawk248 @chrisdecenzo We need an review + approval from one more company. Any chance you folks could help out?

Copy link
Contributor

@gerickson gerickson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved on the condition that we identify a line in the sand on when we transition to a "standing on the shoulders of giants" build system that rockets us ahead in terms of solving some basics that are being created whole cloth at the moment.

@woody-apple
Copy link
Contributor

@hawk248 Asad, any chance you can take a peek here? Thanks!

Copy link

@hawk248 hawk248 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok with override options for code coverage during lower level build. Ultimately, code coverage can be enforced outside build in a CI pipeline.

@woody-apple
Copy link
Contributor

@rwalker-apple Can we fix the merge conflict here? Thanks!

andy31415 pushed a commit that referenced this pull request Jul 9, 2022
It's not safe to access line editing state from the IO thread while
inside readline() on the main thread.

Remove the code that attempts to redraw readline after printing logs.
This avoids segfaults during logging at the cost of those logs
overwriting the prompt (this is not trivial to fix as readline
is a blocking API).

==================
WARNING: ThreadSanitizer: data race (pid=63005)
  Write of size 1 at 0x55f81c7745ff by main thread:
    #0 InteractiveStartCommand::ParseCommand(char*) ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 (chip-tool+0x874911)
    #1 InteractiveStartCommand::RunCommand() ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:85 (chip-tool+0x874594)
    #2 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:408 (chip-tool+0x83e478)
    #3 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839)
    #4 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7)
    #5 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288)
    #6 main <null> (chip-tool+0x569c0a)

  Previous read of size 1 at 0x55f81c7745ff by thread T5 (mutexes: write M185):
    #0 LoggingCallback ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:46 (chip-tool+0x874479)
    #1 chip::Logging::LogV(unsigned char, unsigned char, char const*, __va_list_tag*) ../../src/lib/support/logging/CHIPLogging.cpp:221 (chip-tool+0x8ee4dc)
    #2 chip::Logging::Log(unsigned char, unsigned char, char const*, ...) ../../src/lib/support/logging/CHIPLogging.cpp:172 (chip-tool+0x8ee30a)
    #3 chip::app::ReadClient::RefreshLivenessCheckTimer() <null> (chip-tool+0x8b1746)
    #4 chip::app::ReadClient::ProcessSubscribeResponse(chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:845 (chip-tool+0x8b20ec)
    #5 chip::app::ReadClient::OnMessageReceived(chip::Messaging::ExchangeContext*, chip::PayloadHeader const&, chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:409 (chip-tool+0x8ae2a4)
    #6 chip::Messaging::ExchangeContext::HandleMessage(unsigned int, chip::PayloadHeader const&, chip::BitFlags<chip::Messaging::MessageFlagValues, unsigned int>, chip::System::PacketBufferHandle&&) <null> (chip-tool+0xa0517a)
    #7 operator()<chip::Messaging::ExchangeContext> ../../src/messaging/ExchangeMgr.cpp:219 (chip-tool+0xa08c73)
    #8 Call ../../src/lib/support/Pool.h:126 (chip-tool+0xa0912d)
    #9 chip::internal::HeapObjectList::ForEachNode(void*, chip::Loop (*)(void*, void*)) ../../src/lib/support/Pool.cpp:127 (chip-tool+0x8ee05a)
    #10 ForEachActiveObject<chip::Messaging::ExchangeManager::OnMessageReceived(const chip::PacketHeader&, const chip::PayloadHeader&, const chip::SessionHandle&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&)::<lambda(auto:2*)> > ../../src/lib/support/Pool.h:396 (chip-tool+0xa08d10)
    #11 chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SessionHandle const&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&) ../../src/messaging/ExchangeMgr.cpp:212 (chip-tool+0xa07e91)
    #12 chip::SessionManager::SecureUnicastMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:616 (chip-tool+0xa1548b)
    #13 chip::SessionManager::OnMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:443 (chip-tool+0xa14426)
    #14 chip::TransportMgrBase::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/TransportMgrBase.cpp:76 (chip-tool+0xa17dfa)
    #15 chip::Transport::Base::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/raw/Base.h:102 (chip-tool+0xb19728)
    #16 chip::Transport::UDP::OnUdpReceive(chip::Inet::UDPEndPoint*, chip::System::PacketBufferHandle&&, chip::Inet::IPPacketInfo const*) ../../src/transport/raw/UDP.cpp:122 (chip-tool+0xb1a48b)
    #17 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) ../../src/inet/UDPEndPointImplSockets.cpp:688 (chip-tool+0xb00aa0)
    #18 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) ../../src/inet/UDPEndPointImplSockets.cpp:569 (chip-tool+0xafff89)
    #19 chip::System::LayerImplSelect::HandleEvents() ../../src/system/SystemLayerImplSelect.cpp:406 (chip-tool+0xb07563)
    #20 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:181 (chip-tool+0x98a227)
    #21 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75)
    #22 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c)

  Location is global '(anonymous namespace)::gIsCommandRunning' of size 1 at 0x55f81c7745ff (chip-tool+0x000000c485ff)

  Mutex M185 (0x55f81c776180) created at:
    #0 pthread_mutex_lock ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4240 (libtsan.so.0+0x4f30a)
    #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_LockChipStack() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:78 (chip-tool+0x989e90)
    #2 chip::DeviceLayer::PlatformManager::LockChipStack() ../../src/include/platform/PlatformManager.h:410 (chip-tool+0x988fa5)
    #3 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:170 (chip-tool+0x98a147)
    #4 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75)
    #5 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c)

  Thread T5 (tid=63013, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x5ad75)
    #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_StartEventLoopTask() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:231 (chip-tool+0x98a40a)
    #2 chip::DeviceLayer::PlatformManager::StartEventLoopTask() ../../src/include/platform/PlatformManager.h:375 (chip-tool+0xaacca2)
    #3 chip::Controller::DeviceControllerFactory::ServiceEvents() ../../src/controller/CHIPDeviceControllerFactory.cpp:331 (chip-tool+0xab0417)
    #4 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:403 (chip-tool+0x83e353)
    #5 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839)
    #6 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7)
    #7 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288)
    #8 main <null> (chip-tool+0x569c0a)

SUMMARY: ThreadSanitizer: data race ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 in InteractiveStartCommand::ParseCommand(char*)
==================
github-actions bot pushed a commit that referenced this pull request Jul 9, 2022
It's not safe to access line editing state from the IO thread while
inside readline() on the main thread.

Remove the code that attempts to redraw readline after printing logs.
This avoids segfaults during logging at the cost of those logs
overwriting the prompt (this is not trivial to fix as readline
is a blocking API).

==================
WARNING: ThreadSanitizer: data race (pid=63005)
  Write of size 1 at 0x55f81c7745ff by main thread:
    #0 InteractiveStartCommand::ParseCommand(char*) ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 (chip-tool+0x874911)
    #1 InteractiveStartCommand::RunCommand() ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:85 (chip-tool+0x874594)
    #2 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:408 (chip-tool+0x83e478)
    #3 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839)
    #4 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7)
    #5 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288)
    #6 main <null> (chip-tool+0x569c0a)

  Previous read of size 1 at 0x55f81c7745ff by thread T5 (mutexes: write M185):
    #0 LoggingCallback ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:46 (chip-tool+0x874479)
    #1 chip::Logging::LogV(unsigned char, unsigned char, char const*, __va_list_tag*) ../../src/lib/support/logging/CHIPLogging.cpp:221 (chip-tool+0x8ee4dc)
    #2 chip::Logging::Log(unsigned char, unsigned char, char const*, ...) ../../src/lib/support/logging/CHIPLogging.cpp:172 (chip-tool+0x8ee30a)
    #3 chip::app::ReadClient::RefreshLivenessCheckTimer() <null> (chip-tool+0x8b1746)
    #4 chip::app::ReadClient::ProcessSubscribeResponse(chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:845 (chip-tool+0x8b20ec)
    #5 chip::app::ReadClient::OnMessageReceived(chip::Messaging::ExchangeContext*, chip::PayloadHeader const&, chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:409 (chip-tool+0x8ae2a4)
    #6 chip::Messaging::ExchangeContext::HandleMessage(unsigned int, chip::PayloadHeader const&, chip::BitFlags<chip::Messaging::MessageFlagValues, unsigned int>, chip::System::PacketBufferHandle&&) <null> (chip-tool+0xa0517a)
    #7 operator()<chip::Messaging::ExchangeContext> ../../src/messaging/ExchangeMgr.cpp:219 (chip-tool+0xa08c73)
    #8 Call ../../src/lib/support/Pool.h:126 (chip-tool+0xa0912d)
    #9 chip::internal::HeapObjectList::ForEachNode(void*, chip::Loop (*)(void*, void*)) ../../src/lib/support/Pool.cpp:127 (chip-tool+0x8ee05a)
    #10 ForEachActiveObject<chip::Messaging::ExchangeManager::OnMessageReceived(const chip::PacketHeader&, const chip::PayloadHeader&, const chip::SessionHandle&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&)::<lambda(auto:2*)> > ../../src/lib/support/Pool.h:396 (chip-tool+0xa08d10)
    #11 chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SessionHandle const&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&) ../../src/messaging/ExchangeMgr.cpp:212 (chip-tool+0xa07e91)
    #12 chip::SessionManager::SecureUnicastMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:616 (chip-tool+0xa1548b)
    #13 chip::SessionManager::OnMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:443 (chip-tool+0xa14426)
    #14 chip::TransportMgrBase::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/TransportMgrBase.cpp:76 (chip-tool+0xa17dfa)
    #15 chip::Transport::Base::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/raw/Base.h:102 (chip-tool+0xb19728)
    #16 chip::Transport::UDP::OnUdpReceive(chip::Inet::UDPEndPoint*, chip::System::PacketBufferHandle&&, chip::Inet::IPPacketInfo const*) ../../src/transport/raw/UDP.cpp:122 (chip-tool+0xb1a48b)
    #17 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) ../../src/inet/UDPEndPointImplSockets.cpp:688 (chip-tool+0xb00aa0)
    #18 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) ../../src/inet/UDPEndPointImplSockets.cpp:569 (chip-tool+0xafff89)
    #19 chip::System::LayerImplSelect::HandleEvents() ../../src/system/SystemLayerImplSelect.cpp:406 (chip-tool+0xb07563)
    #20 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:181 (chip-tool+0x98a227)
    #21 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75)
    #22 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c)

  Location is global '(anonymous namespace)::gIsCommandRunning' of size 1 at 0x55f81c7745ff (chip-tool+0x000000c485ff)

  Mutex M185 (0x55f81c776180) created at:
    #0 pthread_mutex_lock ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4240 (libtsan.so.0+0x4f30a)
    #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_LockChipStack() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:78 (chip-tool+0x989e90)
    #2 chip::DeviceLayer::PlatformManager::LockChipStack() ../../src/include/platform/PlatformManager.h:410 (chip-tool+0x988fa5)
    #3 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:170 (chip-tool+0x98a147)
    #4 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75)
    #5 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c)

  Thread T5 (tid=63013, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x5ad75)
    #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_StartEventLoopTask() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:231 (chip-tool+0x98a40a)
    #2 chip::DeviceLayer::PlatformManager::StartEventLoopTask() ../../src/include/platform/PlatformManager.h:375 (chip-tool+0xaacca2)
    #3 chip::Controller::DeviceControllerFactory::ServiceEvents() ../../src/controller/CHIPDeviceControllerFactory.cpp:331 (chip-tool+0xab0417)
    #4 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:403 (chip-tool+0x83e353)
    #5 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839)
    #6 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7)
    #7 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288)
    #8 main <null> (chip-tool+0x569c0a)

SUMMARY: ThreadSanitizer: data race ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 in InteractiveStartCommand::ParseCommand(char*)
==================
woody-apple added a commit that referenced this pull request Jul 9, 2022
It's not safe to access line editing state from the IO thread while
inside readline() on the main thread.

Remove the code that attempts to redraw readline after printing logs.
This avoids segfaults during logging at the cost of those logs
overwriting the prompt (this is not trivial to fix as readline
is a blocking API).

==================
WARNING: ThreadSanitizer: data race (pid=63005)
  Write of size 1 at 0x55f81c7745ff by main thread:
    #0 InteractiveStartCommand::ParseCommand(char*) ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 (chip-tool+0x874911)
    #1 InteractiveStartCommand::RunCommand() ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:85 (chip-tool+0x874594)
    #2 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:408 (chip-tool+0x83e478)
    #3 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839)
    #4 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7)
    #5 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288)
    #6 main <null> (chip-tool+0x569c0a)

  Previous read of size 1 at 0x55f81c7745ff by thread T5 (mutexes: write M185):
    #0 LoggingCallback ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:46 (chip-tool+0x874479)
    #1 chip::Logging::LogV(unsigned char, unsigned char, char const*, __va_list_tag*) ../../src/lib/support/logging/CHIPLogging.cpp:221 (chip-tool+0x8ee4dc)
    #2 chip::Logging::Log(unsigned char, unsigned char, char const*, ...) ../../src/lib/support/logging/CHIPLogging.cpp:172 (chip-tool+0x8ee30a)
    #3 chip::app::ReadClient::RefreshLivenessCheckTimer() <null> (chip-tool+0x8b1746)
    #4 chip::app::ReadClient::ProcessSubscribeResponse(chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:845 (chip-tool+0x8b20ec)
    #5 chip::app::ReadClient::OnMessageReceived(chip::Messaging::ExchangeContext*, chip::PayloadHeader const&, chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:409 (chip-tool+0x8ae2a4)
    #6 chip::Messaging::ExchangeContext::HandleMessage(unsigned int, chip::PayloadHeader const&, chip::BitFlags<chip::Messaging::MessageFlagValues, unsigned int>, chip::System::PacketBufferHandle&&) <null> (chip-tool+0xa0517a)
    #7 operator()<chip::Messaging::ExchangeContext> ../../src/messaging/ExchangeMgr.cpp:219 (chip-tool+0xa08c73)
    #8 Call ../../src/lib/support/Pool.h:126 (chip-tool+0xa0912d)
    #9 chip::internal::HeapObjectList::ForEachNode(void*, chip::Loop (*)(void*, void*)) ../../src/lib/support/Pool.cpp:127 (chip-tool+0x8ee05a)
    #10 ForEachActiveObject<chip::Messaging::ExchangeManager::OnMessageReceived(const chip::PacketHeader&, const chip::PayloadHeader&, const chip::SessionHandle&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&)::<lambda(auto:2*)> > ../../src/lib/support/Pool.h:396 (chip-tool+0xa08d10)
    #11 chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SessionHandle const&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&) ../../src/messaging/ExchangeMgr.cpp:212 (chip-tool+0xa07e91)
    #12 chip::SessionManager::SecureUnicastMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:616 (chip-tool+0xa1548b)
    #13 chip::SessionManager::OnMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:443 (chip-tool+0xa14426)
    #14 chip::TransportMgrBase::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/TransportMgrBase.cpp:76 (chip-tool+0xa17dfa)
    #15 chip::Transport::Base::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/raw/Base.h:102 (chip-tool+0xb19728)
    #16 chip::Transport::UDP::OnUdpReceive(chip::Inet::UDPEndPoint*, chip::System::PacketBufferHandle&&, chip::Inet::IPPacketInfo const*) ../../src/transport/raw/UDP.cpp:122 (chip-tool+0xb1a48b)
    #17 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) ../../src/inet/UDPEndPointImplSockets.cpp:688 (chip-tool+0xb00aa0)
    #18 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) ../../src/inet/UDPEndPointImplSockets.cpp:569 (chip-tool+0xafff89)
    #19 chip::System::LayerImplSelect::HandleEvents() ../../src/system/SystemLayerImplSelect.cpp:406 (chip-tool+0xb07563)
    #20 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:181 (chip-tool+0x98a227)
    #21 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75)
    #22 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c)

  Location is global '(anonymous namespace)::gIsCommandRunning' of size 1 at 0x55f81c7745ff (chip-tool+0x000000c485ff)

  Mutex M185 (0x55f81c776180) created at:
    #0 pthread_mutex_lock ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4240 (libtsan.so.0+0x4f30a)
    #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_LockChipStack() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:78 (chip-tool+0x989e90)
    #2 chip::DeviceLayer::PlatformManager::LockChipStack() ../../src/include/platform/PlatformManager.h:410 (chip-tool+0x988fa5)
    #3 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:170 (chip-tool+0x98a147)
    #4 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75)
    #5 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c)

  Thread T5 (tid=63013, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x5ad75)
    #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_StartEventLoopTask() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:231 (chip-tool+0x98a40a)
    #2 chip::DeviceLayer::PlatformManager::StartEventLoopTask() ../../src/include/platform/PlatformManager.h:375 (chip-tool+0xaacca2)
    #3 chip::Controller::DeviceControllerFactory::ServiceEvents() ../../src/controller/CHIPDeviceControllerFactory.cpp:331 (chip-tool+0xab0417)
    #4 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:403 (chip-tool+0x83e353)
    #5 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839)
    #6 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7)
    #7 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288)
    #8 main <null> (chip-tool+0x569c0a)

SUMMARY: ThreadSanitizer: data race ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 in InteractiveStartCommand::ParseCommand(char*)
==================

Co-authored-by: Michael Spang <spang@google.com>
lpbeliveau-silabs pushed a commit to lpbeliveau-silabs/connectedhomeip that referenced this pull request Sep 12, 2022
Merge in WMN_TOOLS/matter from example_newLight to silabs

Squashed commit of the following:

commit 4bf0c26bd4829ec146574c99a77e4c58d242af21
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Fri Jul 15 16:28:07 2022 -0400

    ✨ Code improvements.

commit 0cd0466e28a0e712636bce13ade7498a5ef47d3f
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Thu Jul 14 19:27:00 2022 -0400

    ⌛️ Update the light app to use the new GSDK pwm drivers.

commit dd9ecb156626b149cfdce49ec93e776499439594
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 11 20:34:22 2022 -0400

    🏗  Remove int usage and code clarifications.

commit b745a8622636a608aeb869cab0f3106ac44773aa
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 4 19:08:22 2022 -0400

    🛡  Include guards for incompatible boards.

commit 2bde7a13337f2658ec7de4d8c37e7b00821722c9
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Wed Jun 29 16:48:22 2022 -0400

    ✨ Code improvements.

commit 9fbb2497e7be70c97a70ad694e757e1009c5f837
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 27 22:07:20 2022 -0400

    🎨 Add Color Control.

commit a3640854c813350323b7be18e8b7040c5c9fdfb8
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 20 11:01:09 2022 -0400

    →← Fix merge conflict.
nipatel-silabs pushed a commit to nipatel-silabs/connectedhomeip that referenced this pull request Oct 19, 2022
Merge in WMN_TOOLS/matter from example_newLight to silabs

Squashed commit of the following:

commit 4bf0c26bd4829ec146574c99a77e4c58d242af21
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Fri Jul 15 16:28:07 2022 -0400

    ✨ Code improvements.

commit 0cd0466e28a0e712636bce13ade7498a5ef47d3f
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Thu Jul 14 19:27:00 2022 -0400

    ⌛️ Update the light app to use the new GSDK pwm drivers.

commit dd9ecb156626b149cfdce49ec93e776499439594
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 11 20:34:22 2022 -0400

    🏗  Remove int usage and code clarifications.

commit b745a8622636a608aeb869cab0f3106ac44773aa
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 4 19:08:22 2022 -0400

    🛡  Include guards for incompatible boards.

commit 2bde7a13337f2658ec7de4d8c37e7b00821722c9
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Wed Jun 29 16:48:22 2022 -0400

    ✨ Code improvements.

commit 9fbb2497e7be70c97a70ad694e757e1009c5f837
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 27 22:07:20 2022 -0400

    🎨 Add Color Control.

commit a3640854c813350323b7be18e8b7040c5c9fdfb8
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 20 11:01:09 2022 -0400

    →← Fix merge conflict.
jculbert pushed a commit to jculbert/connectedhomeip that referenced this pull request Jan 10, 2023
Merge in WMN_TOOLS/matter from example_newLight to silabs

Squashed commit of the following:

commit 4bf0c26bd4829ec146574c99a77e4c58d242af21
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Fri Jul 15 16:28:07 2022 -0400

    ✨ Code improvements.

commit 0cd0466e28a0e712636bce13ade7498a5ef47d3f
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Thu Jul 14 19:27:00 2022 -0400

    ⌛️ Update the light app to use the new GSDK pwm drivers.

commit dd9ecb156626b149cfdce49ec93e776499439594
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 11 20:34:22 2022 -0400

    🏗  Remove int usage and code clarifications.

commit b745a8622636a608aeb869cab0f3106ac44773aa
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 4 19:08:22 2022 -0400

    🛡  Include guards for incompatible boards.

commit 2bde7a13337f2658ec7de4d8c37e7b00821722c9
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Wed Jun 29 16:48:22 2022 -0400

    ✨ Code improvements.

commit 9fbb2497e7be70c97a70ad694e757e1009c5f837
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 27 22:07:20 2022 -0400

    🎨 Add Color Control.

commit a3640854c813350323b7be18e8b7040c5c9fdfb8
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 20 11:01:09 2022 -0400

    →← Fix merge conflict.
Thirsrin pushed a commit to Thirsrin/connectedhomeip that referenced this pull request Jul 12, 2023
Merge in WMN_TOOLS/matter from example_newLight to silabs

Squashed commit of the following:

commit 4bf0c26bd4829ec146574c99a77e4c58d242af21
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Fri Jul 15 16:28:07 2022 -0400

    ✨ Code improvements.

commit 0cd0466e28a0e712636bce13ade7498a5ef47d3f
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Thu Jul 14 19:27:00 2022 -0400

    ⌛️ Update the light app to use the new GSDK pwm drivers.

commit dd9ecb156626b149cfdce49ec93e776499439594
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 11 20:34:22 2022 -0400

    🏗  Remove int usage and code clarifications.

commit b745a8622636a608aeb869cab0f3106ac44773aa
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 4 19:08:22 2022 -0400

    🛡  Include guards for incompatible boards.

commit 2bde7a13337f2658ec7de4d8c37e7b00821722c9
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Wed Jun 29 16:48:22 2022 -0400

    ✨ Code improvements.

commit 9fbb2497e7be70c97a70ad694e757e1009c5f837
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 27 22:07:20 2022 -0400

    🎨 Add Color Control.

commit a3640854c813350323b7be18e8b7040c5c9fdfb8
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 20 11:01:09 2022 -0400

    →← Fix merge conflict.
shgutte pushed a commit to shgutte/connectedhomeip that referenced this pull request Oct 5, 2023
Merge in WMN_TOOLS/matter from example_newLight to silabs

Squashed commit of the following:

commit 4bf0c26bd4829ec146574c99a77e4c58d242af21
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Fri Jul 15 16:28:07 2022 -0400

    ✨ Code improvements.

commit 0cd0466e28a0e712636bce13ade7498a5ef47d3f
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Thu Jul 14 19:27:00 2022 -0400

    ⌛️ Update the light app to use the new GSDK pwm drivers.

commit dd9ecb156626b149cfdce49ec93e776499439594
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 11 20:34:22 2022 -0400

    🏗  Remove int usage and code clarifications.

commit b745a8622636a608aeb869cab0f3106ac44773aa
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 4 19:08:22 2022 -0400

    🛡  Include guards for incompatible boards.

commit 2bde7a13337f2658ec7de4d8c37e7b00821722c9
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Wed Jun 29 16:48:22 2022 -0400

    ✨ Code improvements.

commit 9fbb2497e7be70c97a70ad694e757e1009c5f837
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 27 22:07:20 2022 -0400

    🎨 Add Color Control.

commit a3640854c813350323b7be18e8b7040c5c9fdfb8
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 20 11:01:09 2022 -0400

    →← Fix merge conflict.
mergify bot pushed a commit that referenced this pull request Oct 10, 2023
…ist". (#29666)

The typical failure there looks like this:

==29620==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x106396e12 in calloc+0xa2 (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x51e12)
    #1 0x7ff800dc9789 in map_images_nolock+0x24b (libobjc.A.dylib:x86_64h+0x1789)
    #2 0x7ff800dc94db in map_images+0x42 (libobjc.A.dylib:x86_64h+0x14db)
    #3 0x113d721fa in invocation function for block in dyld4::RuntimeState::setObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*))+0x112 (dyld:x86_64+0xf1fa)
    #4 0x113d6d6c8 in dyld4::RuntimeState::withLoadersReadLock(void () block_pointer)+0x28 (dyld:x86_64+0xa6c8)
    #5 0x113d720e1 in dyld4::RuntimeState::setObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*))+0x51 (dyld:x86_64+0xf0e1)
    #6 0x113d85d44 in dyld4::APIs::_dyld_objc_notify_register(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*))+0x4e (dyld:x86_64+0x22d44)
    #7 0x7ff800dc9343 in _objc_init+0x4fe (libobjc.A.dylib:x86_64h+0x1343)
    #8 0x7ff800d83992 in _os_object_init+0xc (libdispatch.dylib:x86_64+0x2992)
    #9 0x7ff800d911b7 in libdispatch_init+0x136 (libdispatch.dylib:x86_64+0x101b7)
    #10 0x7ff80bd34894 in libSystem_initializer+0xed (libSystem.B.dylib:x86_64+0x1894)
    #11 0x113d77e4e in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const+0xb5 (dyld:x86_64+0x14e4e)
    #12 0x113d9eaac in invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const+0xf1 (dyld:x86_64+0x3baac)
    #13 0x113d95e25 in invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const+0x22c (dyld:x86_64+0x32e25)
    #14 0x113d64db2 in dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const+0x80 (dyld:x86_64+0x1db2)
    #15 0x113d95bb6 in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const+0xb2 (dyld:x86_64+0x32bb6)
    #16 0x113d9e603 in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const+0x1d1 (dyld:x86_64+0x3b603)
    #17 0x113d77d81 in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const+0x8f (dyld:x86_64+0x14d81)
    #18 0x113d7e659 in dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const+0x1d (dyld:x86_64+0x1b659)
    #19 0x113d8b76d in dyld4::APIs::runAllInitializersForMain()+0x25 (dyld:x86_64+0x2876d)
    #20 0x113d6938c in dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)+0xd72 (dyld:x86_64+0x638c)
    #21 0x113d684e3 in start+0x183 (dyld:x86_64+0x54e3)
HunsupJung pushed a commit to HunsupJung/connectedhomeip that referenced this pull request Oct 23, 2023
…ist". (project-chip#29666)

The typical failure there looks like this:

==29620==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x106396e12 in calloc+0xa2 (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x51e12)
    #1 0x7ff800dc9789 in map_images_nolock+0x24b (libobjc.A.dylib:x86_64h+0x1789)
    #2 0x7ff800dc94db in map_images+0x42 (libobjc.A.dylib:x86_64h+0x14db)
    project-chip#3 0x113d721fa in invocation function for block in dyld4::RuntimeState::setObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*))+0x112 (dyld:x86_64+0xf1fa)
    project-chip#4 0x113d6d6c8 in dyld4::RuntimeState::withLoadersReadLock(void () block_pointer)+0x28 (dyld:x86_64+0xa6c8)
    project-chip#5 0x113d720e1 in dyld4::RuntimeState::setObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*))+0x51 (dyld:x86_64+0xf0e1)
    project-chip#6 0x113d85d44 in dyld4::APIs::_dyld_objc_notify_register(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*))+0x4e (dyld:x86_64+0x22d44)
    project-chip#7 0x7ff800dc9343 in _objc_init+0x4fe (libobjc.A.dylib:x86_64h+0x1343)
    project-chip#8 0x7ff800d83992 in _os_object_init+0xc (libdispatch.dylib:x86_64+0x2992)
    project-chip#9 0x7ff800d911b7 in libdispatch_init+0x136 (libdispatch.dylib:x86_64+0x101b7)
    project-chip#10 0x7ff80bd34894 in libSystem_initializer+0xed (libSystem.B.dylib:x86_64+0x1894)
    project-chip#11 0x113d77e4e in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const+0xb5 (dyld:x86_64+0x14e4e)
    project-chip#12 0x113d9eaac in invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const+0xf1 (dyld:x86_64+0x3baac)
    project-chip#13 0x113d95e25 in invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const+0x22c (dyld:x86_64+0x32e25)
    project-chip#14 0x113d64db2 in dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const+0x80 (dyld:x86_64+0x1db2)
    project-chip#15 0x113d95bb6 in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const+0xb2 (dyld:x86_64+0x32bb6)
    project-chip#16 0x113d9e603 in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const+0x1d1 (dyld:x86_64+0x3b603)
    project-chip#17 0x113d77d81 in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const+0x8f (dyld:x86_64+0x14d81)
    project-chip#18 0x113d7e659 in dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const+0x1d (dyld:x86_64+0x1b659)
    project-chip#19 0x113d8b76d in dyld4::APIs::runAllInitializersForMain()+0x25 (dyld:x86_64+0x2876d)
    project-chip#20 0x113d6938c in dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)+0xd72 (dyld:x86_64+0x638c)
    project-chip#21 0x113d684e3 in start+0x183 (dyld:x86_64+0x54e3)
shgutte pushed a commit to shgutte/connectedhomeip that referenced this pull request Jan 11, 2024
Merge in WMN_TOOLS/matter from example_newLight to silabs

Squashed commit of the following:

commit 4bf0c26bd4829ec146574c99a77e4c58d242af21
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Fri Jul 15 16:28:07 2022 -0400

    ✨ Code improvements.

commit 0cd0466e28a0e712636bce13ade7498a5ef47d3f
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Thu Jul 14 19:27:00 2022 -0400

    ⌛️ Update the light app to use the new GSDK pwm drivers.

commit dd9ecb156626b149cfdce49ec93e776499439594
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 11 20:34:22 2022 -0400

    🏗  Remove int usage and code clarifications.

commit b745a8622636a608aeb869cab0f3106ac44773aa
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 4 19:08:22 2022 -0400

    🛡  Include guards for incompatible boards.

commit 2bde7a13337f2658ec7de4d8c37e7b00821722c9
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Wed Jun 29 16:48:22 2022 -0400

    ✨ Code improvements.

commit 9fbb2497e7be70c97a70ad694e757e1009c5f837
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 27 22:07:20 2022 -0400

    🎨 Add Color Control.

commit a3640854c813350323b7be18e8b7040c5c9fdfb8
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 20 11:01:09 2022 -0400

    →← Fix merge conflict.
suveshpratapa pushed a commit to suveshpratapa/connectedhomeip that referenced this pull request May 22, 2024
Merge in WMN_TOOLS/matter from example_newLight to silabs

Squashed commit of the following:

commit 4bf0c26bd4829ec146574c99a77e4c58d242af21
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Fri Jul 15 16:28:07 2022 -0400

    ✨ Code improvements.

commit 0cd0466e28a0e712636bce13ade7498a5ef47d3f
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Thu Jul 14 19:27:00 2022 -0400

    ⌛️ Update the light app to use the new GSDK pwm drivers.

commit dd9ecb156626b149cfdce49ec93e776499439594
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 11 20:34:22 2022 -0400

    🏗  Remove int usage and code clarifications.

commit b745a8622636a608aeb869cab0f3106ac44773aa
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 4 19:08:22 2022 -0400

    🛡  Include guards for incompatible boards.

commit 2bde7a13337f2658ec7de4d8c37e7b00821722c9
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Wed Jun 29 16:48:22 2022 -0400

    ✨ Code improvements.

commit 9fbb2497e7be70c97a70ad694e757e1009c5f837
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 27 22:07:20 2022 -0400

    🎨 Add Color Control.

commit a3640854c813350323b7be18e8b7040c5c9fdfb8
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 20 11:01:09 2022 -0400

    →← Fix merge conflict.
mykrupp pushed a commit to mykrupp/connectedhomeip that referenced this pull request Jul 18, 2024
Merge in WMN_TOOLS/matter from example_newLight to silabs

Squashed commit of the following:

commit 4bf0c26bd4829ec146574c99a77e4c58d242af21
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Fri Jul 15 16:28:07 2022 -0400

    ✨ Code improvements.

commit 0cd0466e28a0e712636bce13ade7498a5ef47d3f
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Thu Jul 14 19:27:00 2022 -0400

    ⌛️ Update the light app to use the new GSDK pwm drivers.

commit dd9ecb156626b149cfdce49ec93e776499439594
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 11 20:34:22 2022 -0400

    🏗  Remove int usage and code clarifications.

commit b745a8622636a608aeb869cab0f3106ac44773aa
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jul 4 19:08:22 2022 -0400

    🛡  Include guards for incompatible boards.

commit 2bde7a13337f2658ec7de4d8c37e7b00821722c9
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Wed Jun 29 16:48:22 2022 -0400

    ✨ Code improvements.

commit 9fbb2497e7be70c97a70ad694e757e1009c5f837
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 27 22:07:20 2022 -0400

    🎨 Add Color Control.

commit a3640854c813350323b7be18e8b7040c5c9fdfb8
Author: Elfelsoufi-SiLabs <moaminee@silabs.com>
Date:   Mon Jun 20 11:01:09 2022 -0400

    →← Fix merge conflict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants