-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 8.0.0-rc0
-
Component/s: Internal Code
-
Service Arch
-
Fully Compatible
-
ALL
-
v8.0
-
Service Arch 2024-05-13
Different smart pointers managing same raw pointer
This may cause a crash, as different smart pointers may try to delete the raw pointer twice. Same raw pointer is used to initialize or reset two or more different smart pointers.
/src/mongo/executor/connection_pool.cpp:907: MULTIPLE_INIT_SMART_PTRS 147940 Function "shared_ptr" assigns "conn" with "std::move(iter->second)".
/src/mongo/executor/connection_pool.cpp:920: MULTIPLE_INIT_SMART_PTRS 147940 Function "get" returns a pointer managed by "conn".
/src/mongo/executor/connection_pool.cpp:920: MULTIPLE_INIT_SMART_PTRS 147940 Assigning: "connPtr" = "conn.get()".
/src/mongo/executor/connection_pool.cpp:925: MULTIPLE_INIT_SMART_PTRS 147940 Function "operator =" assigns "this->_checkedOutPool[connPtr]" with "std::move(conn)".
- is related to
-
SERVER-90453 Coverity analysis defect 155063: Different smart pointers managing same raw pointer
- Closed