-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
Fully Compatible
-
ALL
-
Quint Iteration 3
Dynamic_cast may fail and return null if the type cast is incompatible
Defect 72086 (STATIC_C)
Checker FORWARD_NULL (subcategory dynamic_cast)
File: /src/mongo/db/matcher/expression_algo.cpp
Function mongo::expression::isClauseRedundant(const mongo::MatchExpression *, const mongo::MatchExpression *)
/src/mongo/db/matcher/expression_algo.cpp, line: 279
Dynamic cast to pointer "dynamic_cast <mongo::ExistsMatchExpression const *>(bar)" can return "NULL".
const ExistsMatchExpression* b = dynamic_cast<const ExistsMatchExpression*>(bar);
/src/mongo/db/matcher/expression_algo.cpp, line: 279
Assigning: "b" = "dynamic_cast <mongo::ExistsMatchExpression const *>(bar)".
const ExistsMatchExpression* b = dynamic_cast<const ExistsMatchExpression*>(bar);
/src/mongo/db/matcher/expression_algo.cpp, line: 281
Passing null pointer "b" to "path", which dereferences it. (The dereference happens because this is a virtual function call.)
return a->path() == b->path();
- duplicates
-
SERVER-17858 Partial indexes should support more complex queries
- Closed