Skip to contentSkip to conversation

master - memory: disable check with valgrind pool build

PATCH Zdenek Kabelac 1 participant 1 message Feb 12, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9809038b9d3beddd90cb80311c61fd67856e0728
Commit:        9809038b9d3beddd90cb80311c61fd67856e0728
Parent:        425c04e4dc54f1c8aee261217b5b0fc00df643ae
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Feb 12 15:30:43 2015 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Feb 12 15:40:53 2015 +0100

memory: disable check with valgrind pool build

When lvm2 is build with valgrind pool detection - always disable memcheck, since pool memory allocation are unconditionaly passed into valgrind library.

---
 lib/mm/memlock.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
lib/mm/memlock.c +3 -1
index 2327d4c..534aab3 100644
@@ -262,8 +262,10 @@ static int _maps_line(const struct dm_config_node *cn, lvmlock_t lock,
 	/*
 	 * Valgrind is continually eating memory while executing code
 	 * so we need to deactivate check of locked memory size
-         */
+	 */
+#ifndef VALGRIND_POOL
 	if (RUNNING_ON_VALGRIND)
+#endif
 		sz -= sz; /* = 0, but avoids getting warning about dead assigment */
 
 #endif