diff options
author | David Malcolm <dmalcolm@redhat.com> | 2022-11-22 17:29:21 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2022-11-22 17:29:21 -0500 |
commit | 64fb291c5839e1a82afb62743172b4eab1267399 (patch) | |
tree | 4c9163bc9a0fc24d6a0278fe1434ec998dae57b7 /libcpp | |
parent | 7c9717fcb5cf94ce1e7ef5c903058adf9980ff28 (diff) | |
download | gcc-64fb291c5839e1a82afb62743172b4eab1267399.zip gcc-64fb291c5839e1a82afb62743172b4eab1267399.tar.gz gcc-64fb291c5839e1a82afb62743172b4eab1267399.tar.bz2 |
analyzer: fix ICE on 'bind(INT_CST, ...)' [PR107783]
This was crashing inside fd_phase_mismatch's ctor with assertion
failure when the state was "fd-constant".
Fix the ICE by not complaining about constants passed to these APIs.
gcc/analyzer/ChangeLog:
PR analyzer/107783
* sm-fd.cc (fd_state_machine::check_for_new_socket_fd): Don't
complain when old state is "fd-constant".
(fd_state_machine::on_listen): Likewise.
(fd_state_machine::on_accept): Likewise.
gcc/testsuite/ChangeLog:
PR analyzer/107783
* gcc.dg/analyzer/fd-accept.c (test_accept_on_constant): New.
* gcc.dg/analyzer/fd-bind.c (test_bind_on_constant): New.
* gcc.dg/analyzer/fd-connect.c (test_connect_on_constant): New.
* gcc.dg/analyzer/fd-listen.c (test_listen_on_connected_socket):
Fix typo.
(test_listen_on_constant): New.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions