public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/59782] New: libcpp does not avoid bug #48326 when compiled by older GCC
@ 2014-01-12 23:33 michael at talosis dot ca
  2014-01-13  9:53 ` [Bug preprocessor/59782] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: michael at talosis dot ca @ 2014-01-12 23:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59782
           Summary: libcpp does not avoid bug #48326 when compiled by
                    older GCC
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: michael at talosis dot ca

GCC 4.7.0 and other older versions have a bug (#48326) where the target
attribute can leak, causing illegal instructions to be emitted in code intended
to be generic.

GCC 4.6.0 through 4.8.2 also contain code that triggers this bug, in
libcpp/lex.c.  That file uses the target attribute to opportunistically use
MMX/SSE even in a generic binary.

The result is that bootstrap is blocked if starting from 4.7.0 when the actual
CPU does not support the new instructions.

Currently the problem block of code is preprocessed in if GCC 4.5.0 or later is
detected.  It should instead only be used for 4.7.1 or later.

Note that it is somewhat important to also fix this in 4.7.4.  This bug only
bites when upgrading from an old GCC.  If someone has an old GCC with C++ not
installed, then they cannot move directly to 4.8.x, and will have to build
4.7.x as an intermediate.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-10  0:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-12 23:33 [Bug preprocessor/59782] New: libcpp does not avoid bug #48326 when compiled by older GCC michael at talosis dot ca
2014-01-13  9:53 ` [Bug preprocessor/59782] " rguenth at gcc dot gnu.org
2014-01-13 10:09 ` jakub at gcc dot gnu.org
2014-01-13 10:59 ` ubizjak at gmail dot com
2014-01-14  1:21 ` michael at talosis dot ca
2014-01-15  0:53 ` pinskia at gcc dot gnu.org
2014-01-15  8:31 ` jakub at gcc dot gnu.org
2021-09-02  2:12 ` pinskia at gcc dot gnu.org
2022-04-10  0:29 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).