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.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ChangeLog | Loading commit data... | |
analysis-plan.cc | Loading commit data... | |
analysis-plan.h | Loading commit data... | |
analyzer-logging.cc | Loading commit data... | |
analyzer-logging.h | Loading commit data... | |
analyzer-pass.cc | Loading commit data... | |
analyzer-selftests.cc | Loading commit data... | |
analyzer-selftests.h | Loading commit data... | |
analyzer.cc | Loading commit data... | |
analyzer.h | Loading commit data... | |
analyzer.opt | Loading commit data... | |
call-string.cc | Loading commit data... | |
call-string.h | Loading commit data... | |
checker-path.cc | Loading commit data... | |
checker-path.h | Loading commit data... | |
constraint-manager.cc | Loading commit data... | |
constraint-manager.h | Loading commit data... | |
diagnostic-manager.cc | Loading commit data... | |
diagnostic-manager.h | Loading commit data... | |
engine.cc | Loading commit data... | |
engine.h | Loading commit data... | |
exploded-graph.h | Loading commit data... | |
function-set.cc | Loading commit data... | |
function-set.h | Loading commit data... | |
pending-diagnostic.cc | Loading commit data... | |
pending-diagnostic.h | Loading commit data... | |
program-point.cc | Loading commit data... | |
program-point.h | Loading commit data... | |
program-state.cc | Loading commit data... | |
program-state.h | Loading commit data... | |
region-model.cc | Loading commit data... | |
region-model.h | Loading commit data... | |
sm-file.cc | Loading commit data... | |
sm-malloc.cc | Loading commit data... | |
sm-malloc.dot | Loading commit data... | |
sm-pattern-test.cc | Loading commit data... | |
sm-sensitive.cc | Loading commit data... | |
sm-signal.cc | Loading commit data... | |
sm-taint.cc | Loading commit data... | |
sm.cc | Loading commit data... | |
sm.h | Loading commit data... | |
state-purge.cc | Loading commit data... | |
state-purge.h | Loading commit data... | |
supergraph.cc | Loading commit data... | |
supergraph.h | Loading commit data... |