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

Various coverity-related fixes #19416

Open
wants to merge 7 commits into
base: candidate-9.10.x
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions helm/hpcc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 9.9.0-trunk0
version: 9.11.0-trunk0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.

appVersion: 9.9.0-trunk0
appVersion: 9.11.0-trunk0
2 changes: 1 addition & 1 deletion helm/hpcc/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,7 @@ Pass in dict with .root, .visibility defined
{{- end -}}

{{- define "hpcc.generateHelmVersion" -}}
helmVersion: 9.9.0-trunk0
helmVersion: 9.11.0-trunk0
{{- end -}}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion rtl/eclrtl/eclregex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ static void initMaxCacheSize()
}

if (cacheMaxSize > 0)
compiledStrRegExprCache.setMaxCacheSize(cacheMaxSize);
compiledStrRegExprCache.setMaxCacheSize(cacheMaxSize); // NOTE: Called from init code - no need to lock
else
compiledCacheEnabled = false;
}
Expand Down
2 changes: 2 additions & 0 deletions system/jhtree/jhinplace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2712,6 +2712,8 @@ class InplaceIndexTest : public CppUnit::TestFixture

unsigned searchLen = strlen(search);
unsigned trimLen = rtlTrimStrLen(searchLen, search);
if (!trimLen)
return;
StringBuffer text;
text.clear().append(search).setCharAt(trimLen-1, ' '); callback(text);
text.clear().append(search).setCharAt(trimLen-1, 'a'); callback(text);
Expand Down
1 change: 1 addition & 0 deletions system/jhtree/jhtree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ CKeyStore::~CKeyStore()

unsigned CKeyStore::setKeyCacheLimit(unsigned limit)
{
synchronized block(mutex);
return keyIndexCache.setCacheLimit(limit);
}

Expand Down
2 changes: 1 addition & 1 deletion system/jhtree/keydiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ class CTLKGenerator : public Thread

private:
Owned<INodeReceiver> tlkReceiver;
unsigned remaining;
std::atomic<unsigned> remaining;
KeyDiffHeader const & header;
StringAttr filename;
Owned<CKeyWriter> writer;
Expand Down
5 changes: 3 additions & 2 deletions system/security/LdapSecurity/ldapconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class CHostManager
StringArray m_hostArray;
Mutex m_HMMutex;
unsigned m_curHostIdx;
bool m_populated;
std::atomic<bool> m_populated;

public:
CHostManager()
Expand Down Expand Up @@ -209,6 +209,7 @@ class CHostManager

int queryNumHosts()
{
synchronized block(m_HMMutex);
return m_hostArray.ordinality();
}

Expand All @@ -220,14 +221,14 @@ class CHostManager

void rejectHost(const char * rejectedHost)
{
synchronized block(m_HMMutex);
if (m_hostArray.ordinality() == 1)
{
DBGLOG("Cannot reject the only configured LDAP AD server %s", m_hostArray.item(m_curHostIdx));
return;
}

//If rejectedHost is not already rejected, do so
synchronized block(m_HMMutex);
if (0 == strcmp(rejectedHost, m_hostArray.item(m_curHostIdx)))
{
DBGLOG("Temporarily rejecting LDAP AD server %s", m_hostArray.item(m_curHostIdx));
Expand Down
5 changes: 0 additions & 5 deletions system/security/plugins/jwtSecurity/jwtCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,3 @@ JWTUserCache& JWTUserCache::clear()

return *this;
}

unsigned int JWTUserCache::count() const
{
return userPermMap.size();
}
2 changes: 0 additions & 2 deletions system/security/plugins/jwtSecurity/jwtCache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,6 @@ class JWTUserCache

JWTUserCache& clear();

unsigned int count() const;

private:

mutable CriticalSection crit; //!< Used to prevent thread collisions during userPermMap modification
Expand Down
4 changes: 2 additions & 2 deletions version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
set ( HPCC_NAME "Community Edition" )
set ( HPCC_PROJECT "community" )
set ( HPCC_MAJOR 9 )
set ( HPCC_MINOR 9 )
set ( HPCC_MINOR 11 )
set ( HPCC_POINT 0 )
set ( HPCC_MATURITY "trunk" )
set ( HPCC_SEQUENCE 0 )
set ( HPCC_TAG_TIMESTAMP "2024-06-24T14:15:40Z" )
set ( HPCC_TAG_TIMESTAMP "2025-01-14T17:20:56Z" )
###
Loading