[Libguestfs] [PATCH v3 07/22] valgrind: Ignore PCRE.compile regexps stored in a global variable.

Richard W.M. Jones rjones at redhat.com
Fri Sep 22 07:36:08 UTC 2017


---
 valgrind-suppressions | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/valgrind-suppressions b/valgrind-suppressions
index 1c4b35355..2bc70659d 100644
--- a/valgrind-suppressions
+++ b/valgrind-suppressions
@@ -171,6 +171,17 @@
    fun:caml_build_primitive_table
 }
 
+# The OCaml PCRE.compile function calls pcre_compile2 which allocates
+# memory.  If these regexps are stored in a global variable then they
+# can never be freed.  This is not really a bug, so ignore it.
+{
+   ocaml_pcre_globals
+   Memcheck:Leak
+   fun:malloc
+   fun:pcre_compile2
+   ...
+}
+
 # glibc
 {
    glibc_cond
-- 
2.13.2




More information about the Libguestfs mailing list