For example:
1591605 Data race condition
5. missing_lock: Accessing g_lowercaseOutgoing without holding lock LockGuarded<std::shared_ptr<std::unordered_map<DNSName, SyncRes::AuthDomain, std::hash<DNSName>, std::equal_to<DNSName>, std::allocator<std::pair<DNSName const, SyncRes::AuthDomain> > > > >.d_mutex. Elsewhere, g_lowercaseOutgoing is written to with LockGuarded.d_mutex held 1 out of 1 times.
}
g_networkTimeoutMsec = ::arg().asNum("network-timeout");
- std::tie(*g_initialDomainMap.lock(), *g_initialAllowNotifyFor.lock()) = parseZoneConfiguration(g_yamlSettings);
+ { // Reduce scope of locks (otherwise Coverity induces from this line the global vars below should be
+ // protected by a mutex)
+ std::tie(*g_initialDomainMap.lock(), *g_initialAllowNotifyFor.lock()) = parseZoneConfiguration(g_yamlSettings);
+ }
g_latencyStatSize = ::arg().asNum("latency-statistic-size");