From: Adhemerval Zanella Date: Tue, 9 Jan 2024 19:40:33 +0000 (-0300) Subject: math: Fix test-fenv.c feupdateenv tests X-Git-Tag: glibc-2.39~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=497e4d503025c794a771d2c124123178f557623a;p=thirdparty%2Fglibc.git 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 --- diff --git a/math/test-fenv.c b/math/test-fenv.c index 9db6789e64b..8d39181b14d 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