cppcheck built from the main branch currently segfaults when run with "--enable=all" for the code below (stripped down to the minimum code required for the segfault to appear). The segfault disappears when the two INFO() lines are removed. INFO() is a logging macro.
This does not happen for cppcheck2.1.
Hi,
cppcheck built from the main branch currently segfaults when run with "--enable=all" for the code below (stripped down to the minimum code required for the segfault to appear). The segfault disappears when the two INFO() lines are removed. INFO() is a logging macro.
This does not happen for cppcheck2.1.
Could you please check?
Thanks,
Martin
Checking SessionWorker.cpp ...
Segmentation fault (core dumped) .
void SessionWorker::processSessionDataFinishReason()
{
if(m_SessionRetries < SESSION_RETRIES)
{
if(m_CurrentSession->isSessionSuccess())
{
std::string nextSession = s_NextSessionMap[m_CurrentSession->getSessionType()];
if(nextSession.empty())
{
requestStopThread();
}
else
{
INFO(std::string{"Current session: "} + m_CurrentSession->getSessionType());
INFO(std::string{"Next session: "} + nextSession);
}
}
}
}
Thanks! I can reproduce. I created ticket https://trac.cppcheck.net/ticket/9882