Skip to contentSkip to conversation

New Defects reported by Coverity Scan for ceph

DISCUSSION [email protected] 1 participant 1 message Jan 13, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

Please find the latest report on new defect(s) introduced to ceph found with Coverity Scan.

2 new defect(s) introduced to ceph found with Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)

** CID 1262557: Using invalid iterator (INVALIDATE_ITERATOR) /osd/ReplicatedPG.cc: 2071 in ReplicatedPG::cancel_proxy_read_ops(bool)()

** CID 1262558: Uninitialized scalar field (UNINIT_CTOR)
/osd/ReplicatedPG.h: 629 in ReplicatedPG::OpContext::OpContext(std::tr1::shared_ptr<OpRequest>, osd_reqid_t, std::vector<OSDOp, std::allocator<OSDOp>> &, ReplicatedPG*)()

________________________________________________________________________________________________________
*** CID 1262557: Using invalid iterator (INVALIDATE_ITERATOR) /osd/ReplicatedPG.cc: 2071 in ReplicatedPG::cancel_proxy_read_ops(bool)()
2065 while (p != proxyread_ops.end()) {
2066 cancel_proxy_read((p++)->second);
2067 }
2068
2069 if (requeue) {
2070 for (map<hobject_t, list<OpRequestRef> >::iterator p = in_progress_proxy_reads.begin();

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

CID 1262557: Using invalid iterator (INVALIDATE_ITERATOR) Using invalid iterator "p".

2071 p != in_progress_proxy_reads.end(); p++) {

2072           list<OpRequestRef>& ls = p->second;
2073           dout(10) << __func__ << " " << p->first << " requeuing " << ls.size() << " requests" << dendl;
2074           requeue_ops(ls);
2075           in_progress_proxy_reads.erase(p);

2076 }

________________________________________________________________________________________________________
*** CID 1262558: Uninitialized scalar field (UNINIT_CTOR)
/osd/ReplicatedPG.h: 629 in ReplicatedPG::OpContext::OpContext(std::tr1::shared_ptr<OpRequest>, osd_reqid_t, std::vector<OSDOp, std::allocator<OSDOp>> &, ReplicatedPG*)()

623           num_write(0),
624           copy_cb(NULL),
625           async_read_result(0),
626           inflightreads(0),
627           lock_to_release(NONE),
628           on_finish(NULL),
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

CID 1262558: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member "ignore_cache" is not initialized in this constructor nor in any functions that it calls.

629 release_snapset_obc(false) { }
630 void reset_obs(ObjectContextRef obc) {
631 new_obs = ObjectState(obc->obs.oi, obc->obs.exists);
632 if (obc->ssc) {
633 new_snapset = obc->ssc->snapset;
634 snapset = &obc->ssc->snapset;

________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/25?tab=overview

To manage Coverity Scan email notifications for "[email protected]", click http://scan.coverity.com/subscriptions/edit?email=ceph-devel%40vger.kernel.org&token=018084d671e3cc89d00dd2ccb7eb849c .