public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
@ 2011-01-24 13:57 zsojka at seznam dot cz
  2011-01-24 14:49 ` [Bug c/47435] " hjl.tools at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-24 13:57 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] ICE: SIGSEGV in c_finish_case
                    (c-typeck.c:8859) on invalid code
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 23097
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23097
reduced testcase

Compiler output:
$ gcc testcase.c
testcase.c: In function 'foo':
testcase.c:5:5: error: a label can only be part of a statement and a
declaration is not a statement
testcase.c:5:5: error: unknown type name 'x'
testcase.c:6:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'}' token
testcase.c:4:5: error: label at end of compound statement
==28038== Invalid read of size 8
==28038==    at 0x513058: c_finish_case (c-typeck.c:8859)
==28038==    by 0x535EF4: c_parser_statement_after_labels (c-parser.c:4626)
==28038==    by 0x5372A7: c_parser_compound_statement_nostart (c-parser.c:4109)
==28038==    by 0x538838: c_parser_compound_statement (c-parser.c:3946)
==28038==    by 0x534F0A: c_parser_declaration_or_fndef (c-parser.c:1719)
==28038==    by 0x539F8D: c_parser_external_declaration (c-parser.c:1332)
==28038==    by 0x53AB67: c_parse_file (c-parser.c:1220)
==28038==    by 0x574804: c_common_parse_file (c-opts.c:1071)
==28038==    by 0x8DD507: toplev_main (toplev.c:579)
==28038==    by 0x62FEBBC: (below main) (in /lib64/libc-2.11.2.so)
==28038==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==28038== 
testcase.c:6:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Output - 4.5:
$ gcc testcase.c testcase.c: In function 'foo':
testcase.c:5:5: error: 'x' undeclared (first use in this function)
testcase.c:5:5: note: each undeclared identifier is reported only once for each
function it appears in
testcase.c:5:7: error: expected ';' before 'y'

The diagnostics given by 4.5 was probably more helpful.

Tested revisions:
r169155 - crash
4.5 r168785 - OK


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

* [Bug c/47435] [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
@ 2011-01-24 14:49 ` hjl.tools at gmail dot com
  2011-01-24 14:55 ` bonzini at gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-24 14:49 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.24 14:43:13
                 CC|                            |bonzini at gnu dot org
   Target Milestone|---                         |4.6.0
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-24 14:43:13 UTC ---
It is caused by revision 47435:

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00621.html


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

* [Bug c/47435] [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
  2011-01-24 14:49 ` [Bug c/47435] " hjl.tools at gmail dot com
@ 2011-01-24 14:55 ` bonzini at gnu dot org
  2011-01-24 16:24 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gnu dot org @ 2011-01-24 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Paolo Bonzini <bonzini at gnu dot org> 2011-01-24 14:47:15 UTC ---
The code hardly makes any sense, so it's difficult to say which error message
makes more sense.  I'll look at the regression.


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

* [Bug c/47435] [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
  2011-01-24 14:49 ` [Bug c/47435] " hjl.tools at gmail dot com
  2011-01-24 14:55 ` bonzini at gnu dot org
@ 2011-01-24 16:24 ` jakub at gcc dot gnu.org
  2011-03-25 19:56 ` [Bug c/47435] [4.6/4.7 " jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-24 16:24 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |error-recovery
           Priority|P3                          |P4
                 CC|                            |jakub at gcc dot gnu.org


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

* [Bug c/47435] [4.6/4.7 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-01-24 16:24 ` jakub at gcc dot gnu.org
@ 2011-03-25 19:56 ` jakub at gcc dot gnu.org
  2011-06-27 15:44 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-25 19:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.0                       |4.6.1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-25 19:52:25 UTC ---
GCC 4.6.0 is being released, adjusting target milestone.


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

* [Bug c/47435] [4.6/4.7 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-03-25 19:56 ` [Bug c/47435] [4.6/4.7 " jakub at gcc dot gnu.org
@ 2011-06-27 15:44 ` jakub at gcc dot gnu.org
  2011-10-26 17:23 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-06-27 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.1                       |4.6.2

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-06-27 12:32:48 UTC ---
GCC 4.6.1 is being released.


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

* [Bug c/47435] [4.6/4.7 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-06-27 15:44 ` jakub at gcc dot gnu.org
@ 2011-10-26 17:23 ` jakub at gcc dot gnu.org
  2012-03-01 14:55 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-26 17:23 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.2                       |4.6.3

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-26 17:13:34 UTC ---
GCC 4.6.2 is being released.


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

* [Bug c/47435] [4.6/4.7 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2011-10-26 17:23 ` jakub at gcc dot gnu.org
@ 2012-03-01 14:55 ` jakub at gcc dot gnu.org
  2012-06-13 13:46 ` [Bug c/47435] [4.6/4.7/4.8 " bsreram85 at gmail dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-01 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.3                       |4.6.4

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-01 14:38:24 UTC ---
GCC 4.6.3 is being released.


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

* [Bug c/47435] [4.6/4.7/4.8 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2012-03-01 14:55 ` jakub at gcc dot gnu.org
@ 2012-06-13 13:46 ` bsreram85 at gmail dot com
  2013-04-12 15:17 ` [Bug c/47435] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bsreram85 at gmail dot com @ 2012-06-13 13:46 UTC (permalink / raw)
  To: gcc-bugs

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

bsreram85 at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bsreram85 at gmail dot com

--- Comment #7 from bsreram85 at gmail dot com 2012-06-13 13:45:47 UTC ---
Any updates? Am using 64-bit linux (openSuse 12.1 with gcc 4.6.2). I don't have
any errors while compilation and linking except for the fact i am forced to use
-fpic flag (Strange that am able to compile without fpic flag in Windows and
Mac 64-bit PCs). However when i call the dll from my java application, the
application crashes specifying, the crash is due to SIGSEGV.

#Partial Log from JRE crash stack trace
A fatal error has been detected by the Java Runtime Environment:
  SIGSEGV (0xb) at pc=0x00007f276b22c9ac, pid=7032, tid=139807285987072
 JRE version: 6.0_24-b24
 Java VM: OpenJDK 64-Bit Server VM (20.0-b12 mixed mode linux-amd64 compressed
oops)

Further more when i view the thread status, it specifies the error to be in
SEGV_MAPERR.


#Further Log from JRE crash stack trace
---------------  T H R E A D  ---------------

Current thread (0x00007f278c2be000):  JavaThread "AWT-EventQueue-0"
[_thread_in_native, id=7049, stack(0x00007f276b8e4000,0x00007f276b9e5000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR),
si_addr=0x00000000740a9700


Any solution in the near for this? Am not sure whether this is the reason
behind my java crash, however, the logs from Java indicate so.

Thanks,
Sreram


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

* [Bug c/47435] [4.7/4.8/4.9 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2012-06-13 13:46 ` [Bug c/47435] [4.6/4.7/4.8 " bsreram85 at gmail dot com
@ 2013-04-12 15:17 ` jakub at gcc dot gnu.org
  2013-12-05  6:28 ` [Bug c/47435] [4.7 " mpolacek at gcc dot gnu.org
  2014-06-12 12:59 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 15:17 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.4                       |4.7.4

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 15:16:46 UTC ---
GCC 4.6.4 has been released and the branch has been closed.


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

* [Bug c/47435] [4.7 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2013-04-12 15:17 ` [Bug c/47435] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
@ 2013-12-05  6:28 ` mpolacek at gcc dot gnu.org
  2014-06-12 12:59 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-12-05  6:28 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
            Version|4.6.0                       |4.7.3
            Summary|[4.7/4.8/4.9 Regression]    |[4.7 Regression] ICE:
                   |ICE: SIGSEGV in             |SIGSEGV in c_finish_case
                   |c_finish_case               |(c-typeck.c:8859) on
                   |(c-typeck.c:8859) on        |invalid code
                   |invalid code                |

--- Comment #9 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This doesn't seem to ICE anymore with 4.8/trunk.


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

* [Bug c/47435] [4.7 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
  2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
                   ` (9 preceding siblings ...)
  2013-12-05  6:28 ` [Bug c/47435] [4.7 " mpolacek at gcc dot gnu.org
@ 2014-06-12 12:59 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 12:59 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to work|                            |4.8.0
         Resolution|---                         |FIXED
   Target Milestone|4.7.4                       |4.8.0
      Known to fail|                            |4.7.4

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for 4.8.0.


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

end of thread, other threads:[~2014-06-12 12:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
2011-01-24 14:49 ` [Bug c/47435] " hjl.tools at gmail dot com
2011-01-24 14:55 ` bonzini at gnu dot org
2011-01-24 16:24 ` jakub at gcc dot gnu.org
2011-03-25 19:56 ` [Bug c/47435] [4.6/4.7 " jakub at gcc dot gnu.org
2011-06-27 15:44 ` jakub at gcc dot gnu.org
2011-10-26 17:23 ` jakub at gcc dot gnu.org
2012-03-01 14:55 ` jakub at gcc dot gnu.org
2012-06-13 13:46 ` [Bug c/47435] [4.6/4.7/4.8 " bsreram85 at gmail dot com
2013-04-12 15:17 ` [Bug c/47435] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2013-12-05  6:28 ` [Bug c/47435] [4.7 " mpolacek at gcc dot gnu.org
2014-06-12 12:59 ` rguenth 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).