diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-01-07 16:02:59 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-01-07 16:02:59 +0000 |
commit | 13d60df725ae1943d2085fb2c66ca24154352b6d (patch) | |
tree | af4ffb196abaaac05a94e2605427a8bf0a3e3324 /src/libserver/worker_util.c | |
parent | bc23d662720ce7e8cf517da75b2655becdb81272 (diff) | |
download | rspamd-13d60df725ae1943d2085fb2c66ca24154352b6d.tar.gz rspamd-13d60df725ae1943d2085fb2c66ca24154352b6d.zip |
[Minor] Try to silence intentional leak for sigaltstack
Diffstat (limited to 'src/libserver/worker_util.c')
-rw-r--r-- | src/libserver/worker_util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 71bbe4860..7d7a50d35 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -1607,13 +1607,14 @@ rspamd_crash_sig_handler (int sig, siginfo_t *info, void *ctx) } #endif -void +RSPAMD_NO_SANITIZE void rspamd_set_crash_handler (struct rspamd_main *rspamd_main) { #ifdef HAVE_SA_SIGINFO struct sigaction sa; #ifdef HAVE_SIGALTSTACK + void *stack_mem; stack_t ss; memset (&ss, 0, sizeof ss); @@ -1624,7 +1625,8 @@ rspamd_set_crash_handler (struct rspamd_main *rspamd_main) * 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); + stack_mem = g_malloc0 (ss.ss_size); + ss.ss_sp = stack_mem; sigaltstack (&ss, NULL); #endif saved_main = rspamd_main; |