From a53874d56c3d9be05b015bec7bd42a14460ab152 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 28 Oct 2009 01:27:20 -0400 Subject: [PATCH] Disabled a memory check when --verify is on The check is not complete enough to be trustworthy. --- src/utils.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/utils.cc b/src/utils.cc index a5334155..c68737dc 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -190,8 +190,15 @@ static void trace_delete_func(void * ptr, const char * which) i = freed_memory->find(ptr); if (i != freed_memory->end()) VERIFY(! "Freeing a block of memory twice"); +#if 0 + // There can be memory allocated by Boost or the standard library, which + // was allocated before memory tracing got turned on, that the system + // might free for some coincidental reason. As such, we can't rely on + // this check being valid. I've seen cases where processes ran to + // completion with it on, and then others where valid processes failed. else VERIFY(! "Freeing an unknown block of memory"); +#endif memory_tracing_active = true; return; }