[Bug math/32918] New: math: atanhf triggers UB

adhemerval.zanella at linaro dot org sourceware-bugzilla@sourceware.org
Tue Apr 29 18:07:41 GMT 2025


https://sourceware.org/bugzilla/show_bug.cgi?id=32918

            Bug ID: 32918
           Summary: math: atanhf triggers UB
           Product: glibc
           Version: 2.41
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: adhemerval.zanella at linaro dot org
  Target Milestone: ---

The let shift overflows the 'int' type used:

sysdeps/ieee754/flt-32/e_atanhf.c

137   unsigned int e = ax >> 24;
138   unsigned int md = ((ux << 8) | 1U << 31) >> (126 - e);
139   unsigned int mn = -md;

The CORE-MATH already fixed it on commit 4d6192d2.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list