Skip to content

Commit b63053a

Browse files
committed
Suppress Valgrind warnings for leaks about wargv
The `wargv` array is allocated in `main()` and possibly freed in `main()`, but its elements are intentionally leaked because some of them are used for the lifetime of the program. Suppress the warnings about these leaks in the Valgrind suppression file.
1 parent 7885244 commit b63053a

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

tests/valgrind.supp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,43 @@
2828
...
2929
fun:getpwnam_r@@GLIBC_2.2.5
3030
}
31+
{
32+
Memcheck:Leak:wargv_element
33+
Memcheck:Leak
34+
match-leak-kinds: definite,possible
35+
fun:malloc
36+
fun:xmalloc
37+
fun:xmallocn
38+
fun:xmalloce
39+
fun:wb_initwithmax
40+
fun:wb_init
41+
fun:malloc_mbstowcs
42+
fun:main
43+
}
44+
{
45+
Memcheck:Leak:wargv_element_reallocated
46+
Memcheck:Leak
47+
match-leak-kinds: definite,possible
48+
fun:realloc
49+
fun:xrealloc
50+
fun:xreallocn
51+
fun:xrealloce
52+
fun:wb_setmax
53+
fun:wb_ensuremax
54+
fun:wb_mbscat
55+
fun:malloc_mbstowcs
56+
fun:main
57+
}
58+
{
59+
Memcheck:Leak:wargv
60+
Memcheck:Leak
61+
match-leak-kinds: definite
62+
fun:malloc
63+
fun:xmalloc
64+
fun:xmallocn
65+
fun:xmalloce
66+
fun:main
67+
}
3168
{
3269
Memcheck:Leak:open_redirections
3370
Memcheck:Leak

0 commit comments

Comments
 (0)