mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
ReplicatedPG: add assert to snapset.clones search
CID 716943: Using invalid iterator (INVALIDATE_ITERATOR)At (27): Dereferencing iterator "p" though it is already past the end of its container. The assert ensures that p will not be dereferenced if invalid. Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
parent
10e1ac7bb9
commit
4f621a1a1f
@ -1348,6 +1348,7 @@ ReplicatedPG::RepGather *ReplicatedPG::trim_object(const hobject_t &coid,
|
||||
for (p = snapset.clones.begin(); p != snapset.clones.end(); p++)
|
||||
if (*p == last)
|
||||
break;
|
||||
assert(p != snapset.clones.end());
|
||||
object_stat_sum_t delta;
|
||||
if (p != snapset.clones.begin()) {
|
||||
// not the oldest... merge overlap into next older clone
|
||||
|
Loading…
Reference in New Issue
Block a user