From f18f7c9a21e30dd3d4df895e958ffbc0b35219d8 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 17 Jun 2020 11:26:13 +0100 Subject: [PATCH 1/3] glib.supp: Tweak reachable allocation suppressions Suppress the cached charset from `g_get_charset()`, and widen the suppression of the global random number `GRand` instance, since it can be used outside test cases. Signed-off-by: Philip Withnall Fixes: #2134 --- glib.supp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/glib.supp b/glib.supp index 83c30f9b1..fc37de98f 100644 --- a/glib.supp +++ b/glib.supp @@ -218,7 +218,7 @@ } { - g-test-rand-init2 + g-rand-init2 Memcheck:Leak match-leak-kinds:reachable fun:calloc @@ -226,8 +226,6 @@ fun:g_rand_new_with_seed_array ... fun:get_global_random - ... - fun:g_test_init } { @@ -967,3 +965,13 @@ ... fun:g_file_* } + +# Cached charset +{ + g_get_charset + Memcheck:Leak + match-leak-kinds:reachable + fun:malloc + ... + fun:g_get_charset +} From 8bb04fb866079be46324c2376677ac71a94a1d6f Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 17 Jun 2020 11:46:27 +0100 Subject: [PATCH 2/3] glib.supp: More reachable suppressions for threads and thread pools Signed-off-by: Philip Withnall Fixes: #2132 --- glib.supp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/glib.supp b/glib.supp index fc37de98f..b3c9bebb1 100644 --- a/glib.supp +++ b/glib.supp @@ -913,6 +913,15 @@ fun:g_private_set_alloc0 } +# Keys for thread-private data +{ + g_private_key + Memcheck:Leak + match-leak-kinds:reachable + fun:malloc + fun:g_private_impl_new +} + # Thread-private GMainContext stack { g_main_context_push_thread_default @@ -975,3 +984,15 @@ ... fun:g_get_charset } + +# Global unused thread queue +{ + g_thread_pool_unused_thread_queue + Memcheck:Leak + match-leak-kinds:reachable + fun:malloc + ... + fun:g_async_queue_new_full + ... + fun:g_thread_pool_new +} From 784bfaa250d899c307e98b2eb0f1b664bf36cda2 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 17 Jun 2020 11:46:52 +0100 Subject: [PATCH 3/3] gthreadpool: Fix some typos in the docs for g_thread_pool_free() Signed-off-by: Philip Withnall --- glib/gthreadpool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glib/gthreadpool.c b/glib/gthreadpool.c index ed34fcd52..4c717e486 100644 --- a/glib/gthreadpool.c +++ b/glib/gthreadpool.c @@ -861,10 +861,10 @@ g_thread_pool_unprocessed (GThreadPool *pool) * processing a task. Instead at least all still running threads * can finish their tasks before the @pool is freed. * - * If @wait_ is %TRUE, the functions does not return before all + * If @wait_ is %TRUE, this function does not return before all * tasks to be processed (dependent on @immediate, whether all * or only the currently running) are ready. - * Otherwise the function returns immediately. + * Otherwise this function returns immediately. * * After calling this function @pool must not be used anymore. */