public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/104062] New: [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482
@ 2022-01-17 9:21 asolokha at gmx dot com
2022-01-17 9:51 ` [Bug analyzer/104062] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2022-01-17 9:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104062
Bug ID: 104062
Summary: [12 Regression] ICE in get_or_create_cast, at
analyzer/region-model-manager.cc:482
Product: gcc
Version: 12.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: ---
gcc 12.0.0 20220116 snapshot (g:90045c5df5b3c8853e7740fb72a11aead1c489bb) ICEs
when compiling the following testcase, reduced from
test/Analysis/malloc-sizeof.c from the clang 13.0.0 test suite, w/ -fanalyzer:
void *
calloc (__SIZE_TYPE__, __SIZE_TYPE__);
void *
realloc (void *, __SIZE_TYPE__);
void
foo (void)
{
int *ap5 = calloc (4, sizeof *ap5);
int *ap7 = realloc (ap5, sizeof *ap5);
}
% gcc-12.0.0 -fanalyzer -c a713jhxm.c
during IPA pass: analyzer
a713jhxm.c:11:14: internal compiler error: in get_or_create_cast, at
analyzer/region-model-manager.cc:482
11 | int *ap7 = realloc (ap5, sizeof *ap5);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
0x7b2445 ana::region_model_manager::get_or_create_cast(tree_node*, ana::svalue
const*)
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/region-model-manager.cc:482
0x7b2445 ana::region_model_manager::get_or_create_cast(tree_node*, ana::svalue
const*)
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/region-model-manager.cc:480
0x12aa4a8 ana::region_model_manager::maybe_fold_sub_svalue(tree_node*,
ana::svalue const*, ana::region const*)
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/region-model-manager.cc:736
0x12aa4a8 ana::region_model_manager::get_or_create_sub_svalue(tree_node*,
ana::svalue const*, ana::region const*)
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/region-model-manager.cc:811
0x12ce905 ana::binding_cluster::get_any_binding(ana::store_manager*,
ana::region const*) const
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/store.cc:1477
0x1286d56 ana::region_model::get_store_value(ana::region const*,
ana::region_model_context*) const
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/region-model.cc:1986
0x129c96f update_model
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/region-model-impl-calls.cc:710
0x126027b ana::feasibility_state::maybe_update_for_edge(ana::logger*,
ana::exploded_edge const*, ana::rejected_constraint**)
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/engine.cc:4513
0x1e1c1e1 ana::epath_finder::process_worklist_item(ana::feasible_worklist*,
ana::trimmed_graph const&, ana::feasible_graph*, ana::exploded_node const*,
unsigned int, ana::exploded_path**) const
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/diagnostic-manager.cc:493
0x1e1cf80 ana::epath_finder::explore_feasible_paths(ana::exploded_node const*,
char const*, unsigned int)
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/diagnostic-manager.cc:414
0x1e1d726 ana::saved_diagnostic::calc_best_epath(ana::epath_finder*)
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/diagnostic-manager.cc:720
0x1e220ef ana::dedupe_winners::add(ana::logger*, ana::epath_finder*,
ana::saved_diagnostic*)
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/diagnostic-manager.cc:1026
0x1e1ebbd ana::diagnostic_manager::emit_saved_diagnostics(ana::exploded_graph
const&)
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/diagnostic-manager.cc:1175
0x126c693 ana::impl_run_checkers(ana::logger*)
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/engine.cc:5730
0x126d56e ana::run_checkers()
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/engine.cc:5787
0x125c2a8 execute
/var/tmp/portage/sys-devel/gcc-12.0.0_p20220116/work/gcc-12-20220116/gcc/analyzer/analyzer-pass.cc:87
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug analyzer/104062] [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482
2022-01-17 9:21 [Bug analyzer/104062] New: [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 asolokha at gmx dot com
@ 2022-01-17 9:51 ` rguenth at gcc dot gnu.org
2022-01-17 10:47 ` [Bug analyzer/104062] [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 since r12-6476-g4f34f8cc1d064bfa marxin at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-17 9:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104062
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug analyzer/104062] [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 since r12-6476-g4f34f8cc1d064bfa
2022-01-17 9:21 [Bug analyzer/104062] New: [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 asolokha at gmx dot com
2022-01-17 9:51 ` [Bug analyzer/104062] " rguenth at gcc dot gnu.org
@ 2022-01-17 10:47 ` marxin at gcc dot gnu.org
2022-01-18 15:04 ` dmalcolm at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-17 10:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104062
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[12 Regression] ICE in |[12 Regression] ICE in
|get_or_create_cast, at |get_or_create_cast, at
|analyzer/region-model-manag |analyzer/region-model-manag
|er.cc:482 |er.cc:482 since
| |r12-6476-g4f34f8cc1d064bfa
CC| |marxin at gcc dot gnu.org
Last reconfirmed| |2022-01-17
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-6476-g4f34f8cc1d064bfa.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug analyzer/104062] [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 since r12-6476-g4f34f8cc1d064bfa
2022-01-17 9:21 [Bug analyzer/104062] New: [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 asolokha at gmx dot com
2022-01-17 9:51 ` [Bug analyzer/104062] " rguenth at gcc dot gnu.org
2022-01-17 10:47 ` [Bug analyzer/104062] [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 since r12-6476-g4f34f8cc1d064bfa marxin at gcc dot gnu.org
@ 2022-01-18 15:04 ` dmalcolm at gcc dot gnu.org
2022-01-18 20:56 ` cvs-commit at gcc dot gnu.org
2022-01-18 20:59 ` dmalcolm at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-01-18 15:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104062
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 for filing this; working on a fix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug analyzer/104062] [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 since r12-6476-g4f34f8cc1d064bfa
2022-01-17 9:21 [Bug analyzer/104062] New: [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 asolokha at gmx dot com
` (2 preceding siblings ...)
2022-01-18 15:04 ` dmalcolm at gcc dot gnu.org
@ 2022-01-18 20:56 ` cvs-commit at gcc dot gnu.org
2022-01-18 20:59 ` dmalcolm at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-18 20:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104062
--- 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:79e746bb05e432dcd1c18161469272d67c33d79d
commit r12-6699-g79e746bb05e432dcd1c18161469272d67c33d79d
Author: David Malcolm <dmalcolm@redhat.com>
Date: Tue Jan 18 10:03:53 2022 -0500
analyzer: fix ICE on realloc of zeroed memory [PR104062]
gcc/analyzer/ChangeLog:
PR analyzer/104062
* region-model-manager.cc
(region_model_manager::maybe_fold_sub_svalue): Avoid casting to
NULL type when folding access to repeated svalue.
gcc/testsuite/ChangeLog:
PR analyzer/104062
* gcc.dg/analyzer/pr104062.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug analyzer/104062] [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 since r12-6476-g4f34f8cc1d064bfa
2022-01-17 9:21 [Bug analyzer/104062] New: [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 asolokha at gmx dot com
` (3 preceding siblings ...)
2022-01-18 20:56 ` cvs-commit at gcc dot gnu.org
@ 2022-01-18 20:59 ` dmalcolm at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-01-18 20:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104062
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:[~2022-01-18 20:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17 9:21 [Bug analyzer/104062] New: [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 asolokha at gmx dot com
2022-01-17 9:51 ` [Bug analyzer/104062] " rguenth at gcc dot gnu.org
2022-01-17 10:47 ` [Bug analyzer/104062] [12 Regression] ICE in get_or_create_cast, at analyzer/region-model-manager.cc:482 since r12-6476-g4f34f8cc1d064bfa marxin at gcc dot gnu.org
2022-01-18 15:04 ` dmalcolm at gcc dot gnu.org
2022-01-18 20:56 ` cvs-commit at gcc dot gnu.org
2022-01-18 20:59 ` 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).