From 426d2385edb35c216d16554b7deba805c0f0c2e1 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 26 Aug 2019 02:59:12 +0000 Subject: [PATCH] Cache cleared exceptions to prevent SIGFPE loop on trap. fesetenv, as used by fixup_float_environment at the top of Interpret, will trap any trapped and raised exceptions in the floating-point environment it is restoring, which is bad news during a trap. Not really sure how this managed to work in the past... --- src/microcode/floenv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/microcode/floenv.c b/src/microcode/floenv.c index 2672996d3..59e619823 100644 --- a/src/microcode/floenv.c +++ b/src/microcode/floenv.c @@ -90,6 +90,7 @@ clear_float_exceptions (void) { #ifdef HAVE_FECLEAREXCEPT (void) feclearexcept (FE_ALL_EXCEPT); + cache_float_environment (); #endif } -- 2.25.1