]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
m68k: Fix fmod/fmodf infinite recursion (BZ 34508) master
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 12 Aug 2026 12:03:17 +0000 (09:03 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 12 Aug 2026 18:19:39 +0000 (15:19 -0300)
Commits 6deadd4eb6a and ade9f30ce27 changed m68k fmod to call
__m81_u(fmod), instead of the mathimpl.h inline
__m81_u(__ieee754_fmod) (that wraps the m68k fmod instruction).
This leads to infinite recursion.

Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
sysdeps/m68k/m680x0/fpu/e_fmod.c
sysdeps/m68k/m680x0/fpu/e_fmodf.c

index 9ad6924422e47d504e50318dee5a6b8b7fdf9e75..faac7c79e38826aa04317f092788865e6ba0ec39 100644 (file)
@@ -33,7 +33,7 @@ __fmod (double x, double y)
                        && !is_nan (hx)))
     return __math_invalid (x);
 
-  return __m81_u(fmod)(x, y);
+  return __m81_u(__ieee754_fmod)(x, y);
 }
 strong_alias (__fmod, __ieee754_fmod)
 libm_alias_finite (__ieee754_fmod, __fmod)
index a3bd24b71f0d0ec03e4a704870dcc95a34e4be92..98797e088744310a5c167e2973028c9ce675be0c 100644 (file)
@@ -34,7 +34,7 @@ __fmodf (float x, float y)
                        && !is_nan (hx)))
     return __math_invalidf (x);
 
-  return __m81_u(fmodf)(x, y);
+  return __m81_u(__ieee754_fmodf)(x, y);
 }
 strong_alias (__fmodf, __ieee754_fmodf)
 versioned_symbol (libm, __fmodf, fmodf, GLIBC_2_43);