mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-12-03 16:45:09 +00:00
No description
- C++ 30.8%
- C 30.5%
- Ada 14%
- D 5.9%
- Go 5.5%
- Other 12.8%
Strengthen various types to use cluster_region rather than just region, including symbolic::memory_offset, symbolic::memory_range, and symbolic::pointer, capturing this invariant in the type system, rather than just with assertions and naming conventions. This is a type-safety improvement that mostly doesn't affect the behavior of the analyzer, but strengthening the types revealed a place in call_summary_replay::convert_svalue_from_summary_1 where it was possible for the invariant about a symbolic::pointer's region being a cluster_region to be violated. Fix this latent bug by rejecting such cases, rather than violating the invariant. gcc/analyzer/ChangeLog: * call-summary.cc (call_summary_replay::convert_svalue_from_summary_1): Reject summaries in which the region for the caller's cluster region is not itself a cluster region. (convert_bit_contents_from_summary): Update for field renaming. * infinite-recursion.cc (remap_enclosing_frame): Strengthen "base_reg" param from region to a cluster region, renaming to "cluster_reg". Strengthen return type from region to cluster_region. (sufficiently_different_region_binding_p): Strengthen "base_reg" param from region to a cluster region, renaming to "cluster_reg". Likewise for local "equiv_prev_base_reg". (sufficiently_different_p): Likewise for local "base_reg". * program-state.cc (get_any_inherited_state_of_bit_vector): Update for field renaming. * region-model.cc (region_model::get_bit_contents): Strengthen "base_reg" param from region to a cluster region, renaming to "cluster_reg". (region_model::get_representative_path_var_1): Likewise for local. (selftest::test_maybe_get_region_for_mem_range): Update for symbolic::memory_range requiring a cluster_region. * region-model.h (region_model::get_bit_contents): Strengthen "base_reg" param from region to a cluster region, renaming to "cluster_reg". * region.cc (region::calc_memory_offset): Likewise for local "base_region". Use get_cluster_region rather than get_base_region. Update default case to get iter_region as a cluster_region, adding an assertion that this is the case. (region::calc_pointer): Likewise. * store.cc (binding_cluster::get_representative_path_vars): Strengthen param "const region *base_reg" to "const cluster_region &cluster_reg". (store::get_bits): Update for memory_range::get_cluster_region being a cluster_region, rather than just a region, dropping redundant lookup and assertion. (store::get_bit_contents): Strengthen "base_reg" param from region to cluster_region, renaming to "cluster_reg", dropping redundant lookup and assertion. (store::set_bits): Strengthen type of "lhs_base_reg" from region to cluster_region. (store::get_baseline_contents): Strengthen "base_reg" param from region to cluster_region, renaming to "cluster_reg". (store::get_implicit_contents): Likewise. (store::bits_live_p): Likewise for local. (store::get_representative_path_vars): Likewise. (store::replay_call_summary): Likewise for keys, converting from an auto_vec to a symbolic::node_set. (store::replay_call_summary_cluster): Likewise for param. Replace as_a with static_cast to avoid needing is_a_helper. Update for field renaming. * store.h (binding_cluster::get_representative_path_vars): Likewise for param. (store::get_bit_contents): Likewise. (store::replay_call_summary_cluster): Likewise. (store::get_baseline_contents): Likewise. (store::get_implicit_contents): Likewise. * svalue.h (pointer_svalue::get_base_region): Mark as deprecated. Strengthen return type from region to cluster_region, and use symbolic::pointer::get_cluster_region. (pointer_svalue::get_cluster_region): New. * symbolic-bit-contents.cc (baseline_key::operator<): Update for field renaming. (uninit_contents::get_representative_path_vars): Strengthen param from const region * to const cluster_region &. (untracked_bit_contents::get_representative_path_vars): Likewise. (zero_contents::get_representative_path_vars): Likewise. (unfoldable_bit_contents::get_representative_path_vars): Likewise. (baseline_bit_contents::baseline_bit_contents): Update for field renaming. (baseline_bit_contents::add_dump_widget_children): Likewise. (baseline_bit_contents::accept_node_visitor): Likewise. (baseline_bit_contents::poison_any_pointers_to_descendents): Likewise. (concrete_bit_overlay::get_representative_path_vars): Strengthen param from const region * to const cluster_region &. (should_poison_sym_ptr_p): Rename "base_" to "cluster_". (symbolic_bit_overlay::get_representative_path_vars): Strengthen param from const region * to const cluster_region &. (offset_bit_contents::get_representative_path_vars): Likewise. (baseline_key::region_has_meaningful_size_p): Update for field renaming. (baseline_key::to_json): Likewise. (bit_contents_manager::make_baseline_contents): Likewise. (bit_contents_manager::get_baseline_contents): Strengthen "base_reg" param from region to a cluster region, renaming to "cluster_reg". * symbolic-bit-contents.h (bit_contents::get_representative_path_vars): Strengthen param from const region * to const cluster_region &. (uninit_contents::get_representative_path_vars): Likewise. (untracked_bit_contents::get_representative_path_vars): Likewise. (zero_contents::get_representative_path_vars): Likewise. (unfoldable_bit_contents::get_representative_path_vars): Likewise. (concrete_bit_overlay::get_representative_path_vars): Likewise. (symbolic_bit_overlay::get_representative_path_vars): Likewise. (offset_bit_contents::get_representative_path_vars): Likewise. (bit_contents_manager::get_baseline_contents): Strengthen "base_reg" param from region to a cluster region, renaming to "cluster_reg". * symbolic-bit-vectors.cc (bit_vector_manager::make_baseline_bit_vector): Update for field renaming. (bit_vector_manager::get_baseline_bit_vector): Strengthen "base_reg" param from region to a cluster region, renaming to "cluster_reg". * symbolic-bit-vectors.h (bit_vector_manager::get_baseline_bit_vector): Likewise for decl. * symbolic-memory-offsets.h: Update "base_region" to "cluster_region" terminology throughout. (memory_offset::memory_offset): Strengthen "base_reg" param from region to a cluster region, renaming to "cluster_reg". Update for field renaming. (memory_offset::operator==): Update for field renaming. (memory_offset::get_base_region): Mark as deprecated. Strengthen return type from region to cluster_region and update for field renaming. (memory_offset::get_cluster_region): New. (memory_offset::m_base_reg): Rename to... (memory_offset::m_cluster_reg): ...this and strengthen type from region to cluster_region. * symbolic-memory-ranges.cc: Update "base_region" to "cluster_region" terminology throughout. (memory_range::memory_range): Update for field renaming and prefer get_cluster_region to get_base_region. (memory_range::make_dump_widget): Update for field renaming. (memory_range::to_json): Likewise. * symbolic-memory-ranges.h: Update "base_region" to "cluster_region" terminology throughout. (memory_range::memory_range): Strengthen "base_reg" param from region to a cluster region, renaming to "cluster_reg". Update for field renaming. (memory_range::operator==): Update for field renaming. (memory_range::get_base_region): Mark as deprecated. Strengthen return type from region to cluster_region and update for field renaming. (memory_range::get_cluster_region): New. (memory_range::m_base_reg): Rename to... (memory_range::m_cluster_reg): ...this and strengthen type from region to cluster_region. * symbolic-nodes.h: Update "base_region" to "cluster_region" terminology throughout. (baseline_key::m_base_reg): Rename to... (baseline_key::m_cluster_reg): ...this and strengthen type from region to cluster_region. * symbolic-pointers.cc: Update "base_region" to "cluster_region" terminology throughout. (pointer::make_dump_widget): Update for field renaming. (pointer::accept_node_visitor): Likewise. (pointer::to_json): Likewise. (pointer::cmp): Likewise. (pointer::non_null_p): Likewise. (pointer::eval_condition): Prefer get_cluster_region to get_base_region. * symbolic-pointers.h: Update "base_region" to "cluster_region" terminology throughout. (pointer::pointer): Strengthen "base_reg" param from region to a cluster region, renaming to "cluster_reg". Update for field renaming. (pointer::operator==): Update for field renaming. (pointer::get_base_region): Mark as deprecated. Strengthen return type from region to cluster_region and update for field renaming. (pointer::get_cluster_region): New. (pointer::m_base_reg): Rename to... (pointer::m_cluster_reg): ...this and strengthen type from region to cluster_region. Signed-off-by: David Malcolm <dmalcolm@redhat.com> |
||
|---|---|---|
| .forgejo | ||
| .github | ||
| c++tools | ||
| config | ||
| contrib | ||
| fixincludes | ||
| gcc | ||
| gnattools | ||
| gotools | ||
| include | ||
| INSTALL | ||
| libada | ||
| libatomic | ||
| libbacktrace | ||
| libcc1 | ||
| libcody | ||
| libcpp | ||
| libdecnumber | ||
| libffi | ||
| libga68 | ||
| libgcc | ||
| libgcobol | ||
| libgfortran | ||
| libgm2 | ||
| libgo | ||
| libgomp | ||
| libgrust | ||
| libiberty | ||
| libitm | ||
| libobjc | ||
| libphobos | ||
| libquadmath | ||
| libsanitizer | ||
| libssp | ||
| libstdc++-v3 | ||
| libvtv | ||
| lto-plugin | ||
| maintainer-scripts | ||
| zlib | ||
| .b4-config | ||
| .dir-locals.el | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| ABOUT-NLS | ||
| ar-lib | ||
| ChangeLog | ||
| ChangeLog.jit | ||
| ChangeLog.tree-ssa | ||
| compile | ||
| config-ml.in | ||
| config.guess | ||
| config.rpath | ||
| config.sub | ||
| configure | ||
| configure.ac | ||
| COPYING | ||
| COPYING.LIB | ||
| COPYING.RUNTIME | ||
| COPYING3 | ||
| COPYING3.LIB | ||
| depcomp | ||
| install-sh | ||
| libtool-ldflags | ||
| libtool.m4 | ||
| ltgcc.m4 | ||
| ltmain.sh | ||
| ltoptions.m4 | ||
| ltsugar.m4 | ||
| ltversion.m4 | ||
| lt~obsolete.m4 | ||
| MAINTAINERS | ||
| MAINTAINERS.yml | ||
| Makefile.def | ||
| Makefile.in | ||
| Makefile.tpl | ||
| missing | ||
| mkdep | ||
| mkinstalldirs | ||
| move-if-change | ||
| multilib.am | ||
| pyproject.toml | ||
| README | ||
| SECURITY.txt | ||
| symlink-tree | ||
| test-driver | ||
| ylwrap | ||
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.