[Bug c/35661] New: __attribute__((cold)) generates wrong code

zuxy dot meng at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Mar 21 20:15:00 GMT 2008


On MinGW32, GCC 4.3.0 marks the .text.unlikely section as "w"(writable) instead
of "x"(executable), which makes the assembler to pad the section with zeros
instead of NOPs. Runtime behavior is almost always incorrect and in many cases
an application will crash.


-- 
           Summary: __attribute__((cold)) generates wrong code
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zuxy dot meng at gmail dot com
 GCC build triplet: i686-pc-mingw32
  GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35661



More information about the Gcc-bugs mailing list