Skip to content

Commit 44f7ba2

Browse files
tiranencukou
authored andcommitted
Make valgrind check more useful
* make valgrind now fails when valgrind detects a definitive memory leak * suppress a known memory leak in OpenLDAP's NSS module python-ldap#111 Signed-off-by: Christian Heimes <cheimes@redhat.com>
1 parent 5f4cc86 commit 44f7ba2

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,17 @@ $(PYTHON_SUPP):
6363
exit 1;
6464

6565
valgrind: build $(PYTHON_SUPP)
66-
valgrind --leak-check=full \
66+
valgrind \
67+
--leak-check=full \
68+
--track-fds=yes \
6769
--suppressions=$(PYTHON_SUPP) \
6870
--suppressions=Misc/python-ldap.supp \
6971
--gen-suppressions=all \
7072
--log-file=build/valgrind.log \
7173
$(PYTHON) setup.py test
74+
75+
@grep -A7 "blocks are definitely lost" build/valgrind.log; \
76+
if [ $$? == 0 ]; then \
77+
echo "Found definitive leak, see build/valgrind.log"; \
78+
exit 1; \
79+
fi

Misc/python-ldap.supp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@
2727
...
2828
}
2929

30+
{
31+
NSS backend leaks one string during first initialization
32+
Memcheck:Leak
33+
match-leak-kinds: definite
34+
fun:malloc
35+
fun:PL_strdup
36+
fun:tlsm_init
37+
...
38+
}
39+
3040
{
3141
Ignore possible leaks in exception initialization
3242
Memcheck:Leak

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy