diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-01-09 16:40:33 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-01-10 08:55:17 -0300 |
commit | 497e4d503025c794a771d2c124123178f557623a (patch) | |
tree | b8c4a4fb7481efb5f9f3e561a67d786bc28fb065 /math/test-fenv.c | |
parent | 1eae989cb7632760fd6f4008be73549da861b202 (diff) | |
download | glibc-497e4d503025c794a771d2c124123178f557623a.zip glibc-497e4d503025c794a771d2c124123178f557623a.tar.gz glibc-497e4d503025c794a771d2c124123178f557623a.tar.bz2 |
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/test-fenv.c')
-rw-r--r-- | math/test-fenv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/math/test-fenv.c b/math/test-fenv.c index 9db6789..8d39181 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 |