diff options
author | David Malcolm <dmalcolm@redhat.com> | 2022-02-03 11:15:48 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2022-02-03 17:45:47 -0500 |
commit | 23b2cb628e5da84ad9c5422d5b2b6b2d36318ece (patch) | |
tree | e337440e61db4833506c34e0b5694b5e8574cd44 /gcc/tree.h | |
parent | 5a668ec0339c28b0725ded1e80d3276edb76b8b3 (diff) | |
download | gcc-23b2cb628e5da84ad9c5422d5b2b6b2d36318ece.zip gcc-23b2cb628e5da84ad9c5422d5b2b6b2d36318ece.tar.gz gcc-23b2cb628e5da84ad9c5422d5b2b6b2d36318ece.tar.bz2 |
analyzer: fix zero-fill of calloc
It turned out that the analyzer wasn't treating calloc regions
as zero-filled, due to binding_cluster::fill_region getting an
unknown value for the byte_size_size_sval, and thus
get_or_create_repeated_svalue returning an unknown_svalue, which
was then used to fill the region.
Fixed thusly.
gcc/analyzer/ChangeLog:
* region-model-impl-calls.cc (region_model::impl_call_calloc): Use
a sized_region when calling zero_fill_region.
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/calloc-1.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/tree.h')
0 files changed, 0 insertions, 0 deletions