BIND 10 #410: RRset::getRdataIterator returns object in invalid state

BIND 10 Development do-not-reply at isc.org
Fri Nov 12 19:33:39 UTC 2010


#410: RRset::getRdataIterator returns object in invalid state
----------------------------+-----------------------------------------------
  Reporter:  vorner         |            Owner:  jinmei
      Type:  defect         |           Status:  new   
  Priority:  minor          |        Milestone:        
 Component:  DNSPacket API  |         Keywords:        
 Sensitive:  0              |   Estimatedhours:  0     
     Hours:  0              |         Billable:  1     
Totalhours:  0              |         Internal:  0     
----------------------------+-----------------------------------------------
 Documentation of the iterator clearly states that af isLast() returs true,
 the iterator should not be used. However, it does not say that newly born
 iterator should not be used before call to first() as well and it is
 counter-intuitive. I spent few hours trying to figure why it crashes. When
 the iterator is created, the it_ field (the wrapped iterator) is
 undefined:

 {{{
 BasicRdataIterator(const std::vector<rdata::ConstRdataPtr>& datavector) :
         datavector_(&datavector) {}
 }}}

 I suggest that either the iterator returned should point to the first item
 or the documentation should equally clearly say that first() must be
 called before use.

-- 
Ticket URL: <http://bind10.isc.org/ticket/410>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list