Date: Thu, 21 Aug 2025 10:43:40 +0000 From: bugzilla-noreply@freebsd.org To: numerics@FreeBSD.org Subject: [Bug 288850] [libm] avoid left shift of signed integer entity in ilogbf(), fmodf(), and remquof(). Message-ID: <bug-288850-18636-OWKvn95oIO@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-288850-18636@https.bugs.freebsd.org/bugzilla/> References: <bug-288850-18636@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288850 --- Comment #3 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=8d2c0354e138c49e2d5f6e0160fd3c710052a0ef commit 8d2c0354e138c49e2d5f6e0160fd3c710052a0ef Author: Steve Kargl <kargl@FreeBSD.org> AuthorDate: 2025-08-14 18:38:41 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2025-08-21 10:41:43 +0000 [libm] Avoid left shift of signed integer entities Follow-up commit d180086e6eae by fixing the left shift of signed integer entities through the use of a helper function. Specific per file changes are: * lib/msun/src/e_fmodf.c: * lib/msun/src/s_remquof.c: . Eliminate now unused variable 'i'. . Sort declaration statement. . Use subnormal_ilogbf() to avoid left shift of signed integer. * lib/msun/src/math_private.h b/lib/msun/src/math_private.h: . Implement subnormal_ilogbf() to extract an exponent of a subnormal float. This avoids left shifts of signed integers. . Update nearby comment. * lib/msun/src/s_ilogbf.c . Fix declaration of the function statement in accordance with style(9). . Use subnormal_ilogbf() to avoid left shift of signed integer. PR: 288850 MFC after: 1 week (cherry picked from commit c58c77246f88da87f309e8c449e98195d43e2c76) lib/msun/src/e_fmodf.c | 16 +++++++++------- lib/msun/src/math_private.h | 16 +++++++++++++++- lib/msun/src/s_ilogbf.c | 5 +++-- lib/msun/src/s_remquof.c | 16 +++++++++------- 4 files changed, 36 insertions(+), 17 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-288850-18636-OWKvn95oIO>
