public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/34308] New: gcc internal error (seg fault) (program cc1) with ill formed foo.c
@ 2007-12-01 8:37 dominique dot pelle at free dot fr
2007-12-01 11:39 ` [Bug c/34308] " pinskia at gcc dot gnu dot org
2007-12-15 20:46 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: dominique dot pelle at free dot fr @ 2007-12-01 8:37 UTC (permalink / raw)
To: gcc-bugs
gcc gives an internal error when compiling a source
file which contains _lots_ of stars '*' (pointer of pointer
of pointer etc.) The source file looks admitedly silly but
it should not cause gcc to segfault.
This bug was filed in Ubuntu bug database:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.1/+bug/172326
Steps to reproduce bug:
1/ download test-case-crash-gcc.c (stand alone, no #include files)
$ wget http://dominique.pelle.free.fr/test-case-crash-gcc.c
2/ compile it and observe an internal error, segfault:
$ gcc test-case-crash-gcc.c
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
$ gcc -V 4.2 test-case-crash-gcc.c
i486-linux-gnu-gcc-4.2: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.
I could reproduce this bug with 2 versions of gcc
that I have on my Ubunto laptop: gcc-4.1.3 and gcc-4.2.1:
$ gcc --version
gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc -V 4.2 --version
i486-linux-gnu-gcc-4.2 (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I'm using Linux-2.6.20 (x86) (Ubuntu Gutsy).
--
Summary: gcc internal error (seg fault) (program cc1) with ill
formed foo.c
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominique dot pelle at free dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34308
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/34308] gcc internal error (seg fault) (program cc1) with ill formed foo.c
2007-12-01 8:37 [Bug c/34308] New: gcc internal error (seg fault) (program cc1) with ill formed foo.c dominique dot pelle at free dot fr
@ 2007-12-01 11:39 ` pinskia at gcc dot gnu dot org
2007-12-15 20:46 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-01 11:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-12-01 11:38 -------
This is just the standard recursive decendent parser issue. if you have a lot
of levels, it will crash at some point. I don't think this bug can be fixed.
Try increasing the stack size and you will see it no longer crashes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34308
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/34308] gcc internal error (seg fault) (program cc1) with ill formed foo.c
2007-12-01 8:37 [Bug c/34308] New: gcc internal error (seg fault) (program cc1) with ill formed foo.c dominique dot pelle at free dot fr
2007-12-01 11:39 ` [Bug c/34308] " pinskia at gcc dot gnu dot org
@ 2007-12-15 20:46 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-15 20:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-12-15 20:46 -------
There are too many pointers here for a recursive decent parser to handle. This
is common and really just hard to do correctly.
*** This bug has been marked as a duplicate of 31804 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34308
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-15 20:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-01 8:37 [Bug c/34308] New: gcc internal error (seg fault) (program cc1) with ill formed foo.c dominique dot pelle at free dot fr
2007-12-01 11:39 ` [Bug c/34308] " pinskia at gcc dot gnu dot org
2007-12-15 20:46 ` 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).