public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/105675] New: Segmentation fault
@ 2022-05-20 16:26 watarai775 at gmail dot com
  2022-05-20 17:56 ` [Bug c/105675] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: watarai775 at gmail dot com @ 2022-05-20 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105675
           Summary: Segmentation fault
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: watarai775 at gmail dot com
  Target Milestone: ---

Running gcc on input file from an attachment resulting in segmentation fault

gcc-12 1.cpp

gcc-12: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.

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

* [Bug c/105675] Segmentation fault
  2022-05-20 16:26 [Bug c/105675] New: Segmentation fault watarai775 at gmail dot com
@ 2022-05-20 17:56 ` pinskia at gcc dot gnu.org
  2022-05-20 18:20 ` [Bug c++/105675] " watarai775 at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-20 17:56 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-05-20

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>Running gcc on input file from an attachment resulting in segmentation fault

The file didn't attach, maybe it was too big. Can you try to compress it and
attach that?

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

* [Bug c++/105675] Segmentation fault
  2022-05-20 16:26 [Bug c/105675] New: Segmentation fault watarai775 at gmail dot com
  2022-05-20 17:56 ` [Bug c/105675] " pinskia at gcc dot gnu.org
@ 2022-05-20 18:20 ` watarai775 at gmail dot com
  2022-05-20 18:38 ` [Bug c/105675] " pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: watarai775 at gmail dot com @ 2022-05-20 18:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Ruslan Mkoyan <watarai775 at gmail dot com> ---
Created attachment 53009
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53009&action=edit
Input file

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

* [Bug c/105675] Segmentation fault
  2022-05-20 16:26 [Bug c/105675] New: Segmentation fault watarai775 at gmail dot com
  2022-05-20 17:56 ` [Bug c/105675] " pinskia at gcc dot gnu.org
  2022-05-20 18:20 ` [Bug c++/105675] " watarai775 at gmail dot com
@ 2022-05-20 18:38 ` pinskia at gcc dot gnu.org
  2022-05-22 12:44 ` watarai775 at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-20 18:38 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |WONTFIX
           Keywords|                            |ice-on-valid-code

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a won't fix stitutation. 

You have & on a type repeated 237,679 times. 

With a recusive decent compiler, you run out of stack space with that many
times.
#17 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#18 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#19 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#20 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#21 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#22 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#23 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#24 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#25 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#26 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#27 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#28 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#29 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#30 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#31 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#32 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#33 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#34 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#35 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#36 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#37 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#38 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
#39 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
parenthesized_p=<optimized out>, member_p=false, friend_p=false,
static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948

....

Don't do that many times and you won't run into the stack overflow.
There is not much that can be done and the number of references types can be
done by the defualt stack size over 1000.
Any reasonable program will be able to compile.
Basically doctor it hurts when I do this, doctor: don't do that then.

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

* [Bug c/105675] Segmentation fault
  2022-05-20 16:26 [Bug c/105675] New: Segmentation fault watarai775 at gmail dot com
                   ` (2 preceding siblings ...)
  2022-05-20 18:38 ` [Bug c/105675] " pinskia at gcc dot gnu.org
@ 2022-05-22 12:44 ` watarai775 at gmail dot com
  2022-05-23  7:39 ` watarai775 at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: watarai775 at gmail dot com @ 2022-05-22 12:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ruslan Mkoyan <watarai775 at gmail dot com> ---
(In reply to Andrew Pinski from comment #3)
> This is a won't fix stitutation. 
> 
> You have & on a type repeated 237,679 times. 
> 
> With a recusive decent compiler, you run out of stack space with that many
> times.
> #17 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #18 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #19 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #20 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #21 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #22 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #23 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #24 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #25 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #26 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #27 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #28 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #29 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #30 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #31 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #32 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #33 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #34 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #35 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #36 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #37 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #38 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> #39 0x0000000000b7c653 in cp_parser_declarator (parser=0x7ffff72bd7b8,
> dcl_kind=CP_PARSER_DECLARATOR_NAMED, flags=0, ctor_dtor_or_conv_p=0x0,
> parenthesized_p=<optimized out>, member_p=false, friend_p=false,
> static_p=false) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.cc:22948
> 
> ....
> 
> Don't do that many times and you won't run into the stack overflow.
> There is not much that can be done and the number of references types can be
> done by the defualt stack size over 1000.
> Any reasonable program will be able to compile.
> Basically doctor it hurts when I do this, doctor: don't do that then.

I am fuzzing gcc to improve its quality. If it is not interesting crash, then
ok. Thanks

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

* [Bug c/105675] Segmentation fault
  2022-05-20 16:26 [Bug c/105675] New: Segmentation fault watarai775 at gmail dot com
                   ` (3 preceding siblings ...)
  2022-05-22 12:44 ` watarai775 at gmail dot com
@ 2022-05-23  7:39 ` watarai775 at gmail dot com
  2022-05-23  7:44 ` watarai775 at gmail dot com
  2022-05-23  7:49 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: watarai775 at gmail dot com @ 2022-05-23  7:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Ruslan Mkoyan <watarai775 at gmail dot com> ---
Created attachment 53018
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53018&action=edit
0.cpp

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

* [Bug c/105675] Segmentation fault
  2022-05-20 16:26 [Bug c/105675] New: Segmentation fault watarai775 at gmail dot com
                   ` (4 preceding siblings ...)
  2022-05-23  7:39 ` watarai775 at gmail dot com
@ 2022-05-23  7:44 ` watarai775 at gmail dot com
  2022-05-23  7:49 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: watarai775 at gmail dot com @ 2022-05-23  7:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Ruslan Mkoyan <watarai775 at gmail dot com> ---
By the way, there is one more file (attached 0.cpp.gz).
gcc-9 0.cpp is processed but gcc-12 0.cpp - segfault. With extension .c its ok

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

* [Bug c/105675] Segmentation fault
  2022-05-20 16:26 [Bug c/105675] New: Segmentation fault watarai775 at gmail dot com
                   ` (5 preceding siblings ...)
  2022-05-23  7:44 ` watarai775 at gmail dot com
@ 2022-05-23  7:49 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-23  7:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Again this is just a limitation in the stack size.

Try doing:
ulimit -s unlimited

and you will most likely see they both work.
We could change the parser not to be as recusive function calls here but this
code is still not even reasonible by machine generated sense.

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

end of thread, other threads:[~2022-05-23  7:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 16:26 [Bug c/105675] New: Segmentation fault watarai775 at gmail dot com
2022-05-20 17:56 ` [Bug c/105675] " pinskia at gcc dot gnu.org
2022-05-20 18:20 ` [Bug c++/105675] " watarai775 at gmail dot com
2022-05-20 18:38 ` [Bug c/105675] " pinskia at gcc dot gnu.org
2022-05-22 12:44 ` watarai775 at gmail dot com
2022-05-23  7:39 ` watarai775 at gmail dot com
2022-05-23  7:44 ` watarai775 at gmail dot com
2022-05-23  7:49 ` 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).