summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-28 01:27:20 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-28 01:27:20 -0400
commita53874d56c3d9be05b015bec7bd42a14460ab152 (patch)
tree2e3d7fe3c28f5b8781a128d095b195b6bec18e7c
parentda0f3bf14a07b1696c1e9e6d8164768ac328b341 (diff)
downloadledger-a53874d56c3d9be05b015bec7bd42a14460ab152.tar.gz
ledger-a53874d56c3d9be05b015bec7bd42a14460ab152.tar.bz2
ledger-a53874d56c3d9be05b015bec7bd42a14460ab152.zip
Disabled a memory check when --verify is on
The check is not complete enough to be trustworthy.
-rw-r--r--src/utils.cc7
1 files changed, 7 insertions, 0 deletions
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;
}