From 4a59a7283fc8df564edb13458ae9fbb74ef243e5 Mon Sep 17 00:00:00 2001 From: Wenyong Huang Date: Wed, 6 Jul 2022 22:24:16 +0800 Subject: [PATCH] set previous sig action to tls --- core/shared/platform/common/posix/posix_thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/shared/platform/common/posix/posix_thread.c b/core/shared/platform/common/posix/posix_thread.c index a102a365c..c3402d904 100644 --- a/core/shared/platform/common/posix/posix_thread.c +++ b/core/shared/platform/common/posix/posix_thread.c @@ -448,8 +448,8 @@ mask_signals(int how) pthread_sigmask(how, &set, NULL); } -static struct sigaction prev_sig_act_SIGSEGV; -static struct sigaction prev_sig_act_SIGBUS; +static os_thread_local_attribute struct sigaction prev_sig_act_SIGSEGV; +static os_thread_local_attribute struct sigaction prev_sig_act_SIGBUS; static void signal_callback(int sig_num, siginfo_t *sig_info, void *sig_ucontext)