[bind10-dev] fixes/improvements

Francis Dupont fdupont at isc.org
Thu Nov 24 09:04:31 UTC 2011


As there is a scheduled release for Monday, is it the time to propose
fixes/improvements for the next sprint?
These are from the WIN32 port effort:
 - src/bin/host/host.cc should use util/time_utilities.h gettimeWrapper()
  in place of the not portable gettimeofday()

 - replace shared_ptr by boost::shared_ptr in:
  * src/bin/resolver/resolver.cc
  * src/lib/acl/dns.cc
  * src/lib/acl/tests/loader_test.cc
  * src/lib/acl/tests/logic_check_test.cc
  * src/lib/datasrc/database.cc
  * src/lib/datasrc/tests/database_unittest.cc
  * src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
  * src/lib/dns/rrparamregistry-placeholder.cc
  * src/lib/nsas/tests/hash_table_unittest.cc
  * src/lib/python/isc/acl/dns_requestloader_python.cc

 - include config.h first in:
  * src/bin/resolver/tests/response_scrubber_unittest.cc
  * src/lib/asiodns/dns_service.cc
  * src/lib/asiolink/io_service.cc
  * src/lib/nsas/tests/nameserver_address_store_unittest.cc
  * src/lib/resolve/recursive_query.cc

 - src/lib/acl/tests/ip_check_unittest.cc should use an unsigned type
  (vs. char) for expected_data initialized from values > 127

 - in src/lib/asiodns/dns_lookup.h replace the incorrect
     DNSLookup() : self_(this) {}
   by correct
     DNSLookup() { self_ = this; }

 - in src/lib/asiodns/dns_server.h replace the incorrect
     DNSServer() : self_(this) {}
   by correct
     DNSServer() { self_ = this; }

 - in src/lib/asiodns/io_fetch.{h,cc} choose between struct and class
  for IOFetchData

 - qualify error_code into asio::error_code in:
  * src/lib/asiodns/tcp_server.cc
  * src/lib/asiodns/tests/io_fetch_unittest.cc
  * src/lib/asiodns/udp_server.cc
  * src/lib/asiolink/io_address.cc
  * src/lib/resolve/tests/recursive_query_unittest_2.cc

 - move to unsigned for loop index in:
  * src/lib/asiodns/tests/dns_server_unittest.cc (line 433)
  * src/lib/bench/benchmark.h (lines 123 (comment) and 264)
  * src/lib/cache/resolver_cache.cc (lines 167, 174 and 264)
  * src/lib/cc/data.cc (line 787, and change the type of s line 783 too)
  * src/lib/cc/session.cc (line 370)
  * src/lib/cryptolink/tests/crypto_unittests.cc (line 395)
  * src/lib/dns/rdata/generic/dnskey_48.cc (line 184, type size_t)
  * src/lib/dns/rdata/generic/nsec3_50.cc (line 224 and perhaps others)
  * src/lib/dns/rdata/generic/nsec_47.cc (line 146 and	perhaps	others)
  * src/lib/dns/rdatafields.cc (lines 174 and 201)
  * src/lib/dns/tests/unittest_util.cc (lines 119 and 142)
  * src/lib/log/compiler/message.cc (line 227)
  * src/lib/log/logger_manager.cc (line 170)
  * src/lib/log/tests/logger_manager_unittest.cc (line 318)
  * src/lib/nsas/hash_key.cc (line 38)
  * src/lib/resolve/response_classifier.cc (lines 122, 164, 176 and 214)
  * src/lib/resolve/tests/recursive_query_unittest_2.cc (line 692)
  * src/lib/util/tests/base32hex_unittest.cc (line 157, type uint8_t)
  * src/lib/util/tests/hex_unittest.cc (line 113, type uint8_t)
  * src/lib/util/time_utilities.cc (line 161)
 
 - in src/lib/asiodns/udp_server.{h,c} choose between struct and class
  for Data

 - in src/lib/asiolink/simple_callback.h replace the incorrect
     SimpleCallback() : self_(this) {}
   by correct
     SimpleCallback() { self_ = this; }

 - remove the unused exception variable (i.e., keep only the type) in:
  * src/lib/asiolink/tcp_socket.h (line 279)
  * src/lib/bench/benchmark_util.cc (line 106)
  * src/lib/cc/data.cc (line 745)
  * src/lib/dhcp/libdhcp.cc (line 132)
  * src/lib/python/isc/log/log.cc (lines 240 and 243)
  * src/lib/server_common/portconfig.cc (line 62)
  * src/lib/util/strutil.h (line 194)

 - ***BUG*** in src/lib/cc/data.cc (first) removeIdentical() the
  remove() can make the it iterator pointing to the end() so
  the ++it is invalid
  (I already signaled this bug, please fix it! BTW, what is the
   escalation procedure?)

 - in src/lib/datasrc/tests/database_unittest.cc change the type of
  cur_record_ to size_t

 - in src/lib/datasrc/tests/database_unittest.cc change the confusing
  initialization of for index name to a more standard style, i.e.:
  name(positive_names) -> name = positive_names
  (same for negative_names and negative_dnssec_names)

 - same for src/lib/datasrc/tests/memory_datasrc_unittest.cc and
  the four name(names) -> name = names

 - ***BUG*** in src/lib/dns/masterload.cc masterLoad must check if
  the filename is not NULL before opening it

 - in src/lib/dns/message.cc revisit the counts_ definition
  (i.e., open a ticket for it so it will be done before the end
   of the year)

 - in src/lib/dns/messagerenderer.cc the variable i line 120 should
  be at least unsigned (IMHO it should be size_t, i.e., same type than
  Name::MAX_WIRE)

 - in src/lib/dns/python/pydnspp_common.cc pydnspp_common.h is included
  twice, IMHO the first one (with <>) should be removed

 - ***BUGS*** in src/lib/dns/rdata.cc there are two out of bound
  accesses with empty vectors:
   * line 115 where
    buffer.readData(&data[0], rdata_len);
   must be guard against rdata_len == 0
   * line 245 where
    if ((cmp = memcmp(&lhs.data_[0], &rhs.data_[0], len))
   must be guard against len == 0

 - in src/lib/dns/tests/message_unittest.cc expected_mac should be
  at least unsigned (vs. char) as initialized with values > 127

 - in src/lib/log/{logger_manager_impl,output_option}.h choose between
  struct and class for OutputOption

 - in src/lib/log/logger_specification.h getAdditive() should return
  a bool (vs. an int)

 - ***BUG*** src/lib/util/io/fd.cc was not yet fixed!!!

 - in src/lib/util/strutil.cc the 'Index into argument array' line 123
  should be at least unsigned

Thanks

Francis Dupont <fdupont at isc.org>



More information about the bind10-dev mailing list