diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index b57d9f1ed3a..dfc6ee7276b 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,11 @@ +2021-11-13 Xi Ruoyao + + PR other/21823 + PR bootstrap/80047 + * fixincl.c (process): Simplify the handling for highly + unlikely access() failure, to avoid using non-standard + extensions. + 2021-08-30 John David Anglin * inclhack.def (hpux_c99_inttypes5): New hack to define PRIdPTR, etc. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6767e5348e8..ea79d3746a5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,148 @@ +2021-11-13 Jan Hubicka + + PR lto/103211 + * dbgcnt.def (ipa_attr): New counters. + * ipa-pure-const.c: Include dbgcnt.c + (ipa_make_function_const): Use debug counter. + (ipa_make_function_pure): Likewise. + (propagate_pure_const): Fix bug in my previous change. + +2021-11-13 Jan Hubicka + + * ipa-modref-tree.c (modref_access_node::range_info_useful_p): + Offline from ipa-modref-tree.h. + (modref_access_node::dump): Move from ipa-modref.c; make member + function. + * ipa-modref-tree.h (modref_access_node::range_info_useful_p. + modref_access_node::dump): Declare. + * ipa-modref.c (dump_access): Remove. + (dump_records): Update. + (dump_lto_records): Update. + (record_access): Update. + (record_access_lto): Update. + +2021-11-13 Jan Hubicka + + * ipa-modref.c (modref_summary::modref_summary): Clear new flags. + (modref_summary::dump): Dump try_dse. + (modref_summary::finalize): Add FUN attribute; compute try-dse. + (analyze_function): Update. + (read_section): Update. + (update_signature): Update. + (pass_ipa_modref::execute): Update. + * ipa-modref.h (struct modref_summary): + * tree-ssa-alias.c (ao_ref_init_from_ptr_and_range): Export. + * tree-ssa-alias.h (ao_ref_init_from_ptr_and_range): Declare. + * tree-ssa-dse.c (dse_optimize_call): New function. + (dse_optimize_stmt): Use it. + +2021-11-13 Jan Hubicka + + * ipa-modref-tree.c: Move #if CHECKING_P to proper place. + +2021-11-13 Jan Hubicka + + * ipa-modref-tree.h + (struct modref_access_node): Move longer member functions to + ipa-modref-tree.c + (modref_ref_node::try_merge_with): Turn into modreef_acces_node member + function. + * ipa-modref-tree.c (modref_access_node::contains): Move here + from ipa-modref-tree.h. + (modref_access_node::update): Likewise. + (modref_access_node::merge): Likewise. + (modref_access_node::closer_pair_p): Likewise. + (modref_access_node::forced_merge): Likewise. + (modref_access_node::update2): Likewise. + (modref_access_node::combined_offsets): Likewise. + (modref_access_node::try_merge_with): Likewise. + (modref_access_node::insert): Likewise. + +2021-11-13 Jan Hubicka + + * ipa-modref.c (modref_summary::global_memory_read_p): Remove. + (modref_summary::global_memory_written_p): Remove. + (modref_summary::dump): Dump new flags. + (modref_summary::finalize): New member function. + (analyze_function): Call it. + (read_section): Call it. + (update_signature): Call it. + (pass_ipa_modref::execute): Call it. + * ipa-modref.h (struct modref_summary): Remove + global_memory_read_p and global_memory_written_p. + Add global_memory_read, global_memory_written. + * tree-ssa-structalias.c (determine_global_memory_access): + Update. + +2021-11-13 Jan Hubicka + + * ipa-fnsummary.c (compute_fn_summary): Use type_attribut_allowed_p + * ipa-param-manipulation.c + (ipa_param_adjustments::type_attribute_allowed_p): + New member function. + (drop_type_attribute_if_params_changed_p): New function. + (build_adjusted_function_type): Use it. + * ipa-param-manipulation.h: Add type_attribute_allowed_p. + +2021-11-13 David Malcolm + + * doc/invoke.texi (Static Analyzer Options): Add + -Wno-analyzer-tainted-allocation-size, + -Wno-analyzer-tainted-divisor, -Wno-analyzer-tainted-offset, and + -Wno-analyzer-tainted-size to list. Add + -Wanalyzer-tainted-allocation-size, -Wanalyzer-tainted-divisor, + -Wanalyzer-tainted-offset, and -Wanalyzer-tainted-size to list + of options effectively enabled by -fanalyzer. + (-Wanalyzer-tainted-allocation-size): New. + (-Wanalyzer-tainted-array-index): Tweak wording; add link to CWE. + (-Wanalyzer-tainted-divisor): New. + (-Wanalyzer-tainted-offset): New. + (-Wanalyzer-tainted-size): New. + +2021-11-13 Jan Hubicka + + * attr-fnspec.h (attr_fnspec::arg_eaf_flags): Break out from ... + * gimple.c (gimple_call_arg_flags): ... here. + * ipa-modref.c (analyze_parms): Record flags known from fnspec. + (modref_merge_call_site_flags): Use arg_eaf_flags. + +2021-11-13 Aldy Hernandez + + PR tree-optimization/103222 + * gimple-range-path.cc (path_range_query::compute_ranges_in_phis): + New. + (path_range_query::compute_ranges_in_block): Call + compute_ranges_in_phis. + * gimple-range-path.h (path_range_query::compute_ranges_in_phis): + New. + +2021-11-13 Jan Hubicka + + * ipa-fnsummary.c (compute_fn_summary): Do not give up on signature + changes on "fn spec" attribute; give up on varadic types. + * ipa-param-manipulation.c: Include attribs.h. + (build_adjusted_function_type): New parameter ARG_MODIFIED; if it is + true remove "fn spec" attribute. + (ipa_param_adjustments::build_new_function_type): Update. + (ipa_param_body_adjustments::modify_formal_parameters): update. + * ipa-sra.c: Include attribs.h. + (ipa_sra_preliminary_function_checks): Do not check for TYPE_ATTRIBUTES. + +2021-11-13 Aldy Hernandez + + * gimple-range-path.cc (path_range_query::path_range_query): Merge + ctors. + (path_range_query::import_p): Move from header file. + (path_range_query::~path_range_query): Adjust for combined ctors. + * gimple-range-path.h: Merge ctors. + (path_range_query::import_p): Move to .cc file. + +2021-11-13 Jan Hubicka + + PR tree-optimization/103182 + * ipa-modref.c (callee_to_caller_flags): Fix merging of flags. + (modref_eaf_analysis::analyze_ssa_name): Fix merging of flags. + 2021-11-12 Stafford Horne * config/or1k/or1k-protos.h (or1k_profile_hook): New function. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index f0484966df2..7b6a519184b 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20211113 +20211114 diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog index f6bf2726284..40678a16077 100644 --- a/gcc/analyzer/ChangeLog +++ b/gcc/analyzer/ChangeLog @@ -1,3 +1,76 @@ +2021-11-13 David Malcolm + + * analyzer.opt (Wanalyzer-tainted-allocation-size): New. + (Wanalyzer-tainted-divisor): New. + (Wanalyzer-tainted-offset): New. + (Wanalyzer-tainted-size): New. + * engine.cc (impl_region_model_context::get_taint_map): New. + * exploded-graph.h (impl_region_model_context::get_taint_map): + New decl. + * program-state.cc (sm_state_map::get_state): Call + alt_get_inherited_state. + (sm_state_map::impl_set_state): Modify states within + compound svalues. + (program_state::impl_call_analyzer_dump_state): Undo casts. + (selftest::test_program_state_1): Update for new context param of + create_region_for_heap_alloc. + (selftest::test_program_state_merging): Likewise. + * region-model-impl-calls.cc (region_model::impl_call_alloca): + Likewise. + (region_model::impl_call_calloc): Likewise. + (region_model::impl_call_malloc): Likewise. + (region_model::impl_call_operator_new): Likewise. + (region_model::impl_call_realloc): Likewise. + * region-model.cc (region_model::check_region_access): Call + check_region_for_taint. + (region_model::get_representative_path_var_1): Handle binops. + (region_model::create_region_for_heap_alloc): Add "ctxt" param and + pass it to set_dynamic_extents. + (region_model::create_region_for_alloca): Likewise. + (region_model::set_dynamic_extents): Add "ctxt" param and use it + to call check_dynamic_size_for_taint. + (selftest::test_state_merging): Update for new context param of + create_region_for_heap_alloc. + (selftest::test_malloc_constraints): Likewise. + (selftest::test_malloc): Likewise. + (selftest::test_alloca): Likewise for create_region_for_alloca. + * region-model.h (region_model::create_region_for_heap_alloc): Add + "ctxt" param. + (region_model::create_region_for_alloca): Likewise. + (region_model::set_dynamic_extents): Likewise. + (region_model::check_dynamic_size_for_taint): New decl. + (region_model::check_region_for_taint): New decl. + (region_model_context::get_taint_map): New vfunc. + (noop_region_model_context::get_taint_map): New. + * sm-taint.cc: Remove include of "diagnostic-event-id.h"; add + includes of "gimple-iterator.h", "tristate.h", "selftest.h", + "ordered-hash-map.h", "cgraph.h", "cfg.h", "digraph.h", + "analyzer/supergraph.h", "analyzer/call-string.h", + "analyzer/program-point.h", "analyzer/store.h", + "analyzer/region-model.h", and "analyzer/program-state.h". + (enum bounds): Move to top of file. + (class taint_diagnostic): New. + (class tainted_array_index): Convert to subclass of taint_diagnostic. + (tainted_array_index::emit): Add CWE-129. Reword warning to use + "attacker-controlled" rather than "tainted". + (tainted_array_index::describe_state_change): Move to + taint_diagnostic::describe_state_change. + (tainted_array_index::describe_final_event): Reword to use + "attacker-controlled" rather than "tainted". + (class tainted_offset): New. + (class tainted_size): New. + (class tainted_divisor): New. + (class tainted_allocation_size): New. + (taint_state_machine::alt_get_inherited_state): New. + (taint_state_machine::on_stmt): In assignment handling, remove + ARRAY_REF handling in favor of check_region_for_taint. Add + detection of tainted divisors. + (taint_state_machine::get_taint): New. + (taint_state_machine::combine_states): New. + (region_model::check_region_for_taint): New. + (region_model::check_dynamic_size_for_taint): New. + * sm.h (state_machine::alt_get_inherited_state): New. + 2021-11-12 David Malcolm * engine.cc (exploded_node::on_stmt_pre): Return when handling diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 99120299b9c..c262b55f474 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,28 @@ +2021-11-13 Jan Hubicka + + * g++.dg/cpp1z/inh-ctor23.C: Fix template + * g++.dg/ipa/ipa-icf-4.C: Fix template + * gcc.dg/tree-ssa/modref-dse-1.c: New test. + * gcc.dg/tree-ssa/modref-dse-2.c: New test. + +2021-11-13 David Malcolm + + * gcc.dg/analyzer/pr93382.c: Tweak expected wording. + * gcc.dg/analyzer/taint-alloc-1.c: New test. + * gcc.dg/analyzer/taint-alloc-2.c: New test. + * gcc.dg/analyzer/taint-divisor-1.c: New test. + * gcc.dg/analyzer/taint-1.c: Rename to... + * gcc.dg/analyzer/taint-read-index-1.c: ...this. Tweak expected + wording. Mark some events as xfail. + * gcc.dg/analyzer/taint-read-offset-1.c: New test. + * gcc.dg/analyzer/taint-size-1.c: New test. + * gcc.dg/analyzer/taint-write-index-1.c: New test. + * gcc.dg/analyzer/taint-write-offset-1.c: New test. + +2021-11-13 Aldy Hernandez + + * gcc.dg/pr103222.c: New test. + 2021-11-12 Jan Hubicka PR tree-optimization/103209 diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index e48429eab9e..495245d9d04 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,7 @@ +2021-11-13 H.J. Lu + + * LOCAL_PATCHES: Update to the corresponding revision. + 2021-11-04 Martin Liska * LOCAL_PATCHES: Update git revision. diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 34a130ea668..56d90d6f785 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,20 @@ +2021-11-13 Jonathan Wakely + + * include/Makefile.am: Add spanstream header. + * include/Makefile.in: Regenerate. + * include/precompiled/stdc++.h: Add spanstream header. + * include/std/version (__cpp_lib_spanstream): Define. + * include/std/spanstream: New file. + * testsuite/27_io/spanstream/1.cc: New test. + * testsuite/27_io/spanstream/version.cc: New test. + +2021-11-13 Hans-Peter Nilsson + + PR libstdc++/103166 + * acinclude.m4 (GLIBCXX_CHECK_GETENTROPY, GLIBCXX_CHECK_ARC4RANDOM): + Use GCC_TRY_COMPILE_OR_LINK instead of AC_TRY_COMPILE. + * configure: Regenerate. + 2021-11-12 Jonathan Wakely PR libstdc++/59675