public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19710] New: ice on invalid one line C++ code
@ 2005-01-30 13:16 dcb314 at hotmail dot com
  2005-01-30 14:02 ` [Bug preprocessor/19710] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dcb314 at hotmail dot com @ 2005-01-30 13:16 UTC (permalink / raw)
  To: gcc-bugs

Hello there,

I just tried to compile the following illegal C++ code on a
i686-pc-linux-gnu box with the latest gcc 3.4 snapshot 20050128

char fred = ' ;

The compiler said

[dcb@localhost Alphasrc]$ ~/gnu/20050128/results/bin/g++ -c jan29a.cc
jan29a.cc:2: error: missing terminating ' character
jan29a.cc:2: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Here is a bit more detail, provided by valgrind

[dcb@localhost Alphasrc]$ /home/dcb/valgrind/results.220/bin/valgrind
--tool=memcheck -q --trace-children=yes /home/dcb/gnu/20050128/results/bin/g++
jan29a.cc
jan29a.cc:2: error: missing terminating ' character
==12828== Invalid read of size 1
==12828==    at 0x844BFC7: _cpp_lex_direct (cpplex.c:820)
==12828==    by 0x844CA1B: _cpp_lex_token (cpplex.c:710)
==12828==    by 0x844D57B: cpp_get_token (cppmacro.c:1061)
==12828==    by 0x817065C: c_lex_with_flags (c-lex.c:308)
==12828==  Address 0x30 is not stack'd, malloc'd or (recently) free'd
jan29a.cc:2: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[dcb@localhost Alphasrc]$

-- 
           Summary: ice on invalid one line C++ code
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug preprocessor/19710] ice on invalid one line C++ code
  2005-01-30 13:16 [Bug c++/19710] New: ice on invalid one line C++ code dcb314 at hotmail dot com
@ 2005-01-30 14:02 ` pinskia at gcc dot gnu dot org
  2005-01-30 20:01 ` [Bug c++/19710] [3.4 regression] " reichelt at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-30 14:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |preprocessor
           Keywords|                            |ice-on-invalid-code


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


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

* [Bug c++/19710] [3.4 regression] ice on invalid one line C++ code
  2005-01-30 13:16 [Bug c++/19710] New: ice on invalid one line C++ code dcb314 at hotmail dot com
  2005-01-30 14:02 ` [Bug preprocessor/19710] " pinskia at gcc dot gnu dot org
@ 2005-01-30 20:01 ` reichelt at gcc dot gnu dot org
  2005-01-31  0:31 ` giovannibajo at libero dot it
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-01-30 20:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-01-30 20:01 -------
Confirmed.

Giovanni, the bug appears with your patch
http://gcc.gnu.org/ml/gcc-cvs/2004-09/msg00960.html

Could you please have a look?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at gcc dot gnu
                   |                            |dot org, reichelt at gcc dot
                   |                            |gnu dot org
             Status|UNCONFIRMED                 |NEW
          Component|preprocessor                |c++
     Ever Confirmed|                            |1
           Keywords|                            |error-recovery, monitored
      Known to fail|                            |3.4.3
      Known to work|                            |3.4.2 4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-30 20:01:31
               date|                            |
            Summary|ice on invalid one line C++ |[3.4 regression] ice on
                   |code                        |invalid one line C++ code
   Target Milestone|---                         |3.4.4


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


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

* [Bug c++/19710] [3.4 regression] ice on invalid one line C++ code
  2005-01-30 13:16 [Bug c++/19710] New: ice on invalid one line C++ code dcb314 at hotmail dot com
  2005-01-30 14:02 ` [Bug preprocessor/19710] " pinskia at gcc dot gnu dot org
  2005-01-30 20:01 ` [Bug c++/19710] [3.4 regression] " reichelt at gcc dot gnu dot org
@ 2005-01-31  0:31 ` giovannibajo at libero dot it
  2005-05-19 17:42 ` mmitchel at gcc dot gnu dot org
  2005-07-23  5:00 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: giovannibajo at libero dot it @ 2005-01-31  0:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2005-01-31 00:31 -------
Yes, but I am not sure what is the best fix. Mark, shouldn't 
cp_lexer_peek_nth_token always work, no matter how big the N is? I think it 
could return NULL if N is too big, but segfaulting looks a little too much to 
me.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|giovannibajo at gcc dot gnu |mmitchel at gcc dot gnu dot
                   |dot org                     |org
         AssignedTo|unassigned at gcc dot gnu   |giovannibajo at libero dot
                   |dot org                     |it
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/19710] [3.4 regression] ice on invalid one line C++ code
  2005-01-30 13:16 [Bug c++/19710] New: ice on invalid one line C++ code dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2005-01-31  0:31 ` giovannibajo at libero dot it
@ 2005-05-19 17:42 ` mmitchel at gcc dot gnu dot org
  2005-07-23  5:00 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:42 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.4                       |3.4.5


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


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

* [Bug c++/19710] [3.4 regression] ice on invalid one line C++ code
  2005-01-30 13:16 [Bug c++/19710] New: ice on invalid one line C++ code dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2005-05-19 17:42 ` mmitchel at gcc dot gnu dot org
@ 2005-07-23  5:00 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-23  5:00 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


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


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

end of thread, other threads:[~2005-07-23  5:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-30 13:16 [Bug c++/19710] New: ice on invalid one line C++ code dcb314 at hotmail dot com
2005-01-30 14:02 ` [Bug preprocessor/19710] " pinskia at gcc dot gnu dot org
2005-01-30 20:01 ` [Bug c++/19710] [3.4 regression] " reichelt at gcc dot gnu dot org
2005-01-31  0:31 ` giovannibajo at libero dot it
2005-05-19 17:42 ` mmitchel at gcc dot gnu dot org
2005-07-23  5:00 ` pinskia at gcc dot gnu dot 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).