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

iox-#1575 Properly initialize ServiceRegistry in shared memory #1583

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**

Expand Down
4 changes: 1 addition & 3 deletions iceoryx_posh/source/roudi/port_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ServiceRegistry*>(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);
})
Expand Down