From 95858ca75cb827c54c17377e9b86179b8b819d9b Mon Sep 17 00:00:00 2001 From: Simon Hoinkis Date: Tue, 16 Aug 2022 10:25:00 +0200 Subject: [PATCH 1/2] iox-#1575 Call copy c'tor when publishing ServiceRegistry Signed-off-by: Simon Hoinkis --- iceoryx_posh/source/roudi/port_manager.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/iceoryx_posh/source/roudi/port_manager.cpp b/iceoryx_posh/source/roudi/port_manager.cpp index 753469d002..68a7b8bdfa 100644 --- a/iceoryx_posh/source/roudi/port_manager.cpp +++ b/iceoryx_posh/source/roudi/port_manager.cpp @@ -1051,10 +1051,8 @@ void PortManager::publishServiceRegistry() const noexcept CHUNK_NO_USER_HEADER_SIZE, CHUNK_NO_USER_HEADER_ALIGNMENT) .and_then([&](auto& chunk) { - auto sample = static_cast(chunk->userPayload()); - // It's ok to copy as the modifications happen in the same thread and not concurrently - *sample = m_serviceRegistry; + new (chunk->userPayload()) ServiceRegistry(m_serviceRegistry); publisher.sendChunk(chunk); }) From 47c7e9659a5c98e9140408a7f04e66be4a6fe18e Mon Sep 17 00:00:00 2001 From: Simon Hoinkis Date: Tue, 16 Aug 2022 10:28:33 +0200 Subject: [PATCH 2/2] iox-#1575 Add release note entry for publishServiceRegistry bugfix Signed-off-by: Simon Hoinkis --- doc/website/release-notes/iceoryx-unreleased.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/website/release-notes/iceoryx-unreleased.md b/doc/website/release-notes/iceoryx-unreleased.md index 74f9f7f7dc..d982cc83fa 100644 --- a/doc/website/release-notes/iceoryx-unreleased.md +++ b/doc/website/release-notes/iceoryx-unreleased.md @@ -43,6 +43,7 @@ - The testing libs are broken for in source tree usage [\#1528](https://github.com/eclipse-iceoryx/iceoryx/issues/1528) - This bug was not part of a release but introduce during the v3 development - Add "inline" keyword to smart_lock method implementation [\#1551](https://github.com/eclipse-iceoryx/iceoryx/issues/1551) +- Fix RouDi crash due to uninitialized `ServiceRegistry` chunk [\#1575](https://github.com/eclipse-iceoryx/iceoryx/issues/1575) **Refactoring:**