BIND 10 #2887: "make check" fails on FreeBSD 9.1

BIND 10 Development do-not-reply at isc.org
Mon Apr 1 01:09:25 UTC 2013


#2887: "make check" fails on FreeBSD 9.1
-------------------------------------+-------------------------------------
            Reporter:  jwright       |                        Owner:
                Type:  defect        |                       Status:  new
            Priority:  medium        |                    Milestone:  Next-
           Component:  tests         |  Sprint-Proposed
            Keywords:                |                   Resolution:
           Sensitive:  0             |                 CVSS Scoring:
         Sub-Project:  DNS           |              Defect Severity:
Estimated Difficulty:  0             |  Medium
         Total Hours:  0             |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 It makes the implementation more fragile to catch all exceptions with
 `...` when a specific type of it (in this case `bad_alloc`) is
 expected, and is therefore considered a bad practice in general.

 In this specific case, I believe we should be able to avoid this
 trouble by not relying on exception in the first place:

 {{{#!cpp
 const any::TSIG&
 castToTSIGRdata(const rdata::Rdata& rdata) {
     const any::TSIG* tsig_rdata = dynamic_cast<const any::TSIG*>(&rdata);
     if (tsig_rdata == NULL) {
         isc_throw(DNSMessageFORMERR,
                   "TSIG record is being constructed from "
                   "incompatible RDATA:" << rdata.toText());
     }
     return (*tsig_rdata);
 }}}

 I'm afraid, however, there are other cases that don't work due to the
 underlying library bug and are not this easy to fix.  My suggestion is
 to fix this particular point with the code shown above, and then
 identify all other issues due to the same underlying problem on this
 environment.  If these can be easily fixed like this one we fix them
 in this ticket, otherwise create a new one with a complete list of the
 issues.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2887#comment:2>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list