-
Notifications
You must be signed in to change notification settings - Fork 686
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from prymitive/valgrind
valgrind suppression file generator
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
valgrind-generate-sups.sh | ||
========================= | ||
|
||
This script can be used to generate valgrind suppression file. | ||
Valgrind will show a lot of python related errors, to filter them out You can: | ||
|
||
./valgrind-generate-sups.sh > valgrind.suppression | ||
valgrind --tool=memcheck --suppressions=valgrind.suppression [ARGS] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
|
||
gensup() { | ||
for SUP in Cond Free Leak Overlap Addr1 Addr2 Addr4 Addr8 Addr16 Value1 Value2 Value4 Value8 Value16 ; do | ||
echo " | ||
{ | ||
Autogenerated $1 suppression | ||
Memcheck:${SUP} | ||
obj:$2 | ||
} | ||
" | ||
done | ||
} | ||
|
||
|
||
while read SO ; do | ||
gensup libpython "$SO" | ||
done < <(find /usr/lib*/ -type f -name libpython*) | ||
|
||
|
||
while read SO ; do | ||
gensup python "$SO" | ||
done < <(find /usr/lib*/python*/ -type f -name \*.so) | ||
|