[COMMITTED] m68k: Fix fmod/fmodf infinite recursion (BZ 34508)
Adhemerval Zanella
adhemerval.zanella@linaro.org
Wed Aug 12 18:22:04 GMT 2026
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 | 2 +-
sysdeps/m68k/m680x0/fpu/e_fmodf.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/m68k/m680x0/fpu/e_fmod.c b/sysdeps/m68k/m680x0/fpu/e_fmod.c
index 9ad6924422e..faac7c79e38 100644
--- a/sysdeps/m68k/m680x0/fpu/e_fmod.c
+++ b/sysdeps/m68k/m680x0/fpu/e_fmod.c
@@ -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)
diff --git a/sysdeps/m68k/m680x0/fpu/e_fmodf.c b/sysdeps/m68k/m680x0/fpu/e_fmodf.c
index a3bd24b71f0..98797e08874 100644
--- a/sysdeps/m68k/m680x0/fpu/e_fmodf.c
+++ b/sysdeps/m68k/m680x0/fpu/e_fmodf.c
@@ -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);
--
2.53.0
More information about the Libc-alpha
mailing list