未验证 提交 6aecfbac 编写于 作者: L lishengming14 提交者: Gitee

update ipc/native/src/core/source/ipc_process_skeleton.cpp.

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