mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
When tracing allocations, don't die with an assertion failure if
isc_mem_setdestroycheck(mctx, ISC_FALSE) was called. Also, print the context in the trace statement.
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mem.c,v 1.58 2000/08/01 01:29:34 tale Exp $ */
|
/* $Id: mem.c,v 1.59 2000/08/09 23:03:15 bwelling Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -175,8 +175,8 @@ add_trace_entry(isc_mem_t *mctx, const void *ptr, unsigned int size
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (MEM_TRACE)
|
if (MEM_TRACE)
|
||||||
fprintf(stderr, "add %p size %u file %s line %u\n",
|
fprintf(stderr, "add %p size %u file %s line %u mctx %p\n",
|
||||||
ptr, size, file, line);
|
ptr, size, file, line, mctx);
|
||||||
|
|
||||||
if (!MEM_RECORD)
|
if (!MEM_RECORD)
|
||||||
return;
|
return;
|
||||||
@@ -224,8 +224,8 @@ delete_trace_entry(isc_mem_t *mctx, const void *ptr, unsigned int size,
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (MEM_TRACE)
|
if (MEM_TRACE)
|
||||||
fprintf(stderr, "del %p size %u file %s line %u\n",
|
fprintf(stderr, "del %p size %u file %s line %u mctx %p\n",
|
||||||
ptr, size, file, line);
|
ptr, size, file, line, mctx);
|
||||||
|
|
||||||
if (!MEM_RECORD)
|
if (!MEM_RECORD)
|
||||||
return;
|
return;
|
||||||
@@ -680,7 +680,8 @@ destroy(isc_mem_t *ctx) {
|
|||||||
|
|
||||||
INSIST(ISC_LIST_EMPTY(ctx->pools));
|
INSIST(ISC_LIST_EMPTY(ctx->pools));
|
||||||
#ifdef ISC_MEM_TRACKLINES
|
#ifdef ISC_MEM_TRACKLINES
|
||||||
INSIST(ISC_LIST_EMPTY(ctx->debuglist));
|
if (ctx->checkfree)
|
||||||
|
INSIST(ISC_LIST_EMPTY(ctx->debuglist));
|
||||||
#endif
|
#endif
|
||||||
INSIST(ctx->references == 0);
|
INSIST(ctx->references == 0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user