public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/107928] New: ICE in on_bind, at analyzer/sm-fd.cc:1869
@ 2022-11-30 2:54 asolokha at gmx dot com
2022-11-30 12:44 ` [Bug analyzer/107928] " marxin at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2022-11-30 2:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107928
Bug ID: 107928
Summary: ICE in on_bind, at analyzer/sm-fd.cc:1869
Product: gcc
Version: 13.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 13.0.0 20221127 snapshot (g:4ac789789ea866ced24613e4778725d8ec6b0ecf) ICEs
when compiling the following testcase w/ -fanalyzer:
struct sa {
};
int
bind (int, struct sa *, int);
int
foo (struct sa sa)
{
return bind (1, &sa, sizeof sa);
}
% gcc-13 -fanalyzer -c bnfjd9ey.c
during IPA pass: analyzer
bnfjd9ey.c: In function 'foo':
bnfjd9ey.c:10:10: internal compiler error: in on_bind, at
analyzer/sm-fd.cc:1869
10 | return bind (1, &sa, sizeof sa);
| ^~~~~~~~~~~~~~~~~~~~~~~~
0x12f73b5 on_bind
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221127/work/gcc-13-20221127/gcc/analyzer/sm-fd.cc:1869
0x12f73b5 ana::kf_bind::outcome_of_bind::update_model(ana::region_model*,
ana::exploded_edge const*, ana::region_model_context*) const
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221127/work/gcc-13-20221127/gcc/analyzer/sm-fd.cc:2328
0x1293dbe ana::exploded_graph::process_node(ana::exploded_node*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221127/work/gcc-13-20221127/gcc/analyzer/engine.cc:4169
0x129491a ana::exploded_graph::process_worklist()
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221127/work/gcc-13-20221127/gcc/analyzer/engine.cc:3456
0x12970a4 ana::impl_run_checkers(ana::logger*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221127/work/gcc-13-20221127/gcc/analyzer/engine.cc:6107
0x12980a6 ana::run_checkers()
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221127/work/gcc-13-20221127/gcc/analyzer/engine.cc:6195
0x12869b8 execute
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221127/work/gcc-13-20221127/gcc/analyzer/analyzer-pass.cc:87
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/107928] ICE in on_bind, at analyzer/sm-fd.cc:1869
2022-11-30 2:54 [Bug analyzer/107928] New: ICE in on_bind, at analyzer/sm-fd.cc:1869 asolokha at gmx dot com
@ 2022-11-30 12:44 ` marxin at gcc dot gnu.org
2022-11-30 13:48 ` dmalcolm at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-30 12:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107928
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-11-30
Ever confirmed|0 |1
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r13-4074-g86a90006864840c2.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/107928] ICE in on_bind, at analyzer/sm-fd.cc:1869
2022-11-30 2:54 [Bug analyzer/107928] New: ICE in on_bind, at analyzer/sm-fd.cc:1869 asolokha at gmx dot com
2022-11-30 12:44 ` [Bug analyzer/107928] " marxin at gcc dot gnu.org
@ 2022-11-30 13:48 ` dmalcolm at gcc dot gnu.org
2022-12-01 2:31 ` cvs-commit at gcc dot gnu.org
2022-12-01 2:45 ` dmalcolm at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-11-30 13:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107928
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; working on a fix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/107928] ICE in on_bind, at analyzer/sm-fd.cc:1869
2022-11-30 2:54 [Bug analyzer/107928] New: ICE in on_bind, at analyzer/sm-fd.cc:1869 asolokha at gmx dot com
2022-11-30 12:44 ` [Bug analyzer/107928] " marxin at gcc dot gnu.org
2022-11-30 13:48 ` dmalcolm at gcc dot gnu.org
@ 2022-12-01 2:31 ` cvs-commit at gcc dot gnu.org
2022-12-01 2:45 ` dmalcolm at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-01 2:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107928
--- 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:45a75fd3d31265e43aa3ce7a5e851083d534b00b
commit r13-4424-g45a75fd3d31265e43aa3ce7a5e851083d534b00b
Author: David Malcolm <dmalcolm@redhat.com>
Date: Wed Nov 30 21:26:41 2022 -0500
analyzer: fix ICE on bind/connect with a constant fd [PR107928]
gcc/analyzer/ChangeLog:
PR analyzer/107928
* sm-fd.cc (fd_state_machine::on_bind): Handle m_constant_fd in
the "success" outcome.
(fd_state_machine::on_connect): Likewise.
* sm-fd.dot: Add "constant_fd" state and its transitions.
gcc/testsuite/ChangeLog:
PR analyzer/107928
* gcc.dg/analyzer/fd-bind-pr107928.c: New test.
* gcc.dg/analyzer/fd-connect-pr107928.c: New test.
* gcc.dg/analyzer/fd-stream-socket-active-open.c
(test_active_open_from_connect_constant): New, adapted from
test_active_open_from_connect.
* gcc.dg/analyzer/fd-stream-socket-passive-open.c
(test_passive_open_from_bind_constant): New, adapted from
test_passive_open_from_bind.
(test_passive_open_from_listen_constant): New, adapted from
test_passive_open_from_listen.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug analyzer/107928] ICE in on_bind, at analyzer/sm-fd.cc:1869
2022-11-30 2:54 [Bug analyzer/107928] New: ICE in on_bind, at analyzer/sm-fd.cc:1869 asolokha at gmx dot com
` (2 preceding siblings ...)
2022-12-01 2:31 ` cvs-commit at gcc dot gnu.org
@ 2022-12-01 2:45 ` dmalcolm at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2022-12-01 2:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107928
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed by the above patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-12-01 2:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 2:54 [Bug analyzer/107928] New: ICE in on_bind, at analyzer/sm-fd.cc:1869 asolokha at gmx dot com
2022-11-30 12:44 ` [Bug analyzer/107928] " marxin at gcc dot gnu.org
2022-11-30 13:48 ` dmalcolm at gcc dot gnu.org
2022-12-01 2:31 ` cvs-commit at gcc dot gnu.org
2022-12-01 2:45 ` 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).