From b13d2be64ff7f855465002cd507cb830de0d43da Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 24 Jan 2024 23:24:45 -0800 Subject: [PATCH] src/cysignals/implementation.c [EMSCRIPTEN]: Do not use sigaltstack This is https://github.com/sagemath/cysignals/pull/197 --- src/cysignals/implementation.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cysignals/implementation.c b/src/cysignals/implementation.c index 2afd6ad..3088cdf 100644 --- a/src/cysignals/implementation.c +++ b/src/cysignals/implementation.c @@ -531,7 +531,7 @@ static void _sig_off_warning(const char* file, int line) static void setup_alt_stack(void) { -#if HAVE_SIGALTSTACK +#if HAVE_SIGALTSTACK && !defined(__EMSCRIPTEN__) /* Space for the alternate signal stack. The size should be * of the form MINSIGSTKSZ + constant. The constant is chosen rather * ad hoc but sufficiently large. @@ -576,7 +576,9 @@ static void setup_cysignals_handlers(void) * After setting up the trampoline, we reset the signal mask. */ sigprocmask(SIG_BLOCK, &sa.sa_mask, &default_sigmask); #endif +#if !defined(__EMSCRIPTEN__) setup_trampoline(); +#endif #if HAVE_SIGPROCMASK sigprocmask(SIG_SETMASK, &default_sigmask, &sigmask_with_sigint); #endif -- 2.42.0