https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79449

            Bug ID: 79449
           Summary: ppc builtin expansion of strncmp can cross page (4k)
                    boundary where it should not
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: acsawdey at gcc dot gnu.org
          Reporter: acsawdey at gcc dot gnu.org
                CC: segher at gcc dot gnu.org, wschmidt at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc64*-*-*

When one of the string args to strncmp has alignment of less than 8 bytes, the
builtin expansion code generates a runtime check to see if the string might
cross a 4k boundary. However the runtime check looks for at least the length N
before the next 4k boundary and then the code generated may load a doubleword,
crossing the 4k boundary if N is less than 8.

Reply via email to