From 3a1ff983816c00a53d2e2585a4f68bc7c79dac75 Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 15 Jan 2018 10:20:28 +0000 Subject: [PATCH] install: extend python-related valgrind rules These were set for kind 'possible' which was failing to suppress Leak_DefinitelyLost errors. Also add several suppressions related to module initialization. Signed-off-by: John Spray --- teuthology/task/install/valgrind.supp | 48 ++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/teuthology/task/install/valgrind.supp b/teuthology/task/install/valgrind.supp index c9b461f92..58c07e21e 100644 --- a/teuthology/task/install/valgrind.supp +++ b/teuthology/task/install/valgrind.supp @@ -403,36 +403,68 @@ { python does not reset the member field when dealloc an object Memcheck:Leak - match-leak-kinds: possible + match-leak-kinds: all ... fun:Py_InitializeEx ... } +{ + statically allocated python types don't get members freed + Memcheck:Leak + match-leak-kinds: all + ... + fun:PyType_Ready + ... +} +{ + manually constructed python module members don't get freed + Memcheck:Leak + match-leak-kinds: all + ... + fun:Py_InitModule4_64 + ... +} +{ + manually constructed python module members don't get freed + Memcheck:Leak + match-leak-kinds: all + ... + fun:PyModule_AddObject + ... +} +{ + python subinterpreters may not clean up properly + Memcheck:Leak + match-leak-kinds: all + ... + fun:Py_NewInterpreter + ... +} { python should be able to take care of itself Memcheck:Leak - match-leak-kinds: possible + match-leak-kinds: all ... fun:PyEval_EvalCode } { python should be able to take care of itself Memcheck:Leak - match-leak-kinds: possible + match-leak-kinds: all ... fun:PyImport_ImportModuleLevel } { - python should be able to take care of itself + python-owned threads may not full clean up after themselves Memcheck:Leak - match-leak-kinds: possible + match-leak-kinds: all ... fun:PyEval_CallObjectWithKeywords } { python should be able to take care of itself Memcheck:Leak - match-leak-kinds: possible + match-leak-kinds: all ... fun:PyEval_EvalFrameEx ... @@ -441,7 +473,7 @@ { python should be able to take care of itself Memcheck:Leak - match-leak-kinds: possible + match-leak-kinds: all ... fun:PyObject_Call } @@ -490,4 +522,4 @@ ... fun:_dlerror_run fun:dlopen@@GLIBC_2.2.5 -} \ No newline at end of file +} -- 2.47.3