diff options
author | David Malcolm <dmalcolm@redhat.com> | 2022-12-16 14:50:07 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2022-12-16 14:50:07 -0500 |
commit | 2fdc8546b5c6cb1fe254e40b5bdd19ed6fbb44da (patch) | |
tree | dc31813c43d561b063205cf603ef91cb7ccae08b /gcc/gimple-array-bounds.cc | |
parent | b50fe16a3b2214c418ecc5febc0bb21bc17912b7 (diff) | |
download | gcc-2fdc8546b5c6cb1fe254e40b5bdd19ed6fbb44da.zip gcc-2fdc8546b5c6cb1fe254e40b5bdd19ed6fbb44da.tar.gz gcc-2fdc8546b5c6cb1fe254e40b5bdd19ed6fbb44da.tar.bz2 |
analyzer: add src_region param to region_model::check_for_poison [PR106479]
PR analyzer/106479 notes that we don't always show the region-creation
event for a memmove from an uninitialized stack region. This occurs
when using kf_memcpy_memmove. Fix by passing a src_region hint to
region_model::check_for_poison.
gcc/analyzer/ChangeLog:
PR analyzer/106479
* kf.cc (kf_memcpy_memmove::impl_call_pre): Pass in source region
to region_model::check_for_poison.
* region-model-asm.cc (region_model::on_asm_stmt): Pass NULL
region to region_model::check_for_poison.
* region-model.cc (region_model::check_for_poison): Add
"src_region" param, and pass it to poisoned_value_diagnostic.
(region_model::on_assignment): Pass NULL region to
region_model::check_for_poison.
(region_model::get_rvalue): Likewise.
* region-model.h (region_model::check_for_poison): Add
"src_region" param.
* sm-fd.cc (fd_state_machine::on_accept): Pass in source region
to region_model::check_for_poison.
* varargs.cc (kf_va_copy::impl_call_pre): Pass NULL region to
region_model::check_for_poison.
(kf_va_arg::impl_call_pre): Pass in source region to
region_model::check_for_poison.
gcc/testsuite/ChangeLog:
PR analyzer/106479
* gcc.dg/analyzer/pr104308.c (test_memmove_within_uninit): Remove
xfail on region creation event.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/gimple-array-bounds.cc')
0 files changed, 0 insertions, 0 deletions