public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/11361] New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner
@ 2003-06-28 16:18 giovannibajo at libero dot it
  2003-06-28 16:28 ` [Bug preprocessor/11361] " pinskia at physics dot uc dot edu
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: giovannibajo at libero dot it @ 2003-06-28 16:18 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [3.4 regression] ICE (segfault) in c-lex.c with one-
                    liner
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: giovannibajo at libero dot it
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin

Just compile this line:

# 31 "eval.c" 2

to get a segmentation fault.

#0  fe_file_change (new_map=0x0) at ../../gcc/gcc/c-lex.c:205
#1  0x005618dd in cb_file_change (pfile=0xa069f48, new_map=0x0)
    at ../../gcc/gcc/c-opts.c:1415
#2  0x008b9870 in do_linemarker (pfile=0xa069f48) at ../../gcc/gcc/cpplib.c:873
#3  0x008b89c8 in _cpp_handle_directive (pfile=0xa069f48, indented=0)
    at ../../gcc/gcc/cpplib.c:424
#4  0x008bca59 in _cpp_lex_token (pfile=0xa069f48)
    at ../../gcc/gcc/cpplex.c:659
#5  0x008c37c0 in cpp_get_token (pfile=0xa069f48)
    at ../../gcc/gcc/cppmacro.c:1064
#6  0x0055446d in c_lex (value=0x22fcb4) at ../../gcc/gcc/c-lex.c:307
#7  0x004c29f8 in cp_lexer_get_preprocessor_token (lexer=0x0, token=0x22fcb0)
    at ../../gcc/gcc/cp/parser.c:632
#8  0x004c240a in cp_lexer_new_main () at ../../gcc/gcc/cp/parser.c:304


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

* [Bug preprocessor/11361] [3.4 regression] ICE (segfault) in c-lex.c with one-liner
  2003-06-28 16:18 [Bug preprocessor/11361] New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner giovannibajo at libero dot it
@ 2003-06-28 16:28 ` pinskia at physics dot uc dot edu
  2003-06-28 20:06 ` [Bug preprocessor/11361] New: " Neil Booth
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-28 16:28 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-28 16:28:50
               date|                            |
            Summary|[3.4 regression] ICE        |[3.4 regression] ICE
                   |(segfault) in c-lex.c with  |(segfault) in c-lex.c with
                   |one-liner                   |one-liner


------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-28 16:28 -------
I can confirm this on the mainline (20030628) with the c++ and c frontends.
With the FORTRAN frontend I get an error:
[omni:~/src/gccPRs] pinskia% g77 pr11361.f
eval.c:30: error: #-lines for entering and leaving files don't match

Here is the backtrace for the c frontend (looks like pfile->map is not being initialized):
#0  fe_file_change (new_map=0x0) at /Volumes/UFS_Partition/pinskia/src/fsf/gcc-clean/src/gcc/
c-lex.c:207
#1  0x00035610 in cb_file_change (pfile=0x0, new_map=0x0) at /Volumes/UFS_Partition/pinskia/
src/fsf/gcc-clean/src/gcc/c-opts.c:1415
#2  0x000485c8 in _cpp_do_file_change (pfile=0xc32c70, reason=LC_ENTER, to_file=0x35610 
"\210\037", file_line=31, sysp=12803959) at /Volumes/UFS_Partition/pinskia/src/fsf/gcc-clean/
src/gcc/cpplib.c:889
#3  0x00048528 in do_linemarker (pfile=0xc32c70) at /Volumes/UFS_Partition/pinskia/src/fsf/
gcc-clean/src/gcc/cpplib.c:873
#4  0x00047850 in _cpp_handle_directive (pfile=0xc32c70, indented=0) at /Volumes/
UFS_Partition/pinskia/src/fsf/gcc-clean/src/gcc/cpplib.c:424
#5  0x00041fb8 in _cpp_lex_token (pfile=0xc32c70) at /Volumes/UFS_Partition/pinskia/src/fsf/
gcc-clean/src/gcc/cpplex.c:659
#6  0x0003fde0 in cpp_get_token (pfile=0xc32c70) at /Volumes/UFS_Partition/pinskia/src/fsf/
gcc-clean/src/gcc/cppmacro.c:1064
#7  0x0000ce2c in c_lex (value=0x3cb028) at /Volumes/UFS_Partition/pinskia/src/fsf/gcc-clean/
src/gcc/c-lex.c:307
#8  0x00007ac4 in _yylex () at c-parse.y:2966
#9  0x000078f4 in yylex () at c-parse.y:3074
#10 0x00002d28 in yyparse () at /usr/share/bison.simple:432
#11 0x00034dc0 in c_common_parse_file (set_yydebug=0) at /Volumes/UFS_Partition/pinskia/
src/fsf/gcc-clean/src/gcc/c-opts.c:1179
#12 0x0006fa3c in compile_file () at /Volumes/UFS_Partition/pinskia/src/fsf/gcc-clean/src/gcc/
toplev.c:2075
#13 0x00075448 in do_compile () at /Volumes/UFS_Partition/pinskia/src/fsf/gcc-clean/src/gcc/
toplev.c:5147
#14 0x000754d8 in toplev_main (argc=14, argv=0xbffffbdc) at /Volumes/UFS_Partition/pinskia/
src/fsf/gcc-clean/src/gcc/toplev.c:5176
#15 0x00001cb8 in _start (argc=14, argv=0xbffffbdc, envp=0xbffffc18) at /SourceCache/Csu/
Csu-45/crt.c:267
#16 0x00001b38 in start ()


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

* Re: [Bug preprocessor/11361] New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner
  2003-06-28 16:18 [Bug preprocessor/11361] New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner giovannibajo at libero dot it
  2003-06-28 16:28 ` [Bug preprocessor/11361] " pinskia at physics dot uc dot edu
@ 2003-06-28 20:06 ` Neil Booth
  2003-06-28 20:06 ` [Bug preprocessor/11361] " neil at daikokuya dot co dot uk
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Neil Booth @ 2003-06-28 20:06 UTC (permalink / raw)
  To: giovannibajo at libero dot it; +Cc: gcc-bugs, per

giovannibajo at libero dot it wrote:-

> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11361
> 
>            Summary: [3.4 regression] ICE (segfault) in c-lex.c with one-
>                     liner
>            Product: gcc
>            Version: 3.4
>             Status: UNCONFIRMED
>           Keywords: ice-on-invalid-code
>           Severity: normal
>           Priority: P2
>          Component: preprocessor
>         AssignedTo: unassigned at gcc dot gnu dot org
>         ReportedBy: giovannibajo at libero dot it
>                 CC: gcc-bugs at gcc dot gnu dot org
>  GCC build triplet: i686-pc-cygwin
>   GCC host triplet: i686-pc-cygwin
> GCC target triplet: i686-pc-cygwin
> 
> Just compile this line:
> 
> # 31 "eval.c" 2
> 
> to get a segmentation fault.

Per, this was introduced by your line-map.c change of a few months ago.
line-map.c used to guarantee to retain internal consistency even if
the client gave it nonsense, and cpplib relies on that.  After your
patch, it no longer maintains internal consistency.

Neil.


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

* [Bug preprocessor/11361] [3.4 regression] ICE (segfault) in c-lex.c with one-liner
  2003-06-28 16:18 [Bug preprocessor/11361] New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner giovannibajo at libero dot it
  2003-06-28 16:28 ` [Bug preprocessor/11361] " pinskia at physics dot uc dot edu
  2003-06-28 20:06 ` [Bug preprocessor/11361] New: " Neil Booth
@ 2003-06-28 20:06 ` neil at daikokuya dot co dot uk
  2003-06-28 20:14 ` giovannibajo at libero dot it
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: neil at daikokuya dot co dot uk @ 2003-06-28 20:06 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From neil at daikokuya dot co dot uk  2003-06-28 20:06 -------
Subject: Re:  New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner

giovannibajo at libero dot it wrote:-

> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11361
> 
>            Summary: [3.4 regression] ICE (segfault) in c-lex.c with one-
>                     liner
>            Product: gcc
>            Version: 3.4
>             Status: UNCONFIRMED
>           Keywords: ice-on-invalid-code
>           Severity: normal
>           Priority: P2
>          Component: preprocessor
>         AssignedTo: unassigned at gcc dot gnu dot org
>         ReportedBy: giovannibajo at libero dot it
>                 CC: gcc-bugs at gcc dot gnu dot org
>  GCC build triplet: i686-pc-cygwin
>   GCC host triplet: i686-pc-cygwin
> GCC target triplet: i686-pc-cygwin
> 
> Just compile this line:
> 
> # 31 "eval.c" 2
> 
> to get a segmentation fault.

Per, this was introduced by your line-map.c change of a few months ago.
line-map.c used to guarantee to retain internal consistency even if
the client gave it nonsense, and cpplib relies on that.  After your
patch, it no longer maintains internal consistency.

Neil.


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

* [Bug preprocessor/11361] [3.4 regression] ICE (segfault) in c-lex.c with one-liner
  2003-06-28 16:18 [Bug preprocessor/11361] New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner giovannibajo at libero dot it
                   ` (2 preceding siblings ...)
  2003-06-28 20:06 ` [Bug preprocessor/11361] " neil at daikokuya dot co dot uk
@ 2003-06-28 20:14 ` giovannibajo at libero dot it
  2003-07-15 15:21 ` pinskia at physics dot uc dot edu
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: giovannibajo at libero dot it @ 2003-06-28 20:14 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


giovannibajo at libero dot it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bothner at gcc dot gnu dot
                   |dot org                     |org


------- Additional Comments From giovannibajo at libero dot it  2003-06-28 20:14 -------
Neils says it's caused by this patch:

2003-03-18  Per Bothner  <per at bothner dot com>
	Various cleanups to help compile server.

http://gcc.gnu.org/ml/gcc-patches/2003-03/msg01716.html

I'm assigning the bug to Per.


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

* [Bug preprocessor/11361] [3.4 regression] ICE (segfault) in c-lex.c with one-liner
  2003-06-28 16:18 [Bug preprocessor/11361] New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner giovannibajo at libero dot it
                   ` (3 preceding siblings ...)
  2003-06-28 20:14 ` giovannibajo at libero dot it
@ 2003-07-15 15:21 ` pinskia at physics dot uc dot edu
  2003-07-22 23:11 ` cvs-commit at gcc dot gnu dot org
  2003-07-22 23:16 ` pinskia at physics dot uc dot edu
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-15 15:21 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-06-28 16:28:50         |2003-07-15 15:21:31
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-15 15:21 -------
This patch never went in.


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

* [Bug preprocessor/11361] [3.4 regression] ICE (segfault) in c-lex.c with one-liner
  2003-06-28 16:18 [Bug preprocessor/11361] New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner giovannibajo at libero dot it
                   ` (4 preceding siblings ...)
  2003-07-15 15:21 ` pinskia at physics dot uc dot edu
@ 2003-07-22 23:11 ` cvs-commit at gcc dot gnu dot org
  2003-07-22 23:16 ` pinskia at physics dot uc dot edu
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-07-22 23:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-07-22 23:11 -------
Subject: Bug 11361

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bothner@gcc.gnu.org	2003-07-22 23:11:38

Modified files:
	gcc            : line-map.c ChangeLog 

Log message:
	* line-map.c (add_line_map):  Handle invalid LEAVE request.
	Fixes PR preprocessor/11361.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/line-map.c.diff?cvsroot=gcc&r1=1.13&r2=1.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.597&r2=2.598


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

* [Bug preprocessor/11361] [3.4 regression] ICE (segfault) in c-lex.c with one-liner
  2003-06-28 16:18 [Bug preprocessor/11361] New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner giovannibajo at libero dot it
                   ` (5 preceding siblings ...)
  2003-07-22 23:11 ` cvs-commit at gcc dot gnu dot org
@ 2003-07-22 23:16 ` pinskia at physics dot uc dot edu
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-22 23:16 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-22 23:16 -------
Fixed by the patch.


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

end of thread, other threads:[~2003-07-22 23:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-28 16:18 [Bug preprocessor/11361] New: [3.4 regression] ICE (segfault) in c-lex.c with one-liner giovannibajo at libero dot it
2003-06-28 16:28 ` [Bug preprocessor/11361] " pinskia at physics dot uc dot edu
2003-06-28 20:06 ` [Bug preprocessor/11361] New: " Neil Booth
2003-06-28 20:06 ` [Bug preprocessor/11361] " neil at daikokuya dot co dot uk
2003-06-28 20:14 ` giovannibajo at libero dot it
2003-07-15 15:21 ` pinskia at physics dot uc dot edu
2003-07-22 23:11 ` cvs-commit at gcc dot gnu dot org
2003-07-22 23:16 ` pinskia at physics dot uc dot edu

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).