提交 aec2ecda 编写于 作者: L lishengming14

fixed 6aecfbac from https://gitee.com/lsm2647119362/communication_ipc/pulls/697

update ipc/native/src/core/source/ipc_process_skeleton.cpp.
IPC UT测试阻塞用例修改,整形溢出检查导致正常溢出流程出现崩溃
Signed-off-by: Nlishengming14 <lishengming14@h-partners.com>
上级 c2362050
......@@ -659,10 +659,10 @@ void IPCProcessSkeleton::AddDataThreadInWait(const std::thread::id &threadId)
uint64_t IPCProcessSkeleton::GetSeqNumber()
{
std::lock_guard<std::mutex> lockGuard(seqNumberMutex_);
seqNumber_++; // can be overflow, and seqNumber do not use 0
if (seqNumber_ == 0) {
seqNumber_++;
if (seqNumber_ == std::numeric_limits<uint64_t>::max()) {
seqNumber_ = 0;
}
seqNumber_++;
return seqNumber_;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册