diff options
author | GCC Administrator <gccadmin@gcc.gnu.org> | 2022-11-11 00:17:22 +0000 |
---|---|---|
committer | GCC Administrator <gccadmin@gcc.gnu.org> | 2022-11-11 00:17:22 +0000 |
commit | f225b813e4d1d337164b72361f23306c1b28d550 (patch) | |
tree | 88100c831be977723e0dc9d5f9c1deb3c3f4c1ff /gcc/analyzer | |
parent | 5c6546ca7d8cab1f1c129f5b55f709e2ceee0f94 (diff) | |
download | gcc-f225b813e4d1d337164b72361f23306c1b28d550.zip gcc-f225b813e4d1d337164b72361f23306c1b28d550.tar.gz gcc-f225b813e4d1d337164b72361f23306c1b28d550.tar.bz2 |
Daily bump.
Diffstat (limited to 'gcc/analyzer')
-rw-r--r-- | gcc/analyzer/ChangeLog | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog index 61188e9..99dbe7c 100644 --- a/gcc/analyzer/ChangeLog +++ b/gcc/analyzer/ChangeLog @@ -1,3 +1,52 @@ +2022-11-10 David Malcolm <dmalcolm@redhat.com> + + PR analyzer/99671 + * analyzer.opt (Wanalyzer-deref-before-check): New warning. + * diagnostic-manager.cc + (null_assignment_sm_context::set_next_state): Only add state + change events for transition to "null" state. + (null_assignment_sm_context::is_transition_to_null): New. + * engine.cc (impl_region_model_context::on_pop_frame): New. + * exploded-graph.h (impl_region_model_context::on_pop_frame): New + decl. + * program-state.cc (sm_state_map::clear_any_state): New. + (sm_state_map::can_merge_with_p): New. + (program_state::can_merge_with_p): Replace requirement that + sm-states be equal in favor of an attempt to merge them. + * program-state.h (sm_state_map::clear_any_state): New decl. + (sm_state_map::can_merge_with_p): New decl. + * region-model.cc (region_model::eval_condition): Make const. + (region_model::pop_frame): Call ctxt->on_pop_frame. + * region-model.h (region_model::eval_condition): Make const. + (region_model_context::on_pop_frame): New vfunc. + (noop_region_model_context::on_pop_frame): New. + (region_model_context_decorator::on_pop_frame): New. + * sm-malloc.cc (enum resource_state): Add RS_ASSUMED_NON_NULL. + (allocation_state::dump_to_pp): Drop "final". + (struct assumed_non_null_state): New subclass. + (malloc_state_machine::m_assumed_non_null): New. + (assumed_non_null_p): New. + (class deref_before_check): New. + (assumed_non_null_state::dump_to_pp): New. + (malloc_state_machine::get_or_create_assumed_non_null_state_for_frame): + New. + (malloc_state_machine::maybe_assume_non_null): New. + (malloc_state_machine::on_stmt): Transition from start state to + "assumed-non-null" state for pointers passed to + __attribute__((nonnull)) arguments, and for pointers explicitly + dereferenced. Call maybe_complain_about_deref_before_check for + pointers explicitly compared against NULL. + (malloc_state_machine::maybe_complain_about_deref_before_check): + New. + (malloc_state_machine::on_deallocator_call): Also transition + "assumed-non-null" states to "freed". + (malloc_state_machine::on_pop_frame): New. + (malloc_state_machine::maybe_get_merged_states_nonequal): New. + * sm-malloc.dot: Update for changes to sm-malloc.cc. + * sm.h (state_machine::on_pop_frame): New. + (state_machine::maybe_get_merged_state): New. + (state_machine::maybe_get_merged_states_nonequal): New. + 2022-11-09 David Malcolm <dmalcolm@redhat.com> * checker-path.cc (checker_event::debug): New. |