https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288778
Bug ID: 288778
Summary: [libm] Fix undefined behavior of a left shifted of a
signed integer
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
Created attachment 262855
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=262855&action=edit
Fix issues with left shift of signed integer entities
The attached patch fixes a few instances of left shifts on
signed integer entities. A 'static inline' helper function
'subnormal_ilogb()' has been added to math_private.h. This
function is then used e_fmod.c, s_ilogb(), and s_remquo.c.
The change in s_remquo.c has only been compile tested.
The change to e_fmod.c has been test on over 3 billion pairs
of subnormal numbers where testing included x > y and x < y
pairs. The test compared the output from fmod() with the
output from mpfr_fmod() from MPFR. There were no difference.
The change to s_ilogb() has had limited testing where its
output was compared against frexp(). In this testing, no
differences in output were detected.
--
You are receiving this mail because:
You are the assignee for the bug.