about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-01-09 16:40:33 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-01-10 08:55:17 -0300
commit497e4d503025c794a771d2c124123178f557623a (patch)
treeb8c4a4fb7481efb5f9f3e561a67d786bc28fb065 /math
parent1eae989cb7632760fd6f4008be73549da861b202 (diff)
downloadglibc-497e4d503025c794a771d2c124123178f557623a.tar.gz
glibc-497e4d503025c794a771d2c124123178f557623a.tar.xz
glibc-497e4d503025c794a771d2c124123178f557623a.zip
math: Fix test-fenv.c feupdateenv tests
The feupdateenv tests added by 802aef27b2 do not restore the floating
point mask, which might keep some floating point exception enabled and
thus make the feupdateenv_single_test raise an unexpected signal.

Checked on x86_64-linux-gnu and aarch64-linux-gnu (on Apple M1 trapping
is supported).
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
Diffstat (limited to 'math')
-rw-r--r--math/test-fenv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/math/test-fenv.c b/math/test-fenv.c
index 9db6789e64..8d39181b14 100644
--- a/math/test-fenv.c
+++ b/math/test-fenv.c
@@ -659,6 +659,7 @@ static void
 feupdate_single_test (const char *flag_name, int fe_exc)
 {
   feenv_nomask_test (flag_name, fe_exc, feupdateenv);
+  fesetenv (FE_DFL_ENV);
   feenv_mask_test (flag_name, fe_exc, feupdateenv);
 }
 #endif