mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Valgrind updates
Avoid locking sum testing with valgrind compilation. Make memory unaccessible in the valgrind for dm_pool_abadon_object. Valgrind hinting should not be needed in _free_chunk for dm_free.
This commit is contained in:
parent
e3cce4b66a
commit
01fb91c615
@ -1,5 +1,6 @@
|
||||
Version 2.02.85 -
|
||||
===================================
|
||||
Enhance usability with the valgrind memcheck tool.
|
||||
Support regular quit of the lvm_thread_fn function in clvmd.
|
||||
Fix reading of unallocated memory in lvm1 format import function.
|
||||
Replace several strncmp() calls with id_equal().
|
||||
|
@ -195,6 +195,14 @@ static int _maps_line(const struct config_node *cn, lvmlock_t lock,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VALGRIND_POOL
|
||||
/*
|
||||
* Valgrind is continually eating memory while executing code
|
||||
* so we need to deactivate check of locked memory size
|
||||
*/
|
||||
sz -= sz; /* = 0, but avoids getting warning about dead assigment */
|
||||
|
||||
#endif
|
||||
*mstats += sz;
|
||||
log_debug("%s %10ldKiB %12lx - %12lx %c%c%c%c%s",
|
||||
(lock == LVM_MLOCK) ? "mlock" : "munlock",
|
||||
|
@ -238,6 +238,9 @@ void *dm_pool_end_object(struct dm_pool *p)
|
||||
|
||||
void dm_pool_abandon_object(struct dm_pool *p)
|
||||
{
|
||||
#ifdef VALGRIND_POOL
|
||||
VALGRIND_MAKE_MEM_NOACCESS(p->chunk, p->object_len);
|
||||
#endif
|
||||
p->object_len = 0;
|
||||
p->object_alignment = DEFAULT_ALIGNMENT;
|
||||
}
|
||||
@ -278,11 +281,5 @@ static struct chunk *_new_chunk(struct dm_pool *p, size_t s)
|
||||
|
||||
static void _free_chunk(struct chunk *c)
|
||||
{
|
||||
if (c) {
|
||||
#ifdef VALGRIND_POOL
|
||||
VALGRIND_MAKE_MEM_UNDEFINED(c, c->end - (char *) c);
|
||||
#endif
|
||||
|
||||
dm_free(c);
|
||||
}
|
||||
dm_free(c);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user