https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288850

            Bug ID: 288850
           Summary: [libm] avoid left shift of signed integer entity in
                    ilogbf(), fmodf(), and remquof().
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 262944
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=262944&action=edit
avoid left shift of signed integer entities

As a followup to git revision d180086e6eae2e15, the attached patch
fixes 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to