public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/96650] New: [11 Regression] ICE in on_fact, at analyzer/constraint-manager.cc:1785
@ 2020-08-17 10:38 asolokha at gmx dot com
2020-08-25 10:31 ` [Bug analyzer/96650] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2020-08-17 10:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96650
Bug ID: 96650
Summary: [11 Regression] ICE in on_fact, at
analyzer/constraint-manager.cc:1785
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
gcc-11.0.0-alpha20200816 snapshot (g:c99116aeeb9644ebddec653ee8b19de4d38b65bd)
ICEs when compiling the following testcase w/ -O2 -fanalyzer:
int *wf;
void
yd (void);
int
cy (void);
int *
ee (int hp)
{
if (hp != 0)
yd ();
return 0;
}
void
z0 (int co)
{
int l4 = sizeof (int);
aq:
wf = ee (l4);
if (l4 < co)
l4 = cy () + sizeof (int);
goto aq;
}
% gcc-11.0.0 -O2 -fanalyzer -c apa68zkr.c
during IPA pass: analyzer
apa68zkr.c: In function 'z0':
apa68zkr.c:12:6: internal compiler error: in on_fact, at
analyzer/constraint-manager.cc:1785
12 | if (hp != 0)
| ^
0x7a3d5f ana::merger_fact_visitor::on_fact(ana::svalue const*, tree_code,
ana::svalue const*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/tree.h:3409
0x7a3d5f ana::constraint_manager::for_each_fact(ana::fact_visitor*) const
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/analyzer/constraint-manager.cc:1833
0x1849ed2 ana::constraint_manager::merge(ana::constraint_manager const&,
ana::constraint_manager const&, ana::constraint_manager*, ana::model_merger
const&)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/analyzer/constraint-manager.cc:1812
0x110d5fb ana::region_model::can_merge_with_p(ana::region_model const&,
ana::program_point const&, ana::region_model*) const
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/analyzer/region-model.cc:2501
0x110382f ana::program_state::can_merge_with_p(ana::program_state const&,
ana::program_point const&, ana::program_state*) const
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/analyzer/program-state.cc:916
0x10f2788 ana::exploded_graph::get_or_create_node(ana::program_point const&,
ana::program_state const&, ana::exploded_node const*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/analyzer/engine.cc:1949
0x10f4157 ana::exploded_graph::process_node(ana::exploded_node*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/analyzer/engine.cc:2650
0x10f4d5a ana::exploded_graph::process_worklist()
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/analyzer/engine.cc:2341
0x10f6e8f ana::impl_run_checkers(ana::logger*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/analyzer/engine.cc:4107
0x10f7aac ana::run_checkers()
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/analyzer/engine.cc:4175
0x10ec468 execute
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200816/work/gcc-11-20200816/gcc/analyzer/analyzer-pass.cc:84
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/96650] [11 Regression] ICE in on_fact, at analyzer/constraint-manager.cc:1785
2020-08-17 10:38 [Bug analyzer/96650] New: [11 Regression] ICE in on_fact, at analyzer/constraint-manager.cc:1785 asolokha at gmx dot com
@ 2020-08-25 10:31 ` rguenth at gcc dot gnu.org
2020-09-14 21:56 ` dmalcolm at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-08-25 10:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96650
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/96650] [11 Regression] ICE in on_fact, at analyzer/constraint-manager.cc:1785
2020-08-17 10:38 [Bug analyzer/96650] New: [11 Regression] ICE in on_fact, at analyzer/constraint-manager.cc:1785 asolokha at gmx dot com
2020-08-25 10:31 ` [Bug analyzer/96650] " rguenth at gcc dot gnu.org
@ 2020-09-14 21:56 ` dmalcolm at gcc dot gnu.org
2020-09-15 21:47 ` cvs-commit at gcc dot gnu.org
2020-09-15 21:50 ` dmalcolm at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-09-14 21:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96650
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2020-09-14
Ever confirmed|0 |1
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this bug. Confirmed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/96650] [11 Regression] ICE in on_fact, at analyzer/constraint-manager.cc:1785
2020-08-17 10:38 [Bug analyzer/96650] New: [11 Regression] ICE in on_fact, at analyzer/constraint-manager.cc:1785 asolokha at gmx dot com
2020-08-25 10:31 ` [Bug analyzer/96650] " rguenth at gcc dot gnu.org
2020-09-14 21:56 ` dmalcolm at gcc dot gnu.org
@ 2020-09-15 21:47 ` cvs-commit at gcc dot gnu.org
2020-09-15 21:50 ` dmalcolm at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-15 21:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96650
--- Comment #2 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:50ddbd0282e06614b29f0d3f3be5fbe70085a8bd
commit r11-3212-g50ddbd0282e06614b29f0d3f3be5fbe70085a8bd
Author: David Malcolm <dmalcolm@redhat.com>
Date: Tue Sep 15 05:51:04 2020 -0400
analyzer: fix ICE when merging constraints w/o transitivity [PR96650]
PR analyzer/96650 reports an assertion failure when merging the
intersection of two sets of constraints, due to the resulting
constraints being infeasible.
It turns out that the two input sets were each infeasible if
transitivity were considered, but -fanalyzer-transitivity was off.
However for this case, the merging code was "discovering" the
transitive infeasibility of the intersection of the constraints even
when -fanalyzer-transitivity is off, triggering an assertion failure.
I attempted various fixes for this, but each of them would have
introduced O(N^2) logic into the constraint-handling code into the
-fno-analyzer-transitivity case (with N == the number of constraints).
This patch fixes the ICE by tweaking the assertion, so that we
silently drop such constraints if -fanalyzer-transitivity is off.
gcc/analyzer/ChangeLog:
PR analyzer/96650
* constraint-manager.cc (merger_fact_visitor::on_fact): Replace
assertion that add_constraint succeeded with an assertion that
if it fails, -fanalyzer-transitivity is off.
gcc/testsuite/ChangeLog:
PR analyzer/96650
* gcc.dg/analyzer/pr96650-1-notrans.c: New test.
* gcc.dg/analyzer/pr96650-1-trans.c: New test.
* gcc.dg/analyzer/pr96650-2-notrans.c: New test.
* gcc.dg/analyzer/pr96650-2-trans.c: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/96650] [11 Regression] ICE in on_fact, at analyzer/constraint-manager.cc:1785
2020-08-17 10:38 [Bug analyzer/96650] New: [11 Regression] ICE in on_fact, at analyzer/constraint-manager.cc:1785 asolokha at gmx dot com
` (2 preceding siblings ...)
2020-09-15 21:47 ` cvs-commit at gcc dot gnu.org
@ 2020-09-15 21:50 ` dmalcolm at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-09-15 21:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96650
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed by the above commit.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-15 21:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 10:38 [Bug analyzer/96650] New: [11 Regression] ICE in on_fact, at analyzer/constraint-manager.cc:1785 asolokha at gmx dot com
2020-08-25 10:31 ` [Bug analyzer/96650] " rguenth at gcc dot gnu.org
2020-09-14 21:56 ` dmalcolm at gcc dot gnu.org
2020-09-15 21:47 ` cvs-commit at gcc dot gnu.org
2020-09-15 21:50 ` 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).