From 2092645736b4f2c9f621054fb6adda3b3ec16635 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Fri, 11 Oct 2019 12:47:42 +0200 Subject: [PATCH] lvgl: Suppress memory leak errors detected by valgrind The lvgl library is configured in some tests to use the libC malloc to allocate heap. In native_posix this ends up in the underlying OS heap, which cannot be safely freed in general when the program finnishes, and ends up being reported by valgrind as leaked on exit. See https://github.com/zephyrproject-rtos/zephyr/pull/18471 for a longer discussion. Instead of trying to fix the leak, let's just accept it but suppress the errors so it does not confuse other developers Signed-off-by: Alberto Escolar Piedras --- scripts/valgrind.supp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/valgrind.supp b/scripts/valgrind.supp index 791a792cee8..9719dce16f7 100644 --- a/scripts/valgrind.supp +++ b/scripts/valgrind.supp @@ -23,4 +23,18 @@ fun:pthread_create* fun:posix_boot_cpu fun:main -} \ No newline at end of file +} +{ + lvgl no cleanup + Memcheck:Leak + match-leak-kinds: possible + fun:malloc + fun:lv_mem_alloc +} +{ + lvgl no cleanup 2 + Memcheck:Leak + match-leak-kinds: possible + fun:malloc + fun:lvgl_allocate_rendering_buffers +}