From 1c26b25825ff77c215b70fdecc04115a2ee1baea Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 24 Oct 2023 01:30:20 +0200 Subject: [PATCH] iox-#1361 Add workaround for iox-#2055 --- iceoryx_posh/source/roudi/process_manager.cpp | 5 ++++- iceoryx_posh/source/runtime/ipc_runtime_interface.cpp | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/iceoryx_posh/source/roudi/process_manager.cpp b/iceoryx_posh/source/roudi/process_manager.cpp index bc6cb3cda2e..dda3f75247b 100644 --- a/iceoryx_posh/source/roudi/process_manager.cpp +++ b/iceoryx_posh/source/roudi/process_manager.cpp @@ -285,7 +285,10 @@ bool ProcessManager::addProcess(const RuntimeName_t& name, return false; } auto heartbeatPoolIndex = HeartbeatPool::Index::INVALID; - iox::UntypedRelativePointer::offset_t heartbeatOffset{iox::UntypedRelativePointer::NULL_POINTER_OFFSET}; + /// @todo iox-#2055 this workaround is required sind the conversion of edge cases is broken + constexpr uint8_t IOX_2055_WORKAROUND{1}; + iox::UntypedRelativePointer::offset_t heartbeatOffset{iox::UntypedRelativePointer::NULL_POINTER_OFFSET + - IOX_2055_WORKAROUND}; if (isMonitored) { auto heartbeat = m_heartbeatPool->emplace(); diff --git a/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp b/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp index 916d4643f27..35aac406913 100644 --- a/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp +++ b/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp @@ -245,7 +245,9 @@ IpcRuntimeInterface::RegAckResult IpcRuntimeInterface::waitForRegAck(int64_t tra cxx::convert::fromString(receiveBuffer.getElementAtIndex(4U).c_str(), m_segmentId); UntypedRelativePointer::offset_t heartbeatOffset{UntypedRelativePointer::NULL_POINTER_OFFSET}; cxx::convert::fromString(receiveBuffer.getElementAtIndex(5U).c_str(), heartbeatOffset); - if (heartbeatOffset != UntypedRelativePointer::NULL_POINTER_OFFSET) + /// @todo iox-#2055 this workaround is required sind the conversion of edge cases is broken + constexpr uint8_t IOX_2055_WORKAROUND{1}; + if (heartbeatOffset != (UntypedRelativePointer::NULL_POINTER_OFFSET - IOX_2055_WORKAROUND)) { m_heartbeatAddressOffset = heartbeatOffset; }