Operational Defect Database

BugZero found this defect 38 days ago.

MongoDB | 2639741

Coverity analysis defect 147940: Different smart pointers managing same raw pointer

Last update date:

4/11/2024

Affected products:

MongoDB Server

Affected releases:

8.0.0-rc0

Fixed releases:

No fixed releases provided.

Description:

Info

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)".

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...