-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
When analysing LazilyInitialized<T>, Coverity keeps reporting a resource leak issue but that is not the case.
The reason is that Coverity does not track auto_ptr before it sees the release() method call, and therefore doesn't care that when `compareAndSwap` succeeds, the pointer data has been owned by _ptr and therefore it is safe to release it afterwards.
This has caused a number of reports being then flagged by engineers as false positives with the corresponding waste of time. See SERVER-90817, SERVER-90816, SERVER-90815, SERVER-90814, SERVER-90450