From a5bd97a363284ce99d43054a5b4ac57b83534327 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 10 Sep 2020 14:31:32 +0100 Subject: [PATCH] [Minor] Add leak explanation --- src/libserver/worker_util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index a8ee92ec9..40f448954 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -1582,7 +1582,12 @@ rspamd_set_crash_handler (struct rspamd_main *rspamd_main) stack_t ss; memset (&ss, 0, sizeof ss); - /* Allocate special stack, NOT freed at the end so far */ + /* + * Allocate special stack, NOT freed at the end so far + * It also cannot be on stack as this memory is used when + * stack corruption is detected. Leak sanitizer blames about it but + * I don't know any good ways to stop this behaviour. + */ ss.ss_size = MAX (SIGSTKSZ, 8192 * 4); ss.ss_sp = g_malloc0 (ss.ss_size); sigaltstack (&ss, NULL); -- 2.39.5