]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1739. [bug] dns_rbt_deletetree() could incorrectly return
authorMark Andrews <marka@isc.org>
Mon, 11 Oct 2004 05:49:29 +0000 (05:49 +0000)
committerMark Andrews <marka@isc.org>
Mon, 11 Oct 2004 05:49:29 +0000 (05:49 +0000)
                        ISC_R_QUOTA.  [RT #12695]

1738.   [bug]           Enable overrun checking by default. [RT #12695]

CHANGES
lib/dns/include/dns/rbt.h
lib/dns/rbt.c
lib/isc/include/isc/mem.h

diff --git a/CHANGES b/CHANGES
index 9fa7c71fad9d50ddc2d26f7f8b00f3fa43eeacbb..6823e7f41c896e614dd4595f0d8cb78ea48d48b7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,9 @@
 1740.  [placeholder]   rt12729
 
-1739.  [placeholder]   rt12695
+1739.  [bug]           dns_rbt_deletetree() could incorrectly return
+                       ISC_R_QUOTA.  [RT #12695]
 
-1738.  [placeholder]   rt12695
+1738.  [bug]           Enable overrun checking by default. [RT #12695]
 
 1737.  [bug]           named failed if more than 16 masters were specified.
                        [RT #12627]
index adee9c361b3bc33b99d0c0a3482e2aef8a128981..d3461aa3fbebfef17bd7a9fd1e2d5f53909dd4f3 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbt.h,v 1.59 2004/03/05 05:09:45 marka Exp $ */
+/* $Id: rbt.h,v 1.60 2004/10/11 05:49:29 marka Exp $ */
 
 #ifndef DNS_RBT_H
 #define DNS_RBT_H 1
@@ -603,15 +603,18 @@ dns_rbt_destroy(dns_rbt_t **rbtp);
 isc_result_t
 dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum);
 /*
- * Stop working with a red-black tree of trees.  Once dns_rbt_destroy2()
- * has been called on a 'rbt' only dns_rbt_destroy() or dns_rbt_destroy2()
- * may be used on the tree.  If 'quantum' is zero then the entire tree will
- * be destroyed.
- *
+ * Stop working with a red-black tree of trees. 
+ * If 'quantum' is zero then the entire tree will be destroyed.
+ * If 'quantum' is non zero then up to 'quantum' nodes will be destroyed
+ * allowing the rbt to be incrementally destroyed by repeated calls to
+ * dns_rbt_destroy2().  Once dns_rbt_destroy2() has been called no other
+ * operations than dns_rbt_destroy()/dns_rbt_destroy2() should be
+ * performed on the tree of trees.
+ * 
  * Requires:
  *     *rbt is a valid rbt manager.
  *
- * Ensures:
+ * Ensures on ISC_R_SUCCESS:
  *     All space allocated by the RBT library has been returned.
  *
  *     *rbt is invalidated as an rbt manager.
index f466e2e42315b279812cb7a01d4cd6e492101ea6..fa6684d440442e68dd72cb2b73716db925ddf011 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbt.c,v 1.128 2004/03/05 05:09:22 marka Exp $ */
+/* $Id: rbt.c,v 1.129 2004/10/11 05:49:28 marka Exp $ */
 
 /* Principal Authors: DCL */
 
@@ -2021,8 +2021,6 @@ dns_rbt_deletetree(dns_rbt_t *rbt, dns_rbtnode_t *node) {
  done:
        if (result != ISC_R_SUCCESS)
                return (result);
-       if (rbt->quantum != 0 && --rbt->quantum == 0)
-               return (ISC_R_QUOTA);
 
        if (DATA(node) != NULL && rbt->data_deleter != NULL)
                rbt->data_deleter(DATA(node), rbt->deleter_arg);
index 4a797fd6067ec781ce4177c2f26866dd13678a43..ec676f007ce14daac50933b6ef7cd490bdf0c68b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: mem.h,v 1.59 2004/03/05 05:10:58 marka Exp $ */
+/* $Id: mem.h,v 1.60 2004/10/11 05:49:29 marka Exp $ */
 
 #ifndef ISC_MEM_H
 #define ISC_MEM_H 1
@@ -58,7 +58,7 @@ typedef void (*isc_memfree_t)(void *, void *);
  * the requested space.  This will increase the size of each allocation.
  */
 #ifndef ISC_MEM_CHECKOVERRUN
-#define ISC_MEM_CHECKOVERRUN 0
+#define ISC_MEM_CHECKOVERRUN 1
 #endif
 
 /*