Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.6.0, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.1.4, 7.0.5, 7.1.0, 7.1.1, 7.1.2, 7.2.0, 7.1.3, 7.2.1, 7.1.5, 7.2.2
-
Untriaged
-
0
-
Unknown
-
KV 2023-4
Description
Spotted in a server build log
15:35:03 /home/couchbase/jenkins/workspace/toy-unix-simple/kv_engine/engines/ep/src/dcp/producer.cc:1654:46: warning: ‘this’ pointer is null [-Wnonnull]
|
15:35:03 1654 | stream->getStreamTypeName());
|
And correct, we have code accessing a null pointer as part of a warning log message.
if (stream) {
|
stream->addTakeoverStats(add_stat, c, vb);
|
return;
|
}
|
... else stream is nullptr ...
|
logger->warn(
|
"({}) "
|
"DcpProducer::addTakeoverStats Stream type is {} and not "
|
"the expected Active",
|
vb.getId(),
|
stream->getStreamTypeName()); <----
|