public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47204] New: [4.6 Regression] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code
@ 2011-01-07 11:39 zsojka at seznam dot cz
  2011-01-07 16:19 ` [Bug fortran/47204] " hjl.tools at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-07 11:39 UTC (permalink / raw)
  To: gcc-bugs

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

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


----- testcase.f03 -----
    select type (a)
------------------------

Compiler output:
$ gfortran testcase.f03                                       
Error: Unexpected end of file in 'testcase.f03'
==8750== Invalid read of size 8
==8750==    at 0x590EC2: gfc_free_namespace (symbol.c:3304)
==8750==    by 0x5917EF: gfc_symbol_done_2 (symbol.c:3347)
==8750==    by 0x553588: gfc_done_2 (misc.c:294)
==8750==    by 0x55EC11: unexpected_eof (parse.c:1845)
==8750==    by 0x562F5C: parse_executable (parse.c:3101)
==8750==    by 0x5637C1: parse_progunit (parse.c:3939)
==8750==    by 0x5643DD: gfc_parse_file (parse.c:4348)
==8750==    by 0x59CB45: gfc_be_parse_file (f95-lang.c:250)
==8750==    by 0x93A477: toplev_main (toplev.c:579)
==8750==    by 0x6369BBC: (below main) (in /lib64/libc-2.11.2.so)
==8750==  Address 0x6f16bf0 is 0 bytes inside a block of size 2,552 free'd
==8750==    at 0x4C25E0D: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==8750==    by 0x550695: gfc_free_case_list (match.c:4361)
==8750==    by 0x58BE7C: gfc_free_statements (st.c:230)
==8750==    by 0x590EC1: gfc_free_namespace (symbol.c:3302)
==8750==    by 0x5917EF: gfc_symbol_done_2 (symbol.c:3347)
==8750==    by 0x553588: gfc_done_2 (misc.c:294)
==8750==    by 0x55EC11: unexpected_eof (parse.c:1845)
==8750==    by 0x562F5C: parse_executable (parse.c:3101)
==8750==    by 0x5637C1: parse_progunit (parse.c:3939)
==8750==    by 0x5643DD: gfc_parse_file (parse.c:4348)
==8750==    by 0x59CB45: gfc_be_parse_file (f95-lang.c:250)
==8750==    by 0x93A477: toplev_main (toplev.c:579)
==8750==    by 0x6369BBC: (below main) (in /lib64/libc-2.11.2.so)

(many invalid reads follow, final crash is caused by double free)

f951: 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.


Tested revisions:
r168552 - crash
r165699 - crash
r161659 - crash
r158095 - OK
4.5 r168062 - OK


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

* [Bug fortran/47204] [4.6 Regression] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code
  2011-01-07 11:39 [Bug fortran/47204] New: [4.6 Regression] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code zsojka at seznam dot cz
@ 2011-01-07 16:19 ` hjl.tools at gmail dot com
  2011-01-07 17:56 ` [Bug fortran/47204] [4.6 Regression] [OOP] " pault at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-07 16:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.07 15:58:08
                 CC|                            |janus at gcc dot gnu.org
   Target Milestone|---                         |4.6.0
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-07 15:58:08 UTC ---
It is caused by revision 159217:

http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00268.html


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

* [Bug fortran/47204] [4.6 Regression] [OOP] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code
  2011-01-07 11:39 [Bug fortran/47204] New: [4.6 Regression] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code zsojka at seznam dot cz
  2011-01-07 16:19 ` [Bug fortran/47204] " hjl.tools at gmail dot com
  2011-01-07 17:56 ` [Bug fortran/47204] [4.6 Regression] [OOP] " pault at gcc dot gnu.org
@ 2011-01-07 17:56 ` jvdelisle at gcc dot gnu.org
  2011-01-07 20:35 ` mikael at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2011-01-07 17:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot
                   |                            |gnu.org

--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2011-01-07 17:52:22 UTC ---
Paul,

I think its the one liner at the top of the PR, comment #0


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

* [Bug fortran/47204] [4.6 Regression] [OOP] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code
  2011-01-07 11:39 [Bug fortran/47204] New: [4.6 Regression] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code zsojka at seznam dot cz
  2011-01-07 16:19 ` [Bug fortran/47204] " hjl.tools at gmail dot com
@ 2011-01-07 17:56 ` pault at gcc dot gnu.org
  2011-01-07 17:56 ` jvdelisle at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu.org @ 2011-01-07 17:56 UTC (permalink / raw)
  To: gcc-bugs

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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu.org

--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> 2011-01-07 17:48:16 UTC ---
(In reply to comment #1)
> It is caused by revision 159217:
> 
> http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00268.html

HJ,

Could you add the testcase source please?

Thanks

Paul


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

* [Bug fortran/47204] [4.6 Regression] [OOP] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code
  2011-01-07 11:39 [Bug fortran/47204] New: [4.6 Regression] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-01-07 17:56 ` jvdelisle at gcc dot gnu.org
@ 2011-01-07 20:35 ` mikael at gcc dot gnu.org
  2011-01-13 16:40 ` burnus at gcc dot gnu.org
  2011-01-13 16:48 ` burnus at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2011-01-07 20:35 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael at gcc dot gnu.org

--- Comment #4 from Mikael Morin <mikael at gcc dot gnu.org> 2011-01-07 20:26:09 UTC ---
Looks like a duplicate of PR45848. 

Happy new year folks!


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

* [Bug fortran/47204] [4.6 Regression] [OOP] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code
  2011-01-07 11:39 [Bug fortran/47204] New: [4.6 Regression] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-01-07 20:35 ` mikael at gcc dot gnu.org
@ 2011-01-13 16:40 ` burnus at gcc dot gnu.org
  2011-01-13 16:48 ` burnus at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-13 16:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-13 16:32:43 UTC ---
Author: burnus
Date: Thu Jan 13 16:32:33 2011
New Revision: 168753

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168753
Log:
2011-01-13  Tobias Burnus  <burnus@net-b.de>
            Mikael Morin  <mikael@gcc.gnu.org>

        PR fortran/45848
        PR fortran/47204
        * gfortran.h (gfc_code): Move union ext's case_list into
        the struct block.
        * dump-parse-tree.c (show_code_node): Adapt by prefixing
        * case_list
        by "block.".
        * frontend-passes.c (gfc_code_walker): Ditto.
        * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
        gfc_match_type_is, gfc_match_class_is): Ditto.
        * resolve.c (resolve_select, resolve_select_type): Ditto.
        * st.c (gfc_free_statement): Ditto.
        * trans-stmt.c (gfc_trans_integer_select,
        * gfc_trans_logical_select,
        gfc_trans_character_select): Ditto.
        * parse.c (resolve_all_program_units): For error recovery, avoid
        segfault is proc_name is NULL.

2011-01-13  Tobias Burnus  <burnus@net-b.de>
            Mikael Morin  <mikael@gcc.gnu.org>

        PR fortran/45848
        PR fortran/47204
        * gfortran.dg/select_type_20.f90: New.
        * gfortran.dg/select_type_21.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/select_type_20.f90
    trunk/gcc/testsuite/gfortran.dg/select_type_21.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/dump-parse-tree.c
    trunk/gcc/fortran/frontend-passes.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/st.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/47204] [4.6 Regression] [OOP] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code
  2011-01-07 11:39 [Bug fortran/47204] New: [4.6 Regression] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-01-13 16:40 ` burnus at gcc dot gnu.org
@ 2011-01-13 16:48 ` burnus at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-13 16:48 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |burnus at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-13 16:40:12 UTC ---
FIXED on the trunk (4.6). Thanks for the report Zdenek! And thanks for the
analysis (in PR45848) Mikael!


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

end of thread, other threads:[~2011-01-13 16:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-07 11:39 [Bug fortran/47204] New: [4.6 Regression] ICE: SIGSEGV in gfc_free_namespace (symbol.c:3323) on invalid code zsojka at seznam dot cz
2011-01-07 16:19 ` [Bug fortran/47204] " hjl.tools at gmail dot com
2011-01-07 17:56 ` [Bug fortran/47204] [4.6 Regression] [OOP] " pault at gcc dot gnu.org
2011-01-07 17:56 ` jvdelisle at gcc dot gnu.org
2011-01-07 20:35 ` mikael at gcc dot gnu.org
2011-01-13 16:40 ` burnus at gcc dot gnu.org
2011-01-13 16:48 ` burnus 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).