BIND 10 bind10-1.1.0-release, updated. 47c74d3484fb75eb54f5e17c857ae17fcd7dcede [bind10-1.1.0-release] update release date
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu May 9 16:17:54 UTC 2013
The branch, bind10-1.1.0-release has been updated
via 47c74d3484fb75eb54f5e17c857ae17fcd7dcede (commit)
via c03c4a2def7eb61194b9454596ce70387f9d18df (commit)
via 2afaca6af095566dc2a9dad4775c9c414ad42404 (commit)
via f5f51904408ec43ac9aefbd3c6a5d8c91a50ada8 (commit)
via 8d63c7895455600288c7362e1deba7905594156d (commit)
via 25bda17c3adae860fbbe941fe19dbc228d22eeb8 (commit)
via f3ff9b2eb85673663f48f97d5a6f46b249ec3d64 (commit)
via 19bd3958039931b483a259365fb4ca29d9539019 (commit)
from da3b1a5b6b1858a40d07df62f71005abe274d5f3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 47c74d3484fb75eb54f5e17c857ae17fcd7dcede
Author: Jeremy C. Reed <jreed at isc.org>
Date: Thu May 9 11:17:26 2013 -0500
[bind10-1.1.0-release] update release date
commit c03c4a2def7eb61194b9454596ce70387f9d18df
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed May 8 23:05:14 2013 -0700
[bind10-1.1.0-release][master] exit from SyncUDPServer::handleRead immediately if stopped.
while not really correct, this seems to work as a workaround for the crash
problem reported in #2946.
okayed on jabber.
commit 2afaca6af095566dc2a9dad4775c9c414ad42404
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed May 8 22:08:27 2013 -0700
[bind10-1.1.0-release][master] don't initialize test data objects in namescope level.
this caused statici initialization fiasco for some build, e.g.:
http://git.bind10.isc.org/~tester/builder/BIND10/20130508225127-MacOSX10.6-x86_64-Clang-Static/logs/unittests.out
string objects moved inside the compare tests did not actually cause harm
in this environment, but should be generally better to be initialized
this way for the same reason.
while it's not a kind of 5-line patch, it should be pretty straightforward,
so I'm committing it at my discretion.
commit f5f51904408ec43ac9aefbd3c6a5d8c91a50ada8
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri May 3 21:24:10 2013 +0000
[bind10-1.1.0-release][master] include stdlib.h instead of cstlib; for random(3) we need the former.
commit 8d63c7895455600288c7362e1deba7905594156d
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri May 3 01:02:41 2013 -0700
[bind10-1.1.0-release][master] use a wrapper for boost::function to work around sunstudio build issue
it can't handle it if we pass a function object directly to asio function
(also templated). okayed on jabber.
commit 25bda17c3adae860fbbe941fe19dbc228d22eeb8
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Fri May 3 09:53:07 2013 +0200
[bind10-1.1.0-release]Don't rely on friends
Fix compilation on SunStudio. Avoid relying on combination of friend
declaration and nested class, which SunStudio gets wrong as it's quite
complex.
commit f3ff9b2eb85673663f48f97d5a6f46b249ec3d64
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri May 3 07:26:35 2013 +0000
[bind10-1.1.0-release][master] define a wrapper object to pass to io_service::post explicitly.
depending on the version of boost and sunstudio, passing a temporary still
doesn't seem to work.
commit 19bd3958039931b483a259365fb4ca29d9539019
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri May 3 00:05:44 2013 -0700
[bind10-1.1.0-release][master] use a wrapper for passing boost::function to io_service::post()
this works as a workaround for a build failure with SunStudio.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 2 +-
src/bin/resolver/bench/fake_resolution.cc | 4 +-
src/bin/resolver/bench/fake_resolution.h | 7 ++++
src/lib/asiodns/sync_udp_server.cc | 9 +++++
src/lib/asiodns/sync_udp_server.h | 19 ++++++++--
src/lib/asiolink/io_service.cc | 20 +++++++++-
src/lib/dns/tests/rdata_ds_like_unittest.cc | 53 ++++++++++++++++++++-------
7 files changed, 93 insertions(+), 21 deletions(-)
-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 5552772..de38711 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-bind10-1.0.0beta2 released on May 3, 2013
+bind10-1.0.0beta2 released on May 10, 2013
610. [bug] muks
When the sqlite3 program is not available on the system (in
diff --git a/src/bin/resolver/bench/fake_resolution.cc b/src/bin/resolver/bench/fake_resolution.cc
index c08e45a..e3d54a9 100644
--- a/src/bin/resolver/bench/fake_resolution.cc
+++ b/src/bin/resolver/bench/fake_resolution.cc
@@ -20,7 +20,7 @@
#include <boost/bind.hpp>
#include <boost/foreach.hpp>
#include <algorithm>
-#include <cstdlib>
+#include <stdlib.h> // not cstdlib, which doesn't officially have random()
namespace isc {
namespace resolver {
@@ -144,7 +144,7 @@ public:
timer_(timer)
{}
void trigger() {
- query_->outstanding_ = false;
+ query_->answerReceived();
callback_();
// We are not needed any more.
delete this;
diff --git a/src/bin/resolver/bench/fake_resolution.h b/src/bin/resolver/bench/fake_resolution.h
index c2011d3..cf2219c 100644
--- a/src/bin/resolver/bench/fake_resolution.h
+++ b/src/bin/resolver/bench/fake_resolution.h
@@ -142,6 +142,13 @@ public:
}
interface_ = &dst_interface;
}
+ /// \brief The answer for upstream query was received
+ ///
+ /// This should be called from within the FakeInterface only.
+ /// It marks that the query from upstream was answered.
+ void answerReceived() {
+ outstanding_ = false;
+ }
private:
// The scheduled steps for this task.
typedef std::pair<Task, size_t> Step;
diff --git a/src/lib/asiodns/sync_udp_server.cc b/src/lib/asiodns/sync_udp_server.cc
index 9a06691..989484f 100644
--- a/src/lib/asiodns/sync_udp_server.cc
+++ b/src/lib/asiodns/sync_udp_server.cc
@@ -75,6 +75,15 @@ SyncUDPServer::scheduleRead() {
void
SyncUDPServer::handleRead(const asio::error_code& ec, const size_t length) {
+ // If the server has been stopped, it could even have been destroyed
+ // by the time of this call. We'll solve this problem in #2946, but
+ // until then we exit as soon as possible without accessing any other
+ // invalidated fields (note that referencing stopped_ is also incorrect,
+ // but experiments showed it often keeps the original value in practice,
+ // so we live with it until the complete fix).
+ if (stopped_) {
+ return;
+ }
if (ec) {
using namespace asio::error;
const asio::error_code::value_type err_val = ec.value();
diff --git a/src/lib/asiodns/sync_udp_server.h b/src/lib/asiodns/sync_udp_server.h
index becbb2e..cabc8bb 100644
--- a/src/lib/asiodns/sync_udp_server.h
+++ b/src/lib/asiodns/sync_udp_server.h
@@ -158,9 +158,22 @@ private:
asio::error_code ec_;
// The callback functor for internal asynchronous read event. This is
// stateless (and it will be copied in the ASIO library anyway), so
- // can be const
- const boost::function<void(const asio::error_code&, size_t)>
- recv_callback_;
+ // can be const.
+ // SunStudio doesn't like a boost::function object to be passed, so
+ // we use the wrapper class as a workaround.
+ class CallbackWrapper {
+ public:
+ CallbackWrapper(boost::function<void(const asio::error_code&, size_t)>
+ callback) :
+ callback_(callback)
+ {}
+ void operator()(const asio::error_code& error, size_t len) {
+ callback_(error, len);
+ }
+ private:
+ boost::function<void(const asio::error_code&, size_t)> callback_;
+ };
+ const CallbackWrapper recv_callback_;
// Auxiliary functions
diff --git a/src/lib/asiolink/io_service.cc b/src/lib/asiolink/io_service.cc
index 0d791a1..df08316 100644
--- a/src/lib/asiolink/io_service.cc
+++ b/src/lib/asiolink/io_service.cc
@@ -24,6 +24,23 @@
namespace isc {
namespace asiolink {
+namespace {
+// A trivial wrapper for boost::function. SunStudio doesn't seem to be capable
+// of handling a boost::function object if directly passed to
+// io_service::post().
+class CallbackWrapper {
+public:
+ CallbackWrapper(const boost::function<void()>& callback) :
+ callback_(callback)
+ {}
+ void operator()() {
+ callback_();
+ }
+private:
+ boost::function<void()> callback_;
+};
+}
+
class IOServiceImpl {
private:
IOServiceImpl(const IOService& source);
@@ -64,7 +81,8 @@ public:
/// generalized.
asio::io_service& get_io_service() { return io_service_; };
void post(const boost::function<void ()>& callback) {
- io_service_.post(callback);
+ const CallbackWrapper wrapper(callback);
+ io_service_.post(wrapper);
}
private:
asio::io_service io_service_;
diff --git a/src/lib/dns/tests/rdata_ds_like_unittest.cc b/src/lib/dns/tests/rdata_ds_like_unittest.cc
index c797199..ae6a360 100644
--- a/src/lib/dns/tests/rdata_ds_like_unittest.cc
+++ b/src/lib/dns/tests/rdata_ds_like_unittest.cc
@@ -47,15 +47,15 @@ template<> RRTYPE<generic::DLV>::RRTYPE() : RRType(RRType::DLV()) {}
template <class DS_LIKE>
class Rdata_DS_LIKE_Test : public RdataTest {
protected:
- static DS_LIKE const rdata_ds_like;
+ Rdata_DS_LIKE_Test() :
+ ds_like_txt("12892 5 2 F1E184C0E1D615D20EB3C223ACED3B03C773DD952D"
+ "5F0EB5C777586DE18DA6B5"),
+ rdata_ds_like(ds_like_txt)
+ {}
+ const string ds_like_txt;
+ const DS_LIKE rdata_ds_like;
};
-string ds_like_txt("12892 5 2 F1E184C0E1D615D20EB3C223ACED3B03C773DD952D"
- "5F0EB5C777586DE18DA6B5");
-
-template <class DS_LIKE>
-DS_LIKE const Rdata_DS_LIKE_Test<DS_LIKE>::rdata_ds_like(ds_like_txt);
-
// The list of types we want to test.
typedef testing::Types<generic::DS, generic::DLV> Implementations;
@@ -70,7 +70,7 @@ TYPED_TEST(Rdata_DS_LIKE_Test, createFromText) {
}
TYPED_TEST(Rdata_DS_LIKE_Test, toText_DS_LIKE) {
- EXPECT_EQ(ds_like_txt, this->rdata_ds_like.toText());
+ EXPECT_EQ(this->ds_like_txt, this->rdata_ds_like.toText());
}
TYPED_TEST(Rdata_DS_LIKE_Test, badText_DS_LIKE) {
@@ -96,7 +96,7 @@ TYPED_TEST(Rdata_DS_LIKE_Test, createFromWire_DS_LIKE) {
TYPED_TEST(Rdata_DS_LIKE_Test, createFromLexer_DS_LIKE) {
EXPECT_EQ(0, this->rdata_ds_like.compare(
*test::createRdataUsingLexer(RRTYPE<TypeParam>(), RRClass::IN(),
- ds_like_txt)));
+ this->ds_like_txt)));
// Whitespace is okay
EXPECT_EQ(0, this->rdata_ds_like.compare(
@@ -121,13 +121,13 @@ TYPED_TEST(Rdata_DS_LIKE_Test, createFromLexer_DS_LIKE) {
}
TYPED_TEST(Rdata_DS_LIKE_Test, assignment_DS_LIKE) {
- TypeParam copy((string(ds_like_txt)));
+ TypeParam copy(this->ds_like_txt);
copy = this->rdata_ds_like;
EXPECT_EQ(0, copy.compare(this->rdata_ds_like));
// Check if the copied data is valid even after the original is deleted
TypeParam* copy2 = new TypeParam(this->rdata_ds_like);
- TypeParam copy3((string(ds_like_txt)));
+ TypeParam copy3(this->ds_like_txt);
copy3 = *copy2;
delete copy2;
EXPECT_EQ(0, copy3.compare(this->rdata_ds_like));
@@ -143,7 +143,7 @@ TYPED_TEST(Rdata_DS_LIKE_Test, getTag_DS_LIKE) {
TYPED_TEST(Rdata_DS_LIKE_Test, toWireRenderer) {
Rdata_DS_LIKE_Test<TypeParam>::renderer.skip(2);
- TypeParam rdata_ds_like(ds_like_txt);
+ TypeParam rdata_ds_like(this->ds_like_txt);
rdata_ds_like.toWire(this->renderer);
vector<unsigned char> data;
@@ -156,7 +156,7 @@ TYPED_TEST(Rdata_DS_LIKE_Test, toWireRenderer) {
}
TYPED_TEST(Rdata_DS_LIKE_Test, toWireBuffer) {
- TypeParam rdata_ds_like(ds_like_txt);
+ TypeParam rdata_ds_like(this->ds_like_txt);
rdata_ds_like.toWire(this->obuffer);
}
@@ -179,8 +179,33 @@ string ds_like_txt6("12892 5 2 F2E184C0E1D615D20EB3C223ACED3B03C773DD952D"
"5F0EB5C777586DE18DA6B555");
TYPED_TEST(Rdata_DS_LIKE_Test, compare) {
+ const string ds_like_txt1(
+ "12892 5 2 F1E184C0E1D615D20EB3C223ACED3B03C773DD952D"
+ "5F0EB5C777586DE18DA6B5");
+ // different tag
+ const string ds_like_txt2(
+ "12893 5 2 F1E184C0E1D615D20EB3C223ACED3B03C773DD952D"
+ "5F0EB5C777586DE18DA6B5");
+ // different algorithm
+ const string ds_like_txt3(
+ "12892 6 2 F1E184C0E1D615D20EB3C223ACED3B03C773DD952D"
+ "5F0EB5C777586DE18DA6B5");
+ // different digest type
+ const string ds_like_txt4(
+ "12892 5 3 F1E184C0E1D615D20EB3C223ACED3B03C773DD952D"
+ "5F0EB5C777586DE18DA6B5");
+ // different digest
+ const string ds_like_txt5(
+ "12892 5 2 F2E184C0E1D615D20EB3C223ACED3B03C773DD952D"
+ "5F0EB5C777586DE18DA6B5");
+ // different digest length
+ const string ds_like_txt6(
+ "12892 5 2 F2E184C0E1D615D20EB3C223ACED3B03C773DD952D"
+ "5F0EB5C777586DE18DA6B555");
+
// trivial case: self equivalence
- EXPECT_EQ(0, TypeParam(ds_like_txt).compare(TypeParam(ds_like_txt)));
+ EXPECT_EQ(0, TypeParam(this->ds_like_txt).
+ compare(TypeParam(this->ds_like_txt)));
// non-equivalence tests
EXPECT_LT(TypeParam(ds_like_txt1).compare(TypeParam(ds_like_txt2)), 0);
More information about the bind10-changes
mailing list