public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/97489] New: [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const)
@ 2020-10-19 10:12 asolokha at gmx dot com
  2020-10-19 12:06 ` [Bug analyzer/97489] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2020-10-19 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97489
           Summary: [11 Regression] ICE: Segmentation fault (in
                    ana::supergraph::get_node_for_function_entry(function*
                    ) const)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.0-alpha20201018 snapshot (g:1e70b1a358b6ce3b894f284d88fbb90518d45cc0)
ICEs when compiling the following testcase, extracted from
test/CodeGenCXX/pr34163.cpp from the clang 10.0.1 test suite, w/ -fanalyzer:

struct X {
  virtual ~X() {}
  virtual void key_function();
};

void X::key_function() {}

% g++-11.0.0 -fanalyzer -c dkuvlwww.cpp
during IPA pass: analyzer
dkuvlwww.cpp:6:25: internal compiler error: Segmentation fault
    6 | void X::key_function() {}
      |                         ^
0x1020adf crash_signal
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/toplev.c:330
0x13aeb92 ana::supergraph::get_node_for_function_entry(function*) const
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/analyzer/supergraph.h:96
0x13aeb92 ana::function_point::from_function_entry(ana::supergraph const&,
function*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/analyzer/program-point.cc:215
0x139f36f ana::program_point::from_function_entry(ana::supergraph const&,
function*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/analyzer/program-point.h:253
0x139f36f ana::exploded_graph::add_function_entry(function*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/analyzer/engine.cc:1949
0x139fa07 ana::exploded_graph::on_escaped_function(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/analyzer/engine.cc:3985
0x139fa7b add_any_callbacks
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/analyzer/engine.cc:2290
0x12ff60a walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree.c:12001
0x12ff9f1 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree.c:12078
0x139f8fa ana::exploded_graph::build_initial_worklist()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/analyzer/engine.cc:2330
0x13a37e0 ana::impl_run_checkers(ana::logger*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/analyzer/engine.cc:4576
0x13a463c ana::run_checkers()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/analyzer/engine.cc:4650
0x1397628 execute
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/analyzer/analyzer-pass.cc:84

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

* [Bug analyzer/97489] [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const)
  2020-10-19 10:12 [Bug analyzer/97489] New: [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) asolokha at gmx dot com
@ 2020-10-19 12:06 ` rguenth at gcc dot gnu.org
  2020-10-19 12:15 ` [Bug analyzer/97489] [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) since r10-5950-g757bf1dff5e8cee3 marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-19 12:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
   Target Milestone|---                         |11.0

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

* [Bug analyzer/97489] [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) since r10-5950-g757bf1dff5e8cee3
  2020-10-19 10:12 [Bug analyzer/97489] New: [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) asolokha at gmx dot com
  2020-10-19 12:06 ` [Bug analyzer/97489] " rguenth at gcc dot gnu.org
@ 2020-10-19 12:15 ` marxin at gcc dot gnu.org
  2020-10-19 14:12 ` dmalcolm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-19 12:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-10-19
      Known to work|                            |10.2.0
            Summary|[11 Regression] ICE:        |[11 Regression] ICE:
                   |Segmentation fault (in      |Segmentation fault (in
                   |ana::supergraph::get_node_f |ana::supergraph::get_node_f
                   |or_function_entry(function* |or_function_entry(function*
                   |) const)                    |) const) since
                   |                            |r10-5950-g757bf1dff5e8cee3
             Status|UNCONFIRMED                 |NEW
                 CC|                            |marxin at gcc dot gnu.org
      Known to fail|                            |11.0

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r10-5950-g757bf1dff5e8cee3.

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

* [Bug analyzer/97489] [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) since r10-5950-g757bf1dff5e8cee3
  2020-10-19 10:12 [Bug analyzer/97489] New: [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) asolokha at gmx dot com
  2020-10-19 12:06 ` [Bug analyzer/97489] " rguenth at gcc dot gnu.org
  2020-10-19 12:15 ` [Bug analyzer/97489] [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) since r10-5950-g757bf1dff5e8cee3 marxin at gcc dot gnu.org
@ 2020-10-19 14:12 ` dmalcolm at gcc dot gnu.org
  2020-10-22 10:13 ` cvs-commit at gcc dot gnu.org
  2020-10-22 10:32 ` dmalcolm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-10-19 14:12 UTC (permalink / raw)
  To: gcc-bugs

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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks; confirmed, though for me I see the ICE with
g:af66094d037793773eb8a49597866457f2f6a104, and do not see the ICE with its
predecessor; in particular the backtrace shows add_any_callbacks which I added
in that commit.

It's crashing on "__dt_comp ", finding the dtor in the vtable when building the
initial worklist, here:

    96      return get_node_for_block (ENTRY_BLOCK_PTR_FOR_FN (fun));

where fun->cfg is NULL.  Working on a fix.

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

* [Bug analyzer/97489] [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) since r10-5950-g757bf1dff5e8cee3
  2020-10-19 10:12 [Bug analyzer/97489] New: [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2020-10-19 14:12 ` dmalcolm at gcc dot gnu.org
@ 2020-10-22 10:13 ` cvs-commit at gcc dot gnu.org
  2020-10-22 10:32 ` dmalcolm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-22 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:

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

commit r11-4220-gb7f2cfbf0fc7bcd5c1e60fca354de8bf60f9acfa
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Thu Oct 22 06:12:31 2020 -0400

    analyzer: fix ICE on dtor [PR97489]

    gcc/analyzer/ChangeLog:
            PR analyzer/97489
            * engine.cc (exploded_graph::add_function_entry): Assert that we
            have a function body.
            (exploded_graph::on_escaped_function): Reject fndecls that don't
            have a function body.

    gcc/testsuite/ChangeLog:
            PR analyzer/97489
            * g++.dg/analyzer/pr97489.C: New test.

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

* [Bug analyzer/97489] [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) since r10-5950-g757bf1dff5e8cee3
  2020-10-19 10:12 [Bug analyzer/97489] New: [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2020-10-22 10:13 ` cvs-commit at gcc dot gnu.org
@ 2020-10-22 10:32 ` dmalcolm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-10-22 10:32 UTC (permalink / raw)
  To: gcc-bugs

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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

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

--- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed by the above commit.

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

end of thread, other threads:[~2020-10-22 10:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 10:12 [Bug analyzer/97489] New: [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) asolokha at gmx dot com
2020-10-19 12:06 ` [Bug analyzer/97489] " rguenth at gcc dot gnu.org
2020-10-19 12:15 ` [Bug analyzer/97489] [11 Regression] ICE: Segmentation fault (in ana::supergraph::get_node_for_function_entry(function*) const) since r10-5950-g757bf1dff5e8cee3 marxin at gcc dot gnu.org
2020-10-19 14:12 ` dmalcolm at gcc dot gnu.org
2020-10-22 10:13 ` cvs-commit at gcc dot gnu.org
2020-10-22 10:32 ` dmalcolm 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).