BIND 10 master, updated. 373eda27fc0e591356a7311e2ad560bb9441e64f Merge #1568

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Mar 15 08:45:32 UTC 2012


The branch, master has been updated
       via  373eda27fc0e591356a7311e2ad560bb9441e64f (commit)
       via  758d1d155f95a65702969866454ccfdfd90a7336 (commit)
       via  3422adaa26b0e1c24d6e230694975a4986cb0965 (commit)
      from  09d97fb51ee5d9d00077a52b3678f94c158a365b (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 373eda27fc0e591356a7311e2ad560bb9441e64f
Merge: 09d97fb51ee5d9d00077a52b3678f94c158a365b 758d1d155f95a65702969866454ccfdfd90a7336
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Thu Mar 15 09:28:44 2012 +0100

    Merge #1568

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

Summary of changes:
 src/lib/util/buffer.h                 |    4 +---
 src/lib/util/tests/buffer_unittest.cc |   12 +++++++++++-
 2 files changed, 12 insertions(+), 4 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/util/buffer.h b/src/lib/util/buffer.h
index a885db1..b8cc12d 100644
--- a/src/lib/util/buffer.h
+++ b/src/lib/util/buffer.h
@@ -380,9 +380,7 @@ public:
     /// \param pos The position in the buffer to be returned.
     uint8_t operator[](size_t pos) const
     {
-        if (pos >= size_) {
-            isc_throw(InvalidBufferPosition, "read at invalid position");
-        }
+        assert (pos < size_);
         return (buffer_[pos]);
     }
     //@}
diff --git a/src/lib/util/tests/buffer_unittest.cc b/src/lib/util/tests/buffer_unittest.cc
index 666924e..8cccd28 100644
--- a/src/lib/util/tests/buffer_unittest.cc
+++ b/src/lib/util/tests/buffer_unittest.cc
@@ -182,7 +182,17 @@ TEST_F(BufferTest, outputBufferReadat) {
     for (int i = 0; i < sizeof(testdata); i ++) {
         EXPECT_EQ(testdata[i], obuffer[i]);
     }
-    EXPECT_THROW(obuffer[sizeof(testdata)], isc::util::InvalidBufferPosition);
+#ifdef EXPECT_DEATH
+    // We use assert now, so we check it dies
+    EXPECT_DEATH({
+        try {
+            obuffer[sizeof(testdata)];
+        } catch (...) {
+            // Prevent exceptions killing the application, we need
+            // to make sure it dies the real hard way
+        }
+        }, "");
+#endif
 }
 
 TEST_F(BufferTest, outputBufferClear) {



More information about the bind10-changes mailing list