> cast delete-fabric 2 [1733797281.645956][39425:39425] CHIP:EVL: LogEvent event number: 0x0000000000010003 priority: 1, endpoint id: 0x0 cluster id: 0x0000_0028 event id: 0x2 Epoch timestamp: 0x00000193AE5EFF6D [1733797281.645995][39425:39425] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet [1733797281.659261][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.662521][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.666583][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.669539][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.672435][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.675056][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.675085][39425:39425] CHIP:FP: Fabric (0x2) deleted. [1733797281.675097][39425:39425] CHIP:SVR: PersistenceManager::OnFabricRemoved called for fabricIndex: 2 [1733797281.675113][39425:39425] CHIP:SVR: PersistenceManager::ReadAllVideoPlayers called [1733797281.675263][39425:39425] CHIP:SVR: PersistenceManager::ReadAllVideoPlayers Read TLV(CastingData) from KVS store with size: 210 bytes [1733797281.675290][39425:39425] CHIP:SVR: PersistenceManager::ReadAllVideoPlayers TLV(CastingData) version: 1 [1733797281.675313][39425:39425] CHIP:-: TargetVideoPlayerInfo nodeId=0xFFFFFFEFFFFFFFFF fabricIndex=2 [1733797281.675336][39425:39425] CHIP:SVR: PersistenceManager::ReadAllVideoPlayers Video player read count: 1 [1733797281.675339][39425:39425] CHIP:SVR: PersistenceManager::OnFabricRemoved removing video player with nodeId: 0xFFFFFFEFFFFFFFFF from cache [1733797281.675341][39425:39425] CHIP:-: TargetVideoPlayerInfo Reset() called [1733797281.675346][39425:39425] CHIP:SVR: PersistenceManager::WriteAllVideoPlayers called [1733797281.675352][39425:39425] CHIP:SVR: PersistenceManager::WriteAllVideoPlayers TLV(CastingData).LengthWritten: 8 bytes, video player count: 0 and version: 1 [1733797281.678267][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.683935][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.686014][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.688244][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.690411][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.692812][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.694946][39425:39425] CHIP:DL: Wrote settings to /tmp/chip_casting_kvs [1733797281.694988][39425:39425] CHIP:IM: Fabric removed, deleting obsolete read client with FabricIndex: 2 [1733797281.694994][39425:39425] CHIP:DMG: MoveToState ReadClient[0x6f0fa7834cc0]: Moving to [ Idle] [1733797281.695012][39425:39425] CHIP:SVR: OnCurrentStateReadResponseFailure called with src/app/InteractionModelEngine.cpp:1943: CHIP Error 0x000000A1: The fabric is deleted, and the corresponding IM resources are released ../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/InteractionModelEngine.cpp:1938:102: runtime error: member call on address 0x6f0fa7834cc0 which does not point to an object of type 'chip::app::ReadClient' 0x6f0fa7834cc0: note: object has invalid vptr 00 00 00 00 e6 6c 01 00 00 00 00 00 90 f0 9c 15 c1 5d 00 00 08 dd 64 14 c1 5d 00 00 c0 4c 83 a7 ^~~~~~~~~~~~~~~~~~~~~~~ invalid vptr SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/InteractionModelEngine.cpp:1938:102 ../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/ReadClient.h:398:43: runtime error: member access within address 0x6f0fa7834cc0 which does not point to an object of type 'chip::app::ReadClient' 0x6f0fa7834cc0: note: object has invalid vptr 00 00 00 00 e6 6c 01 00 00 00 00 00 90 f0 9c 15 c1 5d 00 00 08 dd 64 14 c1 5d 00 00 c0 4c 83 a7 ^~~~~~~~~~~~~~~~~~~~~~~ invalid vptr SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/ReadClient.h:398:43 ================================================================= ==39425==ERROR: AddressSanitizer: heap-use-after-free on address 0x6f0fa7834d80 at pc 0x5dc11425e65f bp 0x7fffbe39a200 sp 0x7fffbe39a1f8 READ of size 8 at 0x6f0fa7834d80 thread T0 #0 0x5dc11425e65e in chip::app::ReadClient::GetNextClient() /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/ReadClient.h:398:43 #1 0x5dc110fd2d7c in __sanitizer::BufferedStackTrace::UnwindImpl(unsigned long, unsigned long, void*, bool, unsigned int) ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_stack.cpp #2 0x5dc110f35c96 in Unwind ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_stacktrace.h:130:5 #3 0x5dc110f35c96 in __asan::ErrorGeneric::Print() ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_errors.cpp:602:3 #4 0x5dc110fcc72f in __asan::ScopedInErrorReport::~ScopedInErrorReport() ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_report.cpp:144:50 #5 0x5dc110fcfd66 in __asan::ReportGenericError(unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned long, unsigned int, bool) ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_report.cpp:498:1 #6 0x5dc110fd0c45 in __asan_report_load8 ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:131:1 0x6f0fa7834d80 is located 192 bytes inside of 352-byte region [0x6f0fa7834cc0,0x6f0fa7834e20) freed by thread T0 here: #0 0x5dc110fc7b56 in free ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:51:3 #1 0x5dc1137ca60d in chip::Platform::MemoryFree(void*) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/lib/support/CHIPMem-Malloc.cpp:116:5 #2 0x5dc113420138 in void chip::Platform::Delete(chip::app::ReadClient*) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/lib/support/CHIPMem.h:169:5 #3 0x5dc11341ff92 in chip::Platform::Deleter::operator()(chip::app::ReadClient*) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/lib/support/CHIPMem.h:175:30 #4 0x5dc11341ff1e in std::__2::unique_ptr>::reset[abi:nn200000](chip::app::ReadClient*) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__memory/unique_ptr.h:285:7 #5 0x5dc11341fd81 in std::__2::unique_ptr>::operator=[abi:nn200000](std::nullptr_t) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__memory/unique_ptr.h:257:5 #6 0x5dc113447b25 in chip::Controller::TypedReadAttributeCallback::~TypedReadAttributeCallback() /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/controller/TypedReadCallback.h:75:21 #7 0x5dc113447983 in void chip::Platform::Delete>(chip::Controller::TypedReadAttributeCallback*) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/lib/support/CHIPMem.h:168:9 #8 0x5dc113447823 in chip::ChipError chip::Controller::detail::ReportAttribute(chip::Messaging::ExchangeManager*, unsigned short, unsigned int, unsigned int, chip::Controller::detail::ReportAttributeParams&&, chip::Optional const&)::'lambda'(chip::Controller::TypedReadAttributeCallback*)::operator()(chip::Controller::TypedReadAttributeCallback*) const /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/controller/ReadInteraction.h:77:9 #9 0x5dc1134476aa in decltype(std::declval()(std::declval*>())) std::__2::__invoke[abi:nn200000](chip::Messaging::ExchangeManager*, unsigned short, unsigned int, unsigned int, chip::Controller::detail::ReportAttributeParams&&, chip::Optional const&)::'lambda'(chip::Controller::TypedReadAttributeCallback*)&, chip::Controller::TypedReadAttributeCallback*>(chip::app::Clusters::MediaPlayback::PlaybackStateEnum&&, chip::Controller::TypedReadAttributeCallback*&&) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__type_traits/invoke.h:149:25 #10 0x5dc1134475e0 in void std::__2::__invoke_void_return_wrapper::__call[abi:nn200000](chip::Messaging::ExchangeManager*, unsigned short, unsigned int, unsigned int, chip::Controller::detail::ReportAttributeParams&&, chip::Optional const&)::'lambda'(chip::Controller::TypedReadAttributeCallback*)&, chip::Controller::TypedReadAttributeCallback*>(chip::ChipError chip::Controller::detail::ReportAttribute(chip::Messaging::ExchangeManager*, unsigned short, unsigned int, unsigned int, chip::Controller::detail::ReportAttributeParams&&, chip::Optional const&)::'lambda'(chip::Controller::TypedReadAttributeCallback*)&, chip::Controller::TypedReadAttributeCallback*&&) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__type_traits/invoke.h:224:5 #11 0x5dc1134474cb in std::__2::__function::__default_alloc_func(chip::Messaging::ExchangeManager*, unsigned short, unsigned int, unsigned int, chip::Controller::detail::ReportAttributeParams&&, chip::Optional const&)::'lambda'(chip::Controller::TypedReadAttributeCallback*), void (chip::Controller::TypedReadAttributeCallback*)>::operator()[abi:nn200000](chip::Controller::TypedReadAttributeCallback*&&) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:211:12 #12 0x5dc113447261 in void std::__2::__function::__policy_invoker*)>::__call_impl[abi:nn200000](chip::Messaging::ExchangeManager*, unsigned short, unsigned int, unsigned int, chip::Controller::detail::ReportAttributeParams&&, chip::Optional const&)::'lambda'(chip::Controller::TypedReadAttributeCallback*), void (chip::Controller::TypedReadAttributeCallback*)>>(std::__2::__function::__policy_storage const*, chip::Controller::TypedReadAttributeCallback*) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:611:12 #13 0x5dc11344c90e in std::__2::__function::__policy_func*)>::operator()[abi:nn200000](chip::Controller::TypedReadAttributeCallback*&&) const /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:717:12 #14 0x5dc11344c6aa in std::__2::function*)>::operator()(chip::Controller::TypedReadAttributeCallback*) const /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:990:10 #15 0x5dc11344b516 in chip::Controller::TypedReadAttributeCallback::OnDone(chip::app::ReadClient*) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/controller/TypedReadCallback.h:127:47 #16 0x5dc11393395a in chip::app::BufferedReadCallback::OnDone(chip::app::ReadClient*) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/BufferedReadCallback.h:85:72 #17 0x5dc11438fa8d in chip::app::ReadClient::Close(chip::ChipError, bool) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/ReadClient.cpp:235:16 #18 0x5dc114292c19 in chip::app::InteractionModelEngine::OnFabricRemoved(chip::FabricTable const&, unsigned char) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/InteractionModelEngine.cpp:1943:25 #19 0x5dc1140cb37f in chip::FabricTable::Delete(unsigned char) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/credentials/FabricTable.cpp:1048:23 #20 0x5dc112d9d578 in chip::Shell::CastingHandler(int, char**) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/CastingShellCommands.cpp:293:54 #21 0x5dc11458dcfe in chip::Shell::Engine::ExecCommand(int, char**) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/lib/shell/Engine.cpp:97:26 #22 0x5dc1145894f4 in (anonymous namespace)::ProcessShellLine(long) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/lib/shell/MainLoopDefault.cpp:167:44 #23 0x5dc113e05db0 in chip::DeviceLayer::Internal::GenericPlatformManagerImpl::_DispatchEvent(chip::DeviceLayer::ChipDeviceEvent const*) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/include/platform/internal/GenericPlatformManagerImpl.ipp:304:9 #24 0x5dc113e0a19b in chip::DeviceLayer::PlatformManager::DispatchEvent(chip::DeviceLayer::ChipDeviceEvent const*) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/include/platform/PlatformManager.h:507:37 #25 0x5dc113e09859 in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX::ProcessDeviceEvents() /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:185:17 #26 0x5dc113e08d06 in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX::_RunEventLoop() /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:227:9 #27 0x5dc11135aea3 in chip::DeviceLayer::PlatformManager::RunEventLoop() /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/include/platform/PlatformManager.h:407:37 #28 0x5dc11135890b in main /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/main.cpp:175:32 #29 0x71dfa8829d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 previously allocated by thread T0 here: #0 0x5dc110fc7df4 in malloc ../../../../../../llvm-llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:67:3 #1 0x5dc1137ca406 in chip::Platform::MemoryAlloc(unsigned long) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/lib/support/CHIPMem-Malloc.cpp:96:12 #2 0x5dc113428b7a in chip::app::ReadClient* chip::Platform::New(chip::app::InteractionModelEngine*&, chip::Messaging::ExchangeManager*&, chip::app::BufferedReadCallback&, chip::app::ReadClient::InteractionType&) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/lib/support/CHIPMem.h:145:16 #3 0x5dc11341b42b in std::__2::unique_ptr> chip::Platform::MakeUnique(chip::app::InteractionModelEngine*&, chip::Messaging::ExchangeManager*&, chip::app::BufferedReadCallback&, chip::app::ReadClient::InteractionType&) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/lib/support/CHIPMem.h:184:25 #4 0x5dc113442e57 in chip::ChipError chip::Controller::detail::ReportAttribute(chip::Messaging::ExchangeManager*, unsigned short, unsigned int, unsigned int, chip::Controller::detail::ReportAttributeParams&&, chip::Optional const&) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/controller/ReadInteraction.h:86:9 #5 0x5dc113440c36 in chip::ChipError chip::Controller::SubscribeAttribute(chip::Messaging::ExchangeManager*, chip::SessionHandle const&, unsigned short, unsigned int, unsigned int, chip::Controller::TypedReadAttributeCallback::OnSuccessCallbackType, chip::Controller::TypedReadAttributeCallback::OnErrorCallbackType, unsigned short, unsigned short, chip::Controller::TypedReadAttributeCallback::OnSubscriptionEstablishedCallbackType, chip::Controller::TypedReadAttributeCallback::OnResubscriptionAttemptCallbackType, bool, bool, chip::Optional const&, std::__2::function) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/controller/ReadInteraction.h:180:12 #6 0x5dc11343fe63 in chip::ChipError chip::Controller::ClusterBase::SubscribeAttribute(void*, unsigned int, unsigned int, void (*)(void*, chip::app::Clusters::MediaPlayback::PlaybackStateEnum), void (*)(void*, chip::ChipError), unsigned short, unsigned short, void (*)(void*, unsigned int), void (*)(void*, chip::ChipError, unsigned int), bool, bool, chip::Optional const&, std::__2::function) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/controller/CHIPCluster.h:318:16 #7 0x5dc11343f2ae in chip::ChipError chip::Controller::ClusterBase::SubscribeAttribute(void*, void (*)(void*, chip::app::Clusters::MediaPlayback::Attributes::CurrentState::TypeInfo::DecodableArgType), void (*)(void*, chip::ChipError), unsigned short, unsigned short, void (*)(void*, unsigned int), void (*)(void*, chip::ChipError, unsigned int), bool, bool, chip::Optional const&, std::__2::function) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/controller/CHIPCluster.h:272:16 #8 0x5dc113407873 in MediaSubscriptionBase::SubscribeAttribute(void*, void (*)(void*, chip::app::Clusters::MediaPlayback::PlaybackStateEnum), void (*)(void*, chip::ChipError), unsigned short, unsigned short, void (*)(void*, unsigned int)) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/examples/tv-casting-app/tv-casting-common/include/MediaSubscriptionBase.h:40:33 #9 0x5dc113406a58 in CastingServer::MediaPlayback_SubscribeToCurrentState(TargetEndpointInfo*, void*, void (*)(void*, chip::app::Clusters::MediaPlayback::PlaybackStateEnum), void (*)(void*, chip::ChipError), unsigned short, unsigned short, void (*)(void*, unsigned int)) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp:995:36 #10 0x5dc111009062 in doCastingDemoActions(TargetEndpointInfo*) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/CastingUtils.cpp:187:60 #11 0x5dc1110045c1 in OnNewOrUpdatedEndpoint(TargetEndpointInfo*) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/CastingUtils.cpp:252:5 #12 0x5dc111017601 in decltype(std::declval()(std::declval())) std::__2::__invoke[abi:nn200000](void (*&)(TargetEndpointInfo*), TargetEndpointInfo*&&) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__type_traits/invoke.h:149:25 #13 0x5dc111017500 in void std::__2::__invoke_void_return_wrapper::__call[abi:nn200000](void (*&)(TargetEndpointInfo*), TargetEndpointInfo*&&) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__type_traits/invoke.h:224:5 #14 0x5dc1110173eb in std::__2::__function::__default_alloc_func::operator()[abi:nn200000](TargetEndpointInfo*&&) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:211:12 #15 0x5dc111017184 in void std::__2::__function::__policy_invoker::__call_impl[abi:nn200000]>(std::__2::__function::__policy_storage const*, TargetEndpointInfo*) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:611:12 #16 0x5dc11343b6be in std::__2::__function::__policy_func::operator()[abi:nn200000](TargetEndpointInfo*&&) const /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:717:12 #17 0x5dc1133fd78a in std::__2::function::operator()(TargetEndpointInfo*) const /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:990:10 #18 0x5dc1133fa669 in CastingServer::OnDescriptorReadSuccessResponse(void*, chip::app::DataModel::DecodableList const&) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp:422:9 #19 0x5dc11342a646 in chip::ChipError chip::Controller::ClusterBase::ReadAttribute, chip::app::DataModel::DecodableList const&>(void*, unsigned int, unsigned int, void (*)(void*, chip::app::DataModel::DecodableList const&), void (*)(void*, chip::ChipError), bool)::'lambda'(chip::app::ConcreteAttributePath const&, chip::app::DataModel::DecodableList const&)::operator()(chip::app::ConcreteAttributePath const&, chip::app::DataModel::DecodableList const&) const /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/controller/CHIPCluster.h:244:17 #20 0x5dc11342a42c in decltype(std::declval, chip::app::DataModel::DecodableList const&>(void*, unsigned int, unsigned int, void (*)(void*, chip::app::DataModel::DecodableList const&), void (*)(void*, chip::ChipError), bool)::'lambda'(chip::app::ConcreteAttributePath const&, chip::app::DataModel::DecodableList const&)&>()(std::declval(), std::declval const&>())) std::__2::__invoke[abi:nn200000], chip::app::DataModel::DecodableList const&>(void*, unsigned int, unsigned int, void (*)(void*, chip::app::DataModel::DecodableList const&), void (*)(void*, chip::ChipError), bool)::'lambda'(chip::app::ConcreteAttributePath const&, chip::app::DataModel::DecodableList const&)&, chip::app::ConcreteDataAttributePath const&, chip::app::DataModel::DecodableList const&>(chip::ChipError chip::Controller::ClusterBase::ReadAttribute, chip::app::DataModel::DecodableList const&>(void*, unsigned int, unsigned int, void (*)(void*, chip::app::DataModel::DecodableList const&), void (*)(void*, chip::ChipError), bool)::'lambda'(chip::app::ConcreteAttributePath const&, chip::app::DataModel::DecodableList const&)&, chip::app::ConcreteDataAttributePath const&, chip::app::DataModel::DecodableList const&) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__type_traits/invoke.h:149:25 #21 0x5dc11342a25f in void std::__2::__invoke_void_return_wrapper::__call[abi:nn200000], chip::app::DataModel::DecodableList const&>(void*, unsigned int, unsigned int, void (*)(void*, chip::app::DataModel::DecodableList const&), void (*)(void*, chip::ChipError), bool)::'lambda'(chip::app::ConcreteAttributePath const&, chip::app::DataModel::DecodableList const&)&, chip::app::ConcreteDataAttributePath const&, chip::app::DataModel::DecodableList const&>(chip::ChipError chip::Controller::ClusterBase::ReadAttribute, chip::app::DataModel::DecodableList const&>(void*, unsigned int, unsigned int, void (*)(void*, chip::app::DataModel::DecodableList const&), void (*)(void*, chip::ChipError), bool)::'lambda'(chip::app::ConcreteAttributePath const&, chip::app::DataModel::DecodableList const&)&, chip::app::ConcreteDataAttributePath const&, chip::app::DataModel::DecodableList const&) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__type_traits/invoke.h:224:5 #22 0x5dc11342a0da in std::__2::__function::__default_alloc_func, chip::app::DataModel::DecodableList const&>(void*, unsigned int, unsigned int, void (*)(void*, chip::app::DataModel::DecodableList const&), void (*)(void*, chip::ChipError), bool)::'lambda'(chip::app::ConcreteAttributePath const&, chip::app::DataModel::DecodableList const&), void (chip::app::ConcreteDataAttributePath const&, chip::app::DataModel::DecodableList const&)>::operator()[abi:nn200000](chip::app::ConcreteDataAttributePath const&, chip::app::DataModel::DecodableList const&) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:211:12 #23 0x5dc113429e41 in void std::__2::__function::__policy_invoker const&)>::__call_impl[abi:nn200000], chip::app::DataModel::DecodableList const&>(void*, unsigned int, unsigned int, void (*)(void*, chip::app::DataModel::DecodableList const&), void (*)(void*, chip::ChipError), bool)::'lambda'(chip::app::ConcreteAttributePath const&, chip::app::DataModel::DecodableList const&), void (chip::app::ConcreteDataAttributePath const&, chip::app::DataModel::DecodableList const&)>>(std::__2::__function::__policy_storage const*, chip::app::ConcreteDataAttributePath const&, chip::app::DataModel::DecodableList const&) /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:611:12 #24 0x5dc1134263bc in std::__2::__function::__policy_func const&)>::operator()[abi:nn200000](chip::app::ConcreteDataAttributePath const&, chip::app::DataModel::DecodableList const&) const /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:717:12 #25 0x5dc113425e4a in std::__2::function const&)>::operator()(chip::app::ConcreteDataAttributePath const&, chip::app::DataModel::DecodableList const&) const /home/kcw/Matter/connectedhomeip/.environment/cipd/packages/pigweed/bin/../include/c++/v1/__functional/function.h:990:10 #26 0x5dc11342328e in chip::Controller::TypedReadAttributeCallback>::OnAttributeData(chip::app::ConcreteDataAttributePath const&, chip::TLV::TLVReader*, chip::app::StatusIB const&) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/controller/TypedReadCallback.h:107:9 #27 0x5dc11392d381 in chip::app::BufferedReadCallback::DispatchBufferedData(chip::app::ConcreteAttributePath const&, chip::app::StatusIB const&, bool) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/BufferedReadCallback.cpp:220:15 #28 0x5dc11392bd07 in chip::app::BufferedReadCallback::OnReportEnd() /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/BufferedReadCallback.cpp:39:22 #29 0x5dc1143a1251 in chip::app::ReadClient::ProcessReportData(chip::System::PacketBufferHandle&&, chip::app::ReadClient::ReportType) /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/ReadClient.cpp:683:20 SUMMARY: AddressSanitizer: heap-use-after-free /home/kcw/Matter/connectedhomeip/out/linux-x64-tv-casting-app-asan-ubsan-clang/../../examples/tv-casting-app/linux/third_party/connectedhomeip/src/app/ReadClient.h:398:43 in chip::app::ReadClient::GetNextClient() Shadow bytes around the buggy address: 0x6f0fa7834b00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x6f0fa7834b80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x6f0fa7834c00: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa 0x6f0fa7834c80: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x6f0fa7834d00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x6f0fa7834d80:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x6f0fa7834e00: fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa 0x6f0fa7834e80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x6f0fa7834f00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x6f0fa7834f80: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa 0x6f0fa7835000: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==39425==ABORTING