BIND 10 master, updated. 89e0087450e73ea2336f56c0f7024f4741eaeba0 [master] exit from SyncUDPServer::handleRead immediately if stopped.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu May 9 06:06:50 UTC 2013


The branch, master has been updated
       via  89e0087450e73ea2336f56c0f7024f4741eaeba0 (commit)
      from  0404a592b185c5473343a3faa25de18845cd192c (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 89e0087450e73ea2336f56c0f7024f4741eaeba0
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed May 8 23:05:14 2013 -0700

    [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.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/asiodns/sync_udp_server.cc |    9 +++++++++
 1 file changed, 9 insertions(+)

-----------------------------------------------------------------------
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();



More information about the bind10-changes mailing list