[Bug dynamic-link/19762] New: HAS_CPU_FEATURE/HAS_ARCH_FEATURE are easy to misuse

hjl.tools at gmail dot com sourceware-bugzilla@sourceware.org
Thu Mar 3 23:27:00 GMT 2016


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

            Bug ID: 19762
           Summary: HAS_CPU_FEATURE/HAS_ARCH_FEATURE are easy to misuse
           Product: glibc
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

There are bits and indices into cpuid and feature arrays of
struct cpu_features.  It is very easy to use bits and indices
of cpuid on feature array, especially in assembly codes.  For
example, sysdeps/i386/i686/multiarch/bcopy.S has

        HAS_CPU_FEATURE (Fast_Rep_String)

which should be

        HAS_ARCH_FEATURE (Fast_Rep_String)

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


More information about the Glibc-bugs mailing list