2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

1739. [bug] dns_rbt_deletetree() could incorrectly return

ISC_R_QUOTA.  [RT #12695]

1738.   [bug]           Enable overrun checking by default. [RT #12695]
This commit is contained in:
Mark Andrews
2004-10-11 05:49:29 +00:00
parent 2a71a21346
commit 073bd4c4bc
4 changed files with 16 additions and 14 deletions

View File

@@ -1,8 +1,9 @@
1740. [placeholder] rt12729 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. 1737. [bug] named failed if more than 16 masters were specified.
[RT #12627] [RT #12627]

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * 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 #ifndef DNS_RBT_H
#define DNS_RBT_H 1 #define DNS_RBT_H 1
@@ -603,15 +603,18 @@ dns_rbt_destroy(dns_rbt_t **rbtp);
isc_result_t isc_result_t
dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum); dns_rbt_destroy2(dns_rbt_t **rbtp, unsigned int quantum);
/* /*
* Stop working with a red-black tree of trees. Once dns_rbt_destroy2() * Stop working with a red-black tree of trees.
* has been called on a 'rbt' only dns_rbt_destroy() or dns_rbt_destroy2() * If 'quantum' is zero then the entire tree will be destroyed.
* may be used on the tree. If 'quantum' is zero then the entire tree will * If 'quantum' is non zero then up to 'quantum' nodes will be destroyed
* 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: * Requires:
* *rbt is a valid rbt manager. * *rbt is a valid rbt manager.
* *
* Ensures: * Ensures on ISC_R_SUCCESS:
* All space allocated by the RBT library has been returned. * All space allocated by the RBT library has been returned.
* *
* *rbt is invalidated as an rbt manager. * *rbt is invalidated as an rbt manager.

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * 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 */ /* Principal Authors: DCL */
@@ -2021,8 +2021,6 @@ dns_rbt_deletetree(dns_rbt_t *rbt, dns_rbtnode_t *node) {
done: done:
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
if (rbt->quantum != 0 && --rbt->quantum == 0)
return (ISC_R_QUOTA);
if (DATA(node) != NULL && rbt->data_deleter != NULL) if (DATA(node) != NULL && rbt->data_deleter != NULL)
rbt->data_deleter(DATA(node), rbt->deleter_arg); rbt->data_deleter(DATA(node), rbt->deleter_arg);

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * 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 #ifndef ISC_MEM_H
#define ISC_MEM_H 1 #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. * the requested space. This will increase the size of each allocation.
*/ */
#ifndef ISC_MEM_CHECKOVERRUN #ifndef ISC_MEM_CHECKOVERRUN
#define ISC_MEM_CHECKOVERRUN 0 #define ISC_MEM_CHECKOVERRUN 1
#endif #endif
/* /*