diff options
author | David Malcolm <dmalcolm@redhat.com> | 2022-07-27 17:38:55 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2022-07-27 17:54:44 -0400 |
commit | 71a4f739c218746df70612eeb844024d1fe206bb (patch) | |
tree | 67122c902f922136258bdbb8a332fa560788ada8 /install-sh | |
parent | 09cb9c88ef8e2c0c89ada9cde2caf1a960db7a77 (diff) |
analyzer: fix false positives from -Wanalyzer-tainted-divisor [PR106225]
(cherry picked from r13-1562-g897b3b31f0a94b)
gcc/analyzer/ChangeLog:
PR analyzer/106225
* sm-taint.cc (taint_state_machine::on_stmt): Move handling of
assignments from division to...
(taint_state_machine::check_for_tainted_divisor): ...this new
function. Reject warning when the divisor is known to be non-zero.
* sm.cc: Include "analyzer/program-state.h".
(sm_context::get_old_region_model): New.
* sm.h (sm_context::get_old_region_model): New decl.
gcc/testsuite/ChangeLog:
PR analyzer/106225
* gcc.dg/analyzer/taint-divisor-1.c: Add test coverage for various
correct and incorrect checks against zero.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'install-sh')
0 files changed, 0 insertions, 0 deletions