aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2020-01-22 16:26:38 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2020-01-23 11:24:16 -0500
commit648796dab42b6e839f10fee5835f24cd2016a9f4 (patch)
tree364511210390da46f64c760f2c83b64632d8a137 /libgcc
parent6d00f052ef209bacdd93f503b0c5fb428cc6c434 (diff)
downloadgcc-648796dab42b6e839f10fee5835f24cd2016a9f4.zip
gcc-648796dab42b6e839f10fee5835f24cd2016a9f4.tar.gz
gcc-648796dab42b6e839f10fee5835f24cd2016a9f4.tar.bz2
analyzer: avoid ICE with missing arguments (PR 93375)
PR analyzer/93375 reports an ICE under certain circumstances involving a call where the number of arguments at the callsite is less than the parameter count of the callee, Specifically, the ICE occurs when pruning a checker_path for a diagnostic, when attempting to maintain which expression is of interest through such a call. The root cause is an assumption that there were enough arguments at the callsite, within callgraph_superedge's methods for mapping expressions between callee and caller. This patch adds checks for this to the relevant methods, fixing the ICE. gcc/analyzer/ChangeLog: PR analyzer/93375 * supergraph.cc (callgraph_superedge::get_arg_for_parm): Fail gracefully is the number of parameters at the callee exceeds the number of arguments at the call stmt. (callgraph_superedge::get_parm_for_arg): Likewise. gcc/testsuite/ChangeLog: PR analyzer/93375 * gcc.dg/analyzer/pr93375.c: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions