]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/analyzer/ChangeLog
tree-optimization/93538 - add missing comparison folding case
[thirdparty/gcc.git] / gcc / analyzer / ChangeLog
CommitLineData
833f1e66
DM
12020-02-03 David Malcolm <dmalcolm@redhat.com>
2
3 * constraint-manager.cc (range::constrained_to_single_element):
4 Replace fold_build2 with fold_binary. Remove unnecessary newline.
5 (constraint_manager::get_or_add_equiv_class): Replace fold_build2
6 with fold_binary in two places, and remove out-of-date comment.
7 (constraint_manager::eval_condition): Replace fold_build2 with
8 fold_binary.
9 * region-model.cc (constant_svalue::eval_condition): Likewise.
10 (region_model::on_assignment): Likewise.
11
8525d1f5
DM
122020-02-03 David Malcolm <dmalcolm@redhat.com>
13
14 PR analyzer/93544
15 * diagnostic-manager.cc
16 (diagnostic_manager::prune_for_sm_diagnostic): Bulletproof
17 against bad choices due to bad paths.
18 * engine.cc (impl_region_model_context::on_phi): New.
19 * exploded-graph.h (impl_region_model_context::on_phi): New decl.
20 * region-model.cc (region_model::on_longjmp): Likewise.
21 (region_model::handle_phi): Add phi param. Call the ctxt's on_phi
22 vfunc.
23 (region_model::update_for_phis): Pass phi to handle_phi.
24 * region-model.h (region_model::handle_phi): Add phi param.
25 (region_model_context::on_phi): New vfunc.
26 (test_region_model_context::on_phi): New.
27 * sm-malloc.cc (malloc_state_machine::on_phi): New.
28 (malloc_state_machine::on_zero_assignment): New.
29 * sm.h (state_machine::on_phi): New vfunc.
30
73f38658
DM
312020-02-03 David Malcolm <dmalcolm@redhat.com>
32
33 * engine.cc (supernode_cluster::dump_dot): Show BB index as
34 well as SN index.
35 * supergraph.cc (supernode::dump_dot): Likewise.
36
5e10b9a2
DM
372020-02-03 David Malcolm <dmalcolm@redhat.com>
38
39 PR analyzer/93546
40 * region-model.cc (region_model::on_call_pre): Update for new
41 param of symbolic_region ctor.
42 (region_model::deref_rvalue): Likewise.
43 (region_model::add_new_malloc_region): Likewise.
44 (make_region_for_type): Likewise, preserving type.
45 * region-model.h (symbolic_region::symbolic_region): Add "type"
46 param and pass it to base class ctor.
47
287ccd3b
DM
482020-02-03 David Malcolm <dmalcolm@redhat.com>
49
50 PR analyzer/93547
51 * constraint-manager.cc
52 (constraint_manager::get_or_add_equiv_class): Ensure types are
53 compatible before comparing constants.
54
67751724
DM
552020-01-31 David Malcolm <dmalcolm@redhat.com>
56
57 PR analyzer/93457
58 * region-model.cc (make_region_for_type): Use VOID_TYPE_P rather
59 than checking against void_type_node.
60
09bea584
DM
612020-01-31 David Malcolm <dmalcolm@redhat.com>
62
63 PR analyzer/93373
64 * region-model.cc (ASSERT_COMPAT_TYPES): Convert to...
65 (assert_compat_types): ...this, and bail when either type is NULL,
66 or when VOID_TYPE_P (dst_type).
67 (region_model::get_lvalue): Update for above conversion.
68 (region_model::get_rvalue): Likewise.
69
f1c807e8
DM
702020-01-31 David Malcolm <dmalcolm@redhat.com>
71
72 PR analyzer/93379
73 * region-model.cc (region_model::update_for_return_superedge):
74 Move check for null result so that it also guards setting the
75 lhs.
76
455f58ec
DM
772020-01-31 David Malcolm <dmalcolm@redhat.com>
78
79 PR analyzer/93438
80 * region-model.cc (stack_region::can_merge_p): Split into a two
81 pass approach, creating all stack regions first, then populating
82 them.
83 (selftest::test_state_merging): Add test coverage for (a) the case
84 of self-merging a model in which a local in an older stack frame
85 points to a local in a more recent stack frame (which previously
86 would ICE), and (b) the case of self-merging a model in which a
87 local points to a global (which previously worked OK).
88
182ce042
DM
892020-01-31 David Malcolm <dmalcolm@redhat.com>
90
91 * analyzer.cc (is_named_call_p): Replace tests for fndecl being
92 extern at file scope and having a non-NULL DECL_NAME with a call
93 to maybe_special_function_p.
94 * function-set.cc (function_set::contains_decl_p): Add call to
95 maybe_special_function_p.
96
45eb3e49
DM
972020-01-31 David Malcolm <dmalcolm@redhat.com>
98
99 PR analyzer/93450
100 * constraint-manager.cc
101 (constraint_manager::get_or_add_equiv_class): Only compare constants
102 if their types are compatible.
103 * region-model.cc (constant_svalue::eval_condition): Replace check
104 for identical types with call to types_compatible_p.
105
42f36563
DM
1062020-01-30 David Malcolm <dmalcolm@redhat.com>
107
108 * program-state.cc (extrinsic_state::dump_to_pp): New.
109 (extrinsic_state::dump_to_file): New.
110 (extrinsic_state::dump): New.
111 * program-state.h (extrinsic_state::dump_to_pp): New decl.
112 (extrinsic_state::dump_to_file): New decl.
113 (extrinsic_state::dump): New decl.
114 * sm.cc: Include "pretty-print.h".
115 (state_machine::dump_to_pp): New.
116 * sm.h (state_machine::dump_to_pp): New decl.
117
ebe9174e
DM
1182020-01-30 David Malcolm <dmalcolm@redhat.com>
119
120 * diagnostic-manager.cc (for_each_state_change): Use
121 extrinsic_state::get_num_checkers rather than accessing m_checkers
122 directly.
123 * program-state.cc (program_state::program_state): Likewise.
124 * program-state.h (extrinsic_state::m_checkers): Make private.
125
e978955d
DM
1262020-01-30 David Malcolm <dmalcolm@redhat.com>
127
128 PR analyzer/93356
129 * region-model.cc (region_model::eval_condition): In both
130 overloads, bail out immediately on floating-point types.
131 (region_model::eval_condition_without_cm): Likewise.
132 (region_model::add_constraint): Likewise.
133
d177c49c
DM
1342020-01-30 David Malcolm <dmalcolm@redhat.com>
135
136 PR analyzer/93450
137 * program-state.cc (sm_state_map::set_state): For the overload
138 taking an svalue_id, bail out if the set_state on the ec does
139 nothing. Convert the latter's return type from void to bool,
140 returning true if anything changed.
141 (sm_state_map::impl_set_state): Convert the return type from void
142 to bool, returning true if the state changed.
143 * program-state.h (sm_state_map::set_state): Convert return type
144 from void to bool.
145 (sm_state_map::impl_set_state): Likewise.
146 * region-model.cc (constant_svalue::eval_condition): Only call
147 fold_build2 if the types are the same.
148
7892ff37
JJ
1492020-01-29 Jakub Jelinek <jakub@redhat.com>
150
151 * analyzer.h (PUSH_IGNORE_WFORMAT, POP_IGNORE_WFORMAT): Remove.
152 * constraint-manager.cc: Include diagnostic-core.h before graphviz.h.
153 (range::dump, equiv_class::print): Don't use PUSH_IGNORE_WFORMAT or
154 POP_IGNORE_WFORMAT.
155 * state-purge.cc: Include diagnostic-core.h before
156 gimple-pretty-print.h.
157 (state_purge_annotator::add_node_annotations, print_vec_of_names):
158 Don't use PUSH_IGNORE_WFORMAT or POP_IGNORE_WFORMAT.
159 * region-model.cc: Move diagnostic-core.h include before graphviz.h.
160 (path_var::dump, svalue::print, constant_svalue::print_details,
161 region::dump_to_pp, region::dump_child_label, region::print_fields,
162 map_region::print_fields, map_region::dump_dot_to_pp,
163 map_region::dump_child_label, array_region::print_fields,
164 array_region::dump_dot_to_pp): Don't use PUSH_IGNORE_WFORMAT or
165 POP_IGNORE_WFORMAT.
166
5aebfb71
DM
1672020-01-28 David Malcolm <dmalcolm@redhat.com>
168
169 PR analyzer/93316
170 * engine.cc (rewind_info_t::update_model): Get the longjmp call
171 stmt via get_longjmp_call () rather than assuming it is the last
172 stmt in the longjmp's supernode.
173 (rewind_info_t::add_events_to_path): Get the location_t for the
174 rewind_from_longjmp_event via get_longjmp_call () rather than from
175 the supernode's get_end_location ().
176
6c8e5844
DM
1772020-01-28 David Malcolm <dmalcolm@redhat.com>
178
179 * region-model.cc (poisoned_value_diagnostic::emit): Update for
180 renaming of warning_at overload to warning_meta.
181 * sm-file.cc (file_leak::emit): Likewise.
182 * sm-malloc.cc (double_free::emit): Likewise.
183 (possible_null_deref::emit): Likewise.
184 (possible_null_arg::emit): Likewise.
185 (null_deref::emit): Likewise.
186 (null_arg::emit): Likewise.
187 (use_after_free::emit): Likewise.
188 (malloc_leak::emit): Likewise.
189 (free_of_non_heap::emit): Likewise.
190 * sm-sensitive.cc (exposure_through_output_file::emit): Likewise.
191 * sm-signal.cc (signal_unsafe_call::emit): Likewise.
192 * sm-taint.cc (tainted_array_index::emit): Likewise.
193
8c08c983
DM
1942020-01-27 David Malcolm <dmalcolm@redhat.com>
195
196 PR analyzer/93451
197 * region-model.cc (tree_cmp): For the REAL_CST case, impose an
198 arbitrary order on NaNs relative to other NaNs and to non-NaNs;
199 const-correctness tweak.
200 (ana::selftests::build_real_cst_from_string): New function.
201 (ana::selftests::append_interesting_constants): New function.
202 (ana::selftests::test_tree_cmp_on_constants): New test.
203 (ana::selftests::test_canonicalization_4): New test.
204 (ana::selftests::analyzer_region_model_cc_tests): Call the new
205 tests.
206
2fbea419
DM
2072020-01-27 David Malcolm <dmalcolm@redhat.com>
208
209 PR analyzer/93349
210 * engine.cc (run_checkers): Save and restore input_location.
211
6a81cabc
DM
2122020-01-27 David Malcolm <dmalcolm@redhat.com>
213
214 * call-string.cc (call_string::cmp_1): Delete, moving body to...
215 (call_string::cmp): ...here.
216 * call-string.h (call_string::cmp_1): Delete decl.
217 * engine.cc (worklist::key_t::cmp_1): Delete, moving body to...
218 (worklist::key_t::cmp): ...here. Implement hash comparisons
219 via comparison rather than subtraction to avoid overflow issues.
220 * exploded-graph.h (worklist::key_t::cmp_1): Delete decl.
221 * region-model.cc (tree_cmp): Eliminate buggy checking for
222 symmetry.
223
342e14ff
DM
2242020-01-27 David Malcolm <dmalcolm@redhat.com>
225
226 * analyzer.cc (is_named_call_p): Check that fndecl is "extern"
227 and at file scope. Potentially disregard prefix _ or __ in
228 fndecl's name. Bail if the identifier is NULL.
229 (is_setjmp_call_p): Expect a gcall rather than plain gimple.
230 Remove special-case check for leading prefix, and also check for
231 sigsetjmp.
232 (is_longjmp_call_p): Also check for siglongjmp.
233 (get_user_facing_name): New function.
234 * analyzer.h (is_setjmp_call_p): Expect a gcall rather than plain
235 gimple.
236 (get_user_facing_name): New decl.
237 * checker-path.cc (setjmp_event::get_desc): Use
238 get_user_facing_name to avoid hardcoding the function name.
239 (rewind_event::rewind_event): Add rewind_info param, using it to
240 initialize new m_rewind_info field, and strengthen the assertion.
241 (rewind_from_longjmp_event::get_desc): Use get_user_facing_name to
242 avoid hardcoding the function name.
243 (rewind_to_setjmp_event::get_desc): Likewise.
244 * checker-path.h (setjmp_event::setjmp_event): Add setjmp_call
245 param and use it to initialize...
246 (setjmp_event::m_setjmp_call): New field.
247 (rewind_event::rewind_event): Add rewind_info param.
248 (rewind_event::m_rewind_info): New protected field.
249 (rewind_from_longjmp_event::rewind_from_longjmp_event): Add
250 rewind_info param.
251 (class rewind_to_setjmp_event): Move rewind_info field to parent
252 class.
253 * diagnostic-manager.cc (diagnostic_manager::add_events_for_eedge):
254 Update setjmp-handling for is_setjmp_call_p requiring a gcall;
255 pass the call to the new setjmp_event.
256 * engine.cc (exploded_node::on_stmt): Update for is_setjmp_call_p
257 requiring a gcall.
258 (stale_jmp_buf::emit): Use get_user_facing_name to avoid
259 hardcoding the function names.
260 (exploded_node::on_longjmp): Pass the longjmp_call when
261 constructing rewind_info.
262 (rewind_info_t::add_events_to_path): Pass the rewind_info_t to the
263 rewind_from_longjmp_event's ctor.
264 * exploded-graph.h (rewind_info_t::rewind_info_t): Add
265 longjmp_call param.
266 (rewind_info_t::get_longjmp_call): New.
267 (rewind_info_t::m_longjmp_call): New.
268 * region-model.cc (region_model::on_setjmp): Update comment to
269 indicate this is also for sigsetjmp.
270 * region-model.h (struct setjmp_record): Likewise.
271 (class setjmp_svalue): Likewise.
272
26d949c8
DM
2732020-01-27 David Malcolm <dmalcolm@redhat.com>
274
275 PR analyzer/93276
276 * analyzer.h (PUSH_IGNORE_WFORMAT, POP_IGNORE_WFORMAT): Guard these
277 macros with GCC_VERSION >= 4006, making them no-op otherwise.
278 * engine.cc (exploded_edge::exploded_edge): Specify template for
279 base class initializer.
280 (exploded_graph::add_edge): Specify template when chaining up to
281 base class add_edge implementation.
282 (viz_callgraph_node::dump_dot): Drop redundant "typename".
283 (viz_callgraph_edge::viz_callgraph_edge): Specify template for
284 base class initializer.
285 * program-state.cc (sm_state_map::clone_with_remapping): Drop
286 redundant "typename".
287 (sm_state_map::print): Likewise.
288 (sm_state_map::hash): Likewise.
289 (sm_state_map::operator==): Likewise.
290 (sm_state_map::remap_svalue_ids): Likewise.
291 (sm_state_map::on_svalue_purge): Likewise.
292 (sm_state_map::validate): Likewise.
293 * program-state.h (sm_state_map::iterator_t): Likewise.
294 * supergraph.h (superedge::superedge): Specify template for base
295 class initializer.
296
648796da
DM
2972020-01-23 David Malcolm <dmalcolm@redhat.com>
298
299 PR analyzer/93375
300 * supergraph.cc (callgraph_superedge::get_arg_for_parm): Fail
301 gracefully is the number of parameters at the callee exceeds the
302 number of arguments at the call stmt.
303 (callgraph_superedge::get_parm_for_arg): Likewise.
304
591b59eb
DM
3052020-01-22 David Malcolm <dmalcolm@redhat.com>
306
307 PR analyzer/93382
308 * program-state.cc (sm_state_map::on_svalue_purge): If the
309 entry survives, but the origin is being purged, then reset the
310 origin to null.
311
c9c8aef4
DM
3122020-01-22 David Malcolm <dmalcolm@redhat.com>
313
314 * sm-signal.cc: Fix nesting of CHECKING_P and namespace ana.
315
fd9982bb
DM
3162020-01-22 David Malcolm <dmalcolm@redhat.com>
317
318 PR analyzer/93378
319 * engine.cc (setjmp_svalue::compare_fields): Update for
320 replacement of m_enode with m_setjmp_record.
321 (setjmp_svalue::add_to_hash): Likewise.
322 (setjmp_svalue::get_index): Rename...
323 (setjmp_svalue::get_enode_index): ...to this.
324 (setjmp_svalue::print_details): Update for replacement of m_enode
325 with m_setjmp_record.
326 (exploded_node::on_longjmp): Likewise.
327 * exploded-graph.h (rewind_info_t::m_enode_origin): Replace...
328 (rewind_info_t::m_setjmp_record): ...with this.
329 (rewind_info_t::rewind_info_t): Update for replacement of m_enode
330 with m_setjmp_record.
331 (rewind_info_t::get_setjmp_point): Likewise.
332 (rewind_info_t::get_setjmp_call): Likewise.
333 * region-model.cc (region_model::dump_summary_of_map): Likewise.
334 (region_model::on_setjmp): Likewise.
335 * region-model.h (struct setjmp_record): New struct.
336 (setjmp_svalue::m_enode): Replace...
337 (setjmp_svalue::m_setjmp_record): ...with this.
338 (setjmp_svalue::setjmp_svalue): Update for replacement of m_enode
339 with m_setjmp_record.
340 (setjmp_svalue::clone): Likewise.
341 (setjmp_svalue::get_index): Rename...
342 (setjmp_svalue::get_enode_index): ...to this.
343 (setjmp_svalue::get_exploded_node): Replace...
344 (setjmp_svalue::get_setjmp_record): ...with this.
345
da7cf663
DM
3462020-01-22 David Malcolm <dmalcolm@redhat.com>
347
348 PR analyzer/93316
349 * analyzer.cc (is_setjmp_call_p): Check for "setjmp" as well as
350 "_setjmp".
351
75038aa6
DM
3522020-01-22 David Malcolm <dmalcolm@redhat.com>
353
354 PR analyzer/93307
355 * analysis-plan.h: Wrap everything namespace "ana".
356 * analyzer-logging.cc: Likewise.
357 * analyzer-logging.h: Likewise.
358 * analyzer-pass.cc (pass_analyzer::execute): Update for "ana"
359 namespace.
360 * analyzer-selftests.cc: Wrap everything namespace "ana".
361 * analyzer-selftests.h: Likewise.
362 * analyzer.h: Likewise for forward decls of types.
363 * call-string.h: Likewise.
364 * checker-path.cc: Likewise.
365 * checker-path.h: Likewise.
366 * constraint-manager.cc: Likewise.
367 * constraint-manager.h: Likewise.
368 * diagnostic-manager.cc: Likewise.
369 * diagnostic-manager.h: Likewise.
370 * engine.cc: Likewise.
371 * engine.h: Likewise.
372 * exploded-graph.h: Likewise.
373 * function-set.cc: Likewise.
374 * function-set.h: Likewise.
375 * pending-diagnostic.cc: Likewise.
376 * pending-diagnostic.h: Likewise.
377 * program-point.cc: Likewise.
378 * program-point.h: Likewise.
379 * program-state.cc: Likewise.
380 * program-state.h: Likewise.
381 * region-model.cc: Likewise.
382 * region-model.h: Likewise.
383 * sm-file.cc: Likewise.
384 * sm-malloc.cc: Likewise.
385 * sm-pattern-test.cc: Likewise.
386 * sm-sensitive.cc: Likewise.
387 * sm-signal.cc: Likewise.
388 * sm-taint.cc: Likewise.
389 * sm.cc: Likewise.
390 * sm.h: Likewise.
391 * state-purge.h: Likewise.
392 * supergraph.cc: Likewise.
393 * supergraph.h: Likewise.
394
4f01e577
DM
3952020-01-21 David Malcolm <dmalcolm@redhat.com>
396
397 PR analyzer/93352
398 * region-model.cc (int_cmp): Rename to...
399 (array_region::key_cmp): ...this, using key_t rather than int.
400 Rewrite in terms of comparisons rather than subtraction to
401 ensure qsort is anti-symmetric when handling extreme values.
402 (array_region::walk_for_canonicalization): Update for above
403 renaming.
404 * region-model.h (array_region::key_cmp): New decl.
405
07c86323
DM
4062020-01-17 David Malcolm <dmalcolm@redhat.com>
407
408 PR analyzer/93290
409 * region-model.cc (region_model::eval_condition_without_cm): Avoid
410 gcc_unreachable for unexpected operations for the case where
411 we're comparing an svalue against itself.
412
5f030383
DM
4132020-01-17 David Malcolm <dmalcolm@redhat.com>
414
415 PR analyzer/93281
416 * region-model.cc
417 (region_model::convert_byte_offset_to_array_index): Convert to
418 ssizetype before dividing by byte_size. Use fold_binary rather
419 than fold_build2 to avoid needlessly constructing a tree for the
420 non-const case.
421
49e9a999
DM
4222020-01-15 David Malcolm <dmalcolm@redhat.com>
423
424 * engine.cc (class impl_region_model_context): Fix comment.
425
32077b69
DM
4262020-01-14 David Malcolm <dmalcolm@redhat.com>
427
428 PR analyzer/93212
429 * region-model.cc (make_region_for_type): Use
430 FUNC_OR_METHOD_TYPE_P rather than comparing against FUNCTION_TYPE.
431 * region-model.h (function_region::function_region): Likewise.
432
7fb3669e
DM
4332020-01-14 David Malcolm <dmalcolm@redhat.com>
434
435 * program-state.cc (sm_state_map::clone_with_remapping): Copy
436 m_global_state.
437 (selftest::test_program_state_merging_2): New selftest.
438 (selftest::analyzer_program_state_cc_tests): Call it.
439
e2a538b1
DM
4402020-01-14 David Malcolm <dmalcolm@redhat.com>
441
442 * checker-path.h (checker_path::get_checker_event): New function.
443 (checker_path): Add DISABLE_COPY_AND_ASSIGN; make fields private.
444 * diagnostic-manager.cc
445 (diagnostic_manager::prune_for_sm_diagnostic): Replace direct
446 access to checker_path::m_events with accessor functions. Fix
447 overlong line.
448 (diagnostic_manager::prune_interproc_events): Replace direct
449 access to checker_path::m_events with accessor functions.
450 (diagnostic_manager::finish_pruning): Likewise.
451
94946989
DM
4522020-01-14 David Malcolm <dmalcolm@redhat.com>
453
454 * checker-path.h (checker_event::clone): Delete vfunc decl.
455 (debug_event::clone): Delete vfunc impl.
456 (custom_event::clone): Delete vfunc impl.
457 (statement_event::clone): Delete vfunc impl.
458 (function_entry_event::clone): Delete vfunc impl.
459 (state_change_event::clone): Delete vfunc impl.
460 (start_cfg_edge_event::clone): Delete vfunc impl.
461 (end_cfg_edge_event::clone): Delete vfunc impl.
462 (call_event::clone): Delete vfunc impl.
463 (return_event::clone): Delete vfunc impl.
464 (setjmp_event::clone): Delete vfunc impl.
465 (rewind_from_longjmp_event::clone): Delete vfunc impl.
466 (rewind_to_setjmp_event::clone): Delete vfunc impl.
467 (warning_event::clone): Delete vfunc impl.
468
718930c0
DM
4692020-01-14 David Malcolm <dmalcolm@redhat.com>
470
471 * supergraph.cc (supernode::dump_dot): Ensure that the TABLE
472 element has at least one TR.
473
8397af8e
DM
4742020-01-14 David Malcolm <dmalcolm@redhat.com>
475
476 PR analyzer/58237
477 * engine.cc (leak_stmt_finder::find_stmt): Use get_pure_location
478 when comparing against UNKNOWN_LOCATION.
479 (stmt_requires_new_enode_p): Likewise.
480 (exploded_graph::dump_exploded_nodes): Likewise.
481 * supergraph.cc (supernode::get_start_location): Likewise.
482 (supernode::get_end_location): Likewise.
483
697251b7
DM
4842020-01-14 David Malcolm <dmalcolm@redhat.com>
485
486 PR analyzer/58237
487 * analyzer-selftests.cc (selftest::run_analyzer_selftests): Call
488 selftest::analyzer_sm_file_cc_tests.
489 * analyzer-selftests.h (selftest::analyzer_sm_file_cc_tests): New
490 decl.
491 * sm-file.cc: Include "analyzer/function-set.h" and
492 "analyzer/analyzer-selftests.h".
493 (get_file_using_fns): New function.
494 (is_file_using_fn_p): New function.
495 (fileptr_state_machine::on_stmt): Return true for known functions.
496 (selftest::analyzer_sm_file_cc_tests): New function.
497
4804c5fe
DM
4982020-01-14 David Malcolm <dmalcolm@redhat.com>
499
500 * analyzer-selftests.cc (selftest::run_analyzer_selftests): Call
501 selftest::analyzer_sm_signal_cc_tests.
502 * analyzer-selftests.h (selftest::analyzer_sm_signal_cc_tests):
503 New decl.
504 * sm-signal.cc: Include "analyzer/function-set.h" and
505 "analyzer/analyzer-selftests.h".
506 (get_async_signal_unsafe_fns): New function.
507 (signal_unsafe_p): Reimplement in terms of the above.
508 (selftest::analyzer_sm_signal_cc_tests): New function.
509
a6b5f19c
DM
5102020-01-14 David Malcolm <dmalcolm@redhat.com>
511
512 * analyzer-selftests.cc (selftest::run_analyzer_selftests): Call
513 selftest::analyzer_function_set_cc_tests.
514 * analyzer-selftests.h (selftest::analyzer_function_set_cc_tests):
515 New decl.
516 * function-set.cc: New file.
517 * function-set.h: New file.
518
ef7827b0
DM
5192020-01-14 David Malcolm <dmalcolm@redhat.com>
520
521 * analyzer.h (fndecl_has_gimple_body_p): New decl.
522 * engine.cc (impl_region_model_context::on_unknown_change): New
523 function.
524 (fndecl_has_gimple_body_p): Make non-static.
525 (exploded_node::on_stmt): Treat __analyzer_dump_exploded_nodes as
526 known. Track whether we have a call with unknown side-effects and
527 pass it to on_call_post.
528 * exploded-graph.h (impl_region_model_context::on_unknown_change):
529 New decl.
530 * program-state.cc (sm_state_map::on_unknown_change): New function.
531 * program-state.h (sm_state_map::on_unknown_change): New decl.
532 * region-model.cc: Include "bitmap.h".
533 (region_model::on_call_pre): Return a bool, capturing whether the
534 call has unknown side effects.
535 (region_model::on_call_post): Add arg "bool unknown_side_effects"
536 and if true, call handle_unrecognized_call.
537 (class reachable_regions): New class.
538 (region_model::handle_unrecognized_call): New function.
539 * region-model.h (region_model::on_call_pre): Return a bool.
540 (region_model::on_call_post): Add arg "bool unknown_side_effects".
541 (region_model::handle_unrecognized_call): New decl.
542 (region_model_context::on_unknown_change): New vfunc.
543 (test_region_model_context::on_unknown_change): New function.
544
14f9d7b9
DM
5452020-01-14 David Malcolm <dmalcolm@redhat.com>
546
547 * diagnostic-manager.cc (saved_diagnostic::operator==): Move here
548 from header. Replace pointer equality test on m_var with call to
549 pending_diagnostic::same_tree_p.
550 * diagnostic-manager.h (saved_diagnostic::operator==): Move to
551 diagnostic-manager.cc.
552 * pending-diagnostic.cc (pending_diagnostic::same_tree_p): New.
553 * pending-diagnostic.h (pending_diagnostic::same_tree_p): New.
554 * sm-file.cc (file_diagnostic::subclass_equal_p): Replace pointer
555 equality on m_arg with call to pending_diagnostic::same_tree_p.
556 * sm-malloc.cc (malloc_diagnostic::subclass_equal_p): Likewise.
557 (possible_null_arg::subclass_equal_p): Likewise.
558 (null_arg::subclass_equal_p): Likewise.
559 (free_of_non_heap::subclass_equal_p): Likewise.
560 * sm-pattern-test.cc (pattern_match::operator==): Likewise.
561 * sm-sensitive.cc (exposure_through_output_file::operator==):
562 Likewise.
563 * sm-taint.cc (tainted_array_index::operator==): Likewise.
564
f474fbd5
DM
5652020-01-14 David Malcolm <dmalcolm@redhat.com>
566
567 * diagnostic-manager.cc (dedupe_winners::add): Add logging
568 of deduplication decisions made.
569
757bf1df
DM
5702020-01-14 David Malcolm <dmalcolm@redhat.com>
571
572 * ChangeLog: New file.
573 * analyzer-selftests.cc: New file.
574 * analyzer-selftests.h: New file.
575 * analyzer.opt: New file.
576 * analysis-plan.cc: New file.
577 * analysis-plan.h: New file.
578 * analyzer-logging.cc: New file.
579 * analyzer-logging.h: New file.
580 * analyzer-pass.cc: New file.
581 * analyzer.cc: New file.
582 * analyzer.h: New file.
583 * call-string.cc: New file.
584 * call-string.h: New file.
585 * checker-path.cc: New file.
586 * checker-path.h: New file.
587 * constraint-manager.cc: New file.
588 * constraint-manager.h: New file.
589 * diagnostic-manager.cc: New file.
590 * diagnostic-manager.h: New file.
591 * engine.cc: New file.
592 * engine.h: New file.
593 * exploded-graph.h: New file.
594 * pending-diagnostic.cc: New file.
595 * pending-diagnostic.h: New file.
596 * program-point.cc: New file.
597 * program-point.h: New file.
598 * program-state.cc: New file.
599 * program-state.h: New file.
600 * region-model.cc: New file.
601 * region-model.h: New file.
602 * sm-file.cc: New file.
603 * sm-malloc.cc: New file.
604 * sm-malloc.dot: New file.
605 * sm-pattern-test.cc: New file.
606 * sm-sensitive.cc: New file.
607 * sm-signal.cc: New file.
608 * sm-taint.cc: New file.
609 * sm.cc: New file.
610 * sm.h: New file.
611 * state-purge.cc: New file.
612 * state-purge.h: New file.
613 * supergraph.cc: New file.
614 * supergraph.h: New file.
615
6162019-12-13 David Malcolm <dmalcolm@redhat.com>
617
618 * Initial creation
619
620\f
621Copyright (C) 2019-2020 Free Software Foundation, Inc.
622
623Copying and distribution of this file, with or without modification,
624are permitted in any medium without royalty provided the copyright
625notice and this notice are preserved.