public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
@ 2020-06-25 20:58 ` anlauf at gcc dot gnu.org
  2020-07-02 18:48 ` cvs-commit at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-25 20:58 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |anlauf at gcc dot gnu.org

--- Comment #3 from anlauf at gcc dot gnu.org ---
Patch: https://gcc.gnu.org/pipermail/fortran/2020-June/054620.html

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
  2020-06-25 20:58 ` [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure anlauf at gcc dot gnu.org
@ 2020-07-02 18:48 ` cvs-commit at gcc dot gnu.org
  2020-07-04 17:19 ` anlauf at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-02 18:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:b88744905a46be44ffa3c57d46080f601ae832b8

commit r11-1792-gb88744905a46be44ffa3c57d46080f601ae832b8
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Jul 2 20:48:16 2020 +0200

    PR fortran/93423 - ICE on invalid with argument list for module procedure

    When recovering from an error, a NULL pointer dereference could occur.
    Check for that situation and punt.

    gcc/fortran/
            PR fortran/93423
            * resolve.c (resolve_symbol): Avoid NULL pointer dereference.

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
  2020-06-25 20:58 ` [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure anlauf at gcc dot gnu.org
  2020-07-02 18:48 ` cvs-commit at gcc dot gnu.org
@ 2020-07-04 17:19 ` anlauf at gcc dot gnu.org
  2020-07-07 14:05 ` marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-07-04 17:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from anlauf at gcc dot gnu.org ---
Backports will have to wait until PR96041 is resolved.

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-07-04 17:19 ` anlauf at gcc dot gnu.org
@ 2020-07-07 14:05 ` marxin at gcc dot gnu.org
  2020-09-17 12:01 ` cvs-commit at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-07-07 14:05 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
I still see the ICE on current master:

$ valgrind --trace-children=yes ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/pr93423.f90
...

   19 |   module procedure bp(s) ! { dg-error "must be in a generic module
interface" }
      |                   1
Error: MODULE PROCEDURE at (1) must be in a generic module interface
/home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/pr93423.f90:20:5:

   20 |   end procedure bp       ! { dg-error "Expecting END SUBMODULE
statement" }
      |     1
Error: Expecting END SUBMODULE statement at (1)
==11355== Invalid read of size 1
==11355==    at 0xBE9F24: gfc_resolve_formal_arglist(gfc_symbol*)
(resolve.c:309)
==11355==    by 0xBED263: find_arglists(gfc_symbol*) (resolve.c:550)
==11355==    by 0xD1B1D7: do_traverse_symtree(gfc_symtree*, void
(*)(gfc_symtree*), void (*)(gfc_symbol*)) (symbol.c:4170)
==11355==    by 0xD1B3E8: gfc_traverse_ns(gfc_namespace*, void
(*)(gfc_symbol*)) (symbol.c:4195)
==11355==    by 0xBED28C: resolve_formal_arglists(gfc_namespace*)
(resolve.c:563)
==11355==    by 0xBF4F03: resolve_contained_functions(gfc_namespace*)
(resolve.c:1129)
==11355==    by 0xCA1D84: resolve_types(gfc_namespace*) (resolve.c:17189)
==11355==    by 0xCA2CD1: gfc_resolve(gfc_namespace*) (resolve.c:17315)
==11355==    by 0xBCE864: gfc_parse_file() (parse.c:6448)
==11355==    by 0xD422D0: gfc_be_parse_file() (f95-lang.c:212)
==11355==    by 0x25C632F: compile_file() (toplev.c:458)
==11355==    by 0x25CF248: do_compile() (toplev.c:2307)
==11355==  Address 0xaa52924 is 84 bytes inside a block of size 344 free'd
==11355==    at 0x96A49AB: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==11355==    by 0xD13F0A: gfc_free_symbol(gfc_symbol*) (symbol.c:3098)
==11355==    by 0xD14370: gfc_release_symbol(gfc_symbol*) (symbol.c:3125)
==11355==    by 0xD19A34: free_sym_tree(gfc_symtree*) (symbol.c:3902)
==11355==    by 0xD1A37E: gfc_free_namespace(gfc_namespace*) (symbol.c:4041)
==11355==    by 0xD141E9: gfc_release_symbol(gfc_symbol*) (symbol.c:3117)
==11355==    by 0xD19A34: free_sym_tree(gfc_symtree*) (symbol.c:3902)
==11355==    by 0xD1A37E: gfc_free_namespace(gfc_namespace*) (symbol.c:4041)
==11355==    by 0xBCAA2B: parse_contained(int) (parse.c:5799)
==11355==    by 0xBCC76F: parse_module() (parse.c:6126)
==11355==    by 0xBCE790: gfc_parse_file() (parse.c:6429)
==11355==    by 0xD422D0: gfc_be_parse_file() (f95-lang.c:212)
==11355==  Block was alloc'd at
==11355==    at 0x96A5B65: calloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==11355==    by 0x50E323A: xcalloc (xmalloc.c:162)
==11355==    by 0xD1439C: gfc_new_symbol(char const*, gfc_namespace*)
(symbol.c:3136)
==11355==    by 0xB5484B: load_needed(pointer_info*) (module.c:5035)
==11355==    by 0xB5447C: load_needed(pointer_info*) (module.c:5004)
==11355==    by 0xB5447C: load_needed(pointer_info*) (module.c:5004)
==11355==    by 0xB54427: load_needed(pointer_info*) (module.c:5003)
==11355==    by 0xB5447C: load_needed(pointer_info*) (module.c:5004)
==11355==    by 0xB57A23: read_module() (module.c:5489)
==11355==    by 0xB67008: gfc_use_module(gfc_use_list*) (module.c:7198)
==11355==    by 0xB680A6: gfc_use_modules() (module.c:7322)
==11355==    by 0xBB1C1C: use_modules() (parse.c:114)

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-07-07 14:05 ` marxin at gcc dot gnu.org
@ 2020-09-17 12:01 ` cvs-commit at gcc dot gnu.org
  2020-09-17 12:07 ` burnus at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-17 12:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:

https://gcc.gnu.org/g:c12facd22881517127ebbe213d7ecc7fc1fcea4e

commit r11-3259-gc12facd22881517127ebbe213d7ecc7fc1fcea4e
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Thu Sep 17 14:01:09 2020 +0200

    Fortran: Avoid double-free with parse error (PR96041, PR93423)

    gcc/fortran/

            PR fortran/96041
            PR fortran/93423
            * decl.c (gfc_match_submod_proc): Avoid later double-free
            in the error case.

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-09-17 12:01 ` cvs-commit at gcc dot gnu.org
@ 2020-09-17 12:07 ` burnus at gcc dot gnu.org
  2020-09-18 20:19 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-09-17 12:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93423
Bug 93423 depends on bug 96041, which changed state.

Bug 96041 Summary: [11 regression] ICE in gfortran.dg/pr93423.f90 after r11-1792
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96041

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

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-09-17 12:07 ` burnus at gcc dot gnu.org
@ 2020-09-18 20:19 ` cvs-commit at gcc dot gnu.org
  2020-09-18 20:19 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-18 20:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:ce2c9b341df267ce2ab86815ba957bce9935f7bb

commit r10-8774-gce2c9b341df267ce2ab86815ba957bce9935f7bb
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Jul 2 20:48:16 2020 +0200

    PR fortran/93423 - ICE on invalid with argument list for module procedure

    When recovering from an error, a NULL pointer dereference could occur.
    Check for that situation and punt.

    gcc/fortran/
            PR fortran/93423
            * resolve.c (resolve_symbol): Avoid NULL pointer dereference.

    (cherry picked from commit b88744905a46be44ffa3c57d46080f601ae832b8)

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2020-09-18 20:19 ` cvs-commit at gcc dot gnu.org
@ 2020-09-18 20:19 ` cvs-commit at gcc dot gnu.org
  2020-09-19 18:32 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-18 20:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:13421890f81844acb134a460eda7132db3e504ed

commit r10-8775-g13421890f81844acb134a460eda7132db3e504ed
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Thu Sep 17 14:01:09 2020 +0200

    Fortran: Avoid double-free with parse error (PR96041, PR93423)

    gcc/fortran/

            PR fortran/96041
            PR fortran/93423
            * decl.c (gfc_match_submod_proc): Avoid later double-free
            in the error case.

    (cherry picked from commit c12facd22881517127ebbe213d7ecc7fc1fcea4e)

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2020-09-18 20:19 ` cvs-commit at gcc dot gnu.org
@ 2020-09-19 18:32 ` cvs-commit at gcc dot gnu.org
  2020-09-19 18:32 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-19 18:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:5ec4a3d307210b5c62e9718eff4a32b058e14c78

commit r9-8920-g5ec4a3d307210b5c62e9718eff4a32b058e14c78
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Jul 2 20:48:16 2020 +0200

    PR fortran/93423 - ICE on invalid with argument list for module procedure

    When recovering from an error, a NULL pointer dereference could occur.
    Check for that situation and punt.

    gcc/fortran/
            PR fortran/93423
            * resolve.c (resolve_symbol): Avoid NULL pointer dereference.

    (cherry picked from commit b88744905a46be44ffa3c57d46080f601ae832b8)

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2020-09-19 18:32 ` cvs-commit at gcc dot gnu.org
@ 2020-09-19 18:32 ` cvs-commit at gcc dot gnu.org
  2020-09-19 18:42 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-19 18:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:0e442063a0adf01e6348e9fc55cc3e9869974769

commit r9-8921-g0e442063a0adf01e6348e9fc55cc3e9869974769
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Thu Sep 17 14:01:09 2020 +0200

    Fortran: Avoid double-free with parse error (PR96041, PR93423)

    gcc/fortran/

            PR fortran/96041
            PR fortran/93423
            * decl.c (gfc_match_submod_proc): Avoid later double-free
            in the error case.

    (cherry picked from commit c12facd22881517127ebbe213d7ecc7fc1fcea4e)

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2020-09-19 18:32 ` cvs-commit at gcc dot gnu.org
@ 2020-09-19 18:42 ` cvs-commit at gcc dot gnu.org
  2020-09-19 18:42 ` cvs-commit at gcc dot gnu.org
  2020-09-19 18:44 ` anlauf at gcc dot gnu.org
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-19 18:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:aef149efb6d3fc97a38c74f7022124a6ba247746

commit r8-10520-gaef149efb6d3fc97a38c74f7022124a6ba247746
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Jul 2 20:48:16 2020 +0200

    PR fortran/93423 - ICE on invalid with argument list for module procedure

    When recovering from an error, a NULL pointer dereference could occur.
    Check for that situation and punt.

    gcc/fortran/
            PR fortran/93423
            * resolve.c (resolve_symbol): Avoid NULL pointer dereference.

    (cherry picked from commit b88744905a46be44ffa3c57d46080f601ae832b8)

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2020-09-19 18:42 ` cvs-commit at gcc dot gnu.org
@ 2020-09-19 18:42 ` cvs-commit at gcc dot gnu.org
  2020-09-19 18:44 ` anlauf at gcc dot gnu.org
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-19 18:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:e0c7ff6237c78d99b40869afbdcdbe27fe98b698

commit r8-10521-ge0c7ff6237c78d99b40869afbdcdbe27fe98b698
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Thu Sep 17 14:01:09 2020 +0200

    Fortran: Avoid double-free with parse error (PR96041, PR93423)

    gcc/fortran/

            PR fortran/96041
            PR fortran/93423
            * decl.c (gfc_match_submod_proc): Avoid later double-free
            in the error case.

    (cherry picked from commit c12facd22881517127ebbe213d7ecc7fc1fcea4e)

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

* [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure
       [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2020-09-19 18:42 ` cvs-commit at gcc dot gnu.org
@ 2020-09-19 18:44 ` anlauf at gcc dot gnu.org
  12 siblings, 0 replies; 13+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-09-19 18:44 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

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

--- Comment #14 from anlauf at gcc dot gnu.org ---
Fixed on master and backported to all open branches, including Tobias' fix
for PR96041.

Thanks for the report!

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

end of thread, other threads:[~2020-09-19 18:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-93423-4@http.gcc.gnu.org/bugzilla/>
2020-06-25 20:58 ` [Bug fortran/93423] [8/9/10/11 Regression] ICE on invalid with argument list for module procedure anlauf at gcc dot gnu.org
2020-07-02 18:48 ` cvs-commit at gcc dot gnu.org
2020-07-04 17:19 ` anlauf at gcc dot gnu.org
2020-07-07 14:05 ` marxin at gcc dot gnu.org
2020-09-17 12:01 ` cvs-commit at gcc dot gnu.org
2020-09-17 12:07 ` burnus at gcc dot gnu.org
2020-09-18 20:19 ` cvs-commit at gcc dot gnu.org
2020-09-18 20:19 ` cvs-commit at gcc dot gnu.org
2020-09-19 18:32 ` cvs-commit at gcc dot gnu.org
2020-09-19 18:32 ` cvs-commit at gcc dot gnu.org
2020-09-19 18:42 ` cvs-commit at gcc dot gnu.org
2020-09-19 18:42 ` cvs-commit at gcc dot gnu.org
2020-09-19 18:44 ` anlauf 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).