...
BugZero found this defect 2830 days ago.
An internal pointer of a wrapper object remains available after the object is freed Defect 101485 (STATIC_C) Checker WRAPPER_ESCAPE (subcategory none) File: /src/mongo/s/sharding_test_fixture.cpp Function mongo::ShardingTestFixture::setUp() /src/mongo/s/sharding_test_fixture.cpp, line: 132 The internal representation of local "fixedExec" escapes into "this->_executor", but is destroyed when it exits scope. _executor = fixedExec.get();
renctan commented on Tue, 18 Apr 2017 17:06:37 +0000: Marked as ignored in Coverity. milkie commented on Tue, 18 Apr 2017 13:12:40 +0000: While this is technically a false positive, as we std::move the unique pointer and stash it away somewhere later on in the function, I'm not sure we want to let this pattern proliferate.