diff --git a/infer/src/biabduction/SymExec.ml b/infer/src/biabduction/SymExec.ml index 098e0a47a..43d34bb29 100644 --- a/infer/src/biabduction/SymExec.ml +++ b/infer/src/biabduction/SymExec.ml @@ -359,21 +359,32 @@ let check_inherently_dangerous_function caller_pname callee_pname = let reason_to_skip ~callee_desc : string option = + let reason_from_attributes attributes = + if attributes.ProcAttributes.is_abstract then Some "abstract method" + else if not attributes.ProcAttributes.is_defined then Some "method has no implementation" + else None + in + let reason_from_pname pname = + if Typ.Procname.is_method_in_objc_protocol pname then + Some "no implementation found for method declared in Objective-C protocol" + else None + in match callee_desc with - | Some (`Summary callee_summary) -> - let attributes = Specs.get_attributes callee_summary in - if attributes.ProcAttributes.is_abstract then Some "abstract method" - else if not attributes.ProcAttributes.is_defined then Some "method has no implementation" + | `Summary callee_summary -> + let attr_reason = Specs.get_attributes callee_summary |> reason_from_attributes in + if Option.is_some attr_reason then attr_reason else if List.is_empty (Specs.get_specs_from_payload callee_summary) then Some "empty list of specs" else (* we are not skipping *) None - | Some (`ProcName callee_pname) -> - (* no summary, so we are skipping, determining reasons *) - if Typ.Procname.is_method_in_objc_protocol callee_pname then - Some "no implementation found for method declared in Objective-C protocol" - else Some "function or method not found" - | None -> - Some "function or method not found" + | `ProcDesc procdesc -> + let pname_reason = Procdesc.get_proc_name procdesc |> reason_from_pname in + if Option.is_some pname_reason then pname_reason + else + let attr_reason = Procdesc.get_attributes procdesc |> reason_from_attributes in + if Option.is_some attr_reason then attr_reason else Some "function or method not found" + | `ProcName callee_pname -> + let pname_reason = reason_from_pname callee_pname in + if Option.is_some pname_reason then pname_reason else Some "function or method not found" (** In case of constant string dereference, return the result immediately *) @@ -1184,7 +1195,7 @@ let rec sym_exec exe_env tenv current_pdesc instr_ (prop_: Prop.normal Prop.t) p let ret_annots = load_ret_annots callee_pname in exec_skip_call ~reason:"unknown method" resolved_pname ret_annots ret_typ | Some resolved_summary -> - match reason_to_skip ~callee_desc:(Some (`Summary resolved_summary)) with + match reason_to_skip ~callee_desc:(`Summary resolved_summary) with | None -> proc_call exe_env resolved_summary (call_args prop_ callee_pname norm_args ret_id_typ loc) @@ -1210,7 +1221,7 @@ let rec sym_exec exe_env tenv current_pdesc instr_ (prop_: Prop.normal Prop.t) p let ret_annots = load_ret_annots callee_pname in exec_skip_call ~reason:"unknown method" ret_annots ret_typ | Some callee_summary -> - match reason_to_skip ~callee_desc:(Some (`Summary callee_summary)) with + match reason_to_skip ~callee_desc:(`Summary callee_summary) with | None -> let handled_args = call_args norm_prop pname url_handled_args ret_id_typ loc in proc_call exe_env callee_summary handled_args @@ -1259,11 +1270,13 @@ let rec sym_exec exe_env tenv current_pdesc instr_ (prop_: Prop.normal Prop.t) p in let do_call (prop, path) = let callee_desc = - match resolved_summary_opt with - | Some summary -> - Some (`Summary summary) - | None -> - Some (`ProcName resolved_pname) + match (resolved_summary_opt, callee_pdesc_opt) with + | Some summary, _ -> + `Summary summary + | None, Some pdesc -> + `ProcDesc pdesc + | None, None -> + `ProcName resolved_pname in match reason_to_skip ~callee_desc with | Some reason diff --git a/infer/tests/codetoanalyze/cpp/conflicts/issues.exp b/infer/tests/codetoanalyze/cpp/conflicts/issues.exp index 90c56e5b2..b73d973be 100644 --- a/infer/tests/codetoanalyze/cpp/conflicts/issues.exp +++ b/infer/tests/codetoanalyze/cpp/conflicts/issues.exp @@ -1,3 +1,3 @@ -codetoanalyze/cpp/conflicts/test.cpp, test1_bad, 2, NULL_DEREFERENCE, ERROR, [start of procedure test1_bad(),Skipping nullableMethod(): function or method not found] +codetoanalyze/cpp/conflicts/test.cpp, test1_bad, 2, NULL_DEREFERENCE, ERROR, [start of procedure test1_bad(),Skipping nullableMethod(): method has no implementation] codetoanalyze/cpp/conflicts/test.cpp, test2_bad, 1, NULLABLE_DEREFERENCE, ERROR, [dereferencing the return of nullableMethod(),definition of nullableMethod] -codetoanalyze/cpp/conflicts/test.cpp, test3_bad, 5, NULL_DEREFERENCE, ERROR, [start of procedure test3_bad(),Skipping nullableMethod(): function or method not found,Loop condition is true. Entering loop body,Skipping nullableMethod(): function or method not found,Loop condition is false. Leaving loop] +codetoanalyze/cpp/conflicts/test.cpp, test3_bad, 5, NULL_DEREFERENCE, ERROR, [start of procedure test3_bad(),Skipping nullableMethod(): method has no implementation,Loop condition is true. Entering loop body,Skipping nullableMethod(): method has no implementation,Loop condition is false. Leaving loop] diff --git a/infer/tests/codetoanalyze/cpp/errors/issues.exp b/infer/tests/codetoanalyze/cpp/errors/issues.exp index 6e2d8ef74..af9ea7c37 100644 --- a/infer/tests/codetoanalyze/cpp/errors/issues.exp +++ b/infer/tests/codetoanalyze/cpp/errors/issues.exp @@ -44,10 +44,10 @@ codetoanalyze/cpp/errors/models/throw_wrapper.cpp, nothrow_if_null_bad, 4, NULL_ codetoanalyze/cpp/errors/mutex/std_mutex.cpp, alarm1, 2, DOUBLE_LOCK, ERROR, [start of procedure alarm1()] codetoanalyze/cpp/errors/mutex/std_mutex.cpp, alarm2, 2, DOUBLE_LOCK, ERROR, [start of procedure alarm2()] codetoanalyze/cpp/errors/mutex/std_mutex.cpp, alarm2, 2, DOUBLE_LOCK, ERROR, [start of procedure alarm2()] -codetoanalyze/cpp/errors/mutex/std_mutex.cpp, alarm3, 6, DOUBLE_LOCK, ERROR, [start of procedure alarm3(),Skipping mutex: function or method not found,Taking true branch,Taking true branch] +codetoanalyze/cpp/errors/mutex/std_mutex.cpp, alarm3, 6, DOUBLE_LOCK, ERROR, [start of procedure alarm3(),Skipping mutex: method has no implementation,Taking true branch,Taking true branch] codetoanalyze/cpp/errors/mutex/std_mutex_lock_profiling.cpp, LockMapBucket_bad_usage3, 2, PRECONDITION_NOT_MET, WARNING, [start of procedure bad_usage3,start of procedure LpLockGuard,start of procedure lp_lock(),start of procedure detail::try_lock_impl(),Taking true branch,return from a call to detail::try_lock_impl,Switch condition is true. Entering switch case,return from a call to lp_lock,return from a call to LpLockGuard_LpLockGuard] -codetoanalyze/cpp/errors/mutex/std_mutex_lock_profiling.cpp, bad_usage1, 3, PRECONDITION_NOT_MET, WARNING, [start of procedure bad_usage1(),Skipping mutex: function or method not found,start of procedure lp_lock(),start of procedure detail::try_lock_impl(),Taking true branch,return from a call to detail::try_lock_impl,Switch condition is true. Entering switch case,return from a call to lp_lock] -codetoanalyze/cpp/errors/mutex/std_mutex_lock_profiling.cpp, bad_usage2, 3, PRECONDITION_NOT_MET, WARNING, [start of procedure bad_usage2(),Skipping mutex: function or method not found] +codetoanalyze/cpp/errors/mutex/std_mutex_lock_profiling.cpp, bad_usage1, 3, PRECONDITION_NOT_MET, WARNING, [start of procedure bad_usage1(),Skipping mutex: method has no implementation,start of procedure lp_lock(),start of procedure detail::try_lock_impl(),Taking true branch,return from a call to detail::try_lock_impl,Switch condition is true. Entering switch case,return from a call to lp_lock] +codetoanalyze/cpp/errors/mutex/std_mutex_lock_profiling.cpp, bad_usage2, 3, PRECONDITION_NOT_MET, WARNING, [start of procedure bad_usage2(),Skipping mutex: method has no implementation] codetoanalyze/cpp/errors/mutex/std_mutex_lock_profiling.cpp, lp_lock, 7, DOUBLE_LOCK, ERROR, [start of procedure lp_lock(),start of procedure detail::try_lock_impl(),Taking false branch,return from a call to detail::try_lock_impl,Switch condition is false. Skipping switch case,Switch condition is true. Entering switch case,start of procedure detail::lock_impl(),return from a call to detail::lock_impl] codetoanalyze/cpp/errors/mutex/timed_mutex.cpp, alarm1, 2, DOUBLE_LOCK, ERROR, [start of procedure alarm1()] codetoanalyze/cpp/errors/mutex/timed_mutex.cpp, try_lock_bad, 2, DOUBLE_LOCK, ERROR, [start of procedure try_lock_bad()] @@ -68,12 +68,12 @@ codetoanalyze/cpp/errors/npe/npe_added_to_b1.cpp, npe_added_to_b1::causes_npe, 2 codetoanalyze/cpp/errors/npe/npe_added_to_b1.cpp, npe_added_to_b1::causes_npe_person, 2, NULL_DEREFERENCE, ERROR, [start of procedure npe_added_to_b1::causes_npe_person(),start of procedure Person,return from a call to npe_added_to_b1::Person_Person,start of procedure npe_added_to_b1::deref_person()] codetoanalyze/cpp/errors/npe/null_returned_by_method.cpp, testNullDeref, 3, NULL_DEREFERENCE, ERROR, [start of procedure testNullDeref(),Taking true branch,start of procedure getNull,return from a call to XFactory_getNull] codetoanalyze/cpp/errors/npe/object_deref.cpp, object_deref::derefNullField, 2, NULL_DEREFERENCE, ERROR, [start of procedure object_deref::derefNullField(),start of procedure object_deref::getNull(),return from a call to object_deref::getNull] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, FP_const_skip2_then_split_case_ok, 5, MEMORY_LEAK, ERROR, [start of procedure FP_const_skip2_then_split_case_ok(),Skipping skip_const2(): function or method not found,start of procedure test_pointer(),Taking true branch,return from a call to test_pointer] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, FP_const_skip_then_split_case_ok, 6, MEMORY_LEAK, ERROR, [start of procedure FP_const_skip_then_split_case_ok(),Skipping skip_const(): function or method not found,start of procedure test_pointer(),Taking true branch,return from a call to test_pointer] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, FP_typedef_skip_then_split_case_ok, 2, MEMORY_LEAK, ERROR, [start of procedure FP_typedef_skip_then_split_case_ok(),Skipping skip_typedef(): function or method not found] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, FP_typedef_skip_then_split_case_ok, 4, NULL_DEREFERENCE, ERROR, [start of procedure FP_typedef_skip_then_split_case_ok(),Skipping skip_typedef(): function or method not found,start of procedure test_pointer(),Taking false branch,return from a call to test_pointer] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, skip_then_split_case_bad, 2, MEMORY_LEAK, ERROR, [start of procedure skip_then_split_case_bad(),Skipping skip_no_const(): function or method not found] -codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, skip_then_split_case_bad, 5, NULL_DEREFERENCE, ERROR, [start of procedure skip_then_split_case_bad(),Skipping skip_no_const(): function or method not found,start of procedure test_pointer(),Taking false branch,return from a call to test_pointer] +codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, FP_const_skip2_then_split_case_ok, 5, MEMORY_LEAK, ERROR, [start of procedure FP_const_skip2_then_split_case_ok(),Skipping skip_const2(): method has no implementation,start of procedure test_pointer(),Taking true branch,return from a call to test_pointer] +codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, FP_const_skip_then_split_case_ok, 6, MEMORY_LEAK, ERROR, [start of procedure FP_const_skip_then_split_case_ok(),Skipping skip_const(): method has no implementation,start of procedure test_pointer(),Taking true branch,return from a call to test_pointer] +codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, FP_typedef_skip_then_split_case_ok, 2, MEMORY_LEAK, ERROR, [start of procedure FP_typedef_skip_then_split_case_ok(),Skipping skip_typedef(): method has no implementation] +codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, FP_typedef_skip_then_split_case_ok, 4, NULL_DEREFERENCE, ERROR, [start of procedure FP_typedef_skip_then_split_case_ok(),Skipping skip_typedef(): method has no implementation,start of procedure test_pointer(),Taking false branch,return from a call to test_pointer] +codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, skip_then_split_case_bad, 2, MEMORY_LEAK, ERROR, [start of procedure skip_then_split_case_bad(),Skipping skip_no_const(): method has no implementation] +codetoanalyze/cpp/errors/npe/skip_function_with_const_formals.cpp, skip_then_split_case_bad, 5, NULL_DEREFERENCE, ERROR, [start of procedure skip_then_split_case_bad(),Skipping skip_no_const(): method has no implementation,start of procedure test_pointer(),Taking false branch,return from a call to test_pointer] codetoanalyze/cpp/errors/numeric/min_max.cpp, max_X_inv_div0, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure max_X_inv_div0(),start of procedure X_inv,return from a call to X_inv_X_inv,start of procedure X_inv,return from a call to X_inv_X_inv] codetoanalyze/cpp/errors/numeric/min_max.cpp, max_int_div0, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure max_int_div0()] codetoanalyze/cpp/errors/numeric/min_max.cpp, min_X_div0, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure min_X_div0(),start of procedure X,return from a call to X_X,start of procedure X,return from a call to X_X] @@ -93,7 +93,7 @@ codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile4, 2, N codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_crash, 4, NULL_DEREFERENCE, ERROR, [start of procedure deref_after_mode_example::deref_after_move_crash(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure move_age,return from a call to deref_after_mode_example::Person_move_age,start of procedure access_age] codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_ok, 3, MEMORY_LEAK, ERROR, [start of procedure deref_after_mode_example::deref_after_move_ok(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure move_age,return from a call to deref_after_mode_example::Person_move_age,start of procedure ~Person,start of procedure __infer_inner_destructor_~Person,return from a call to deref_after_mode_example::Person___infer_inner_destructor_~Person,return from a call to deref_after_mode_example::Person_~Person] codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_ok, 2, MEMORY_LEAK, ERROR, [start of procedure deref_after_mode_example::deref_ok(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure access_age,return from a call to deref_after_mode_example::Person_access_age,start of procedure ~Person,start of procedure __infer_inner_destructor_~Person,return from a call to deref_after_mode_example::Person___infer_inner_destructor_~Person,return from a call to deref_after_mode_example::Person_~Person] -codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::aliasing_member_null_bad, 4, NULL_DEREFERENCE, ERROR, [start of procedure shared_ptr_constructors::aliasing_member_null_bad(),start of procedure shared_ptr_constructors::aliasing_construct_from_internal(),start of procedure shared_ptr_constructors::internal_null_def(),Skipping shared_ptr_constructors::external_def(): function or method not found,return from a call to shared_ptr_constructors::internal_null_def,Taking false branch,return from a call to shared_ptr_constructors::aliasing_construct_from_internal] +codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::aliasing_member_null_bad, 4, NULL_DEREFERENCE, ERROR, [start of procedure shared_ptr_constructors::aliasing_member_null_bad(),start of procedure shared_ptr_constructors::aliasing_construct_from_internal(),start of procedure shared_ptr_constructors::internal_null_def(),Skipping shared_ptr_constructors::external_def(): method has no implementation,return from a call to shared_ptr_constructors::internal_null_def,Taking false branch,return from a call to shared_ptr_constructors::aliasing_construct_from_internal] codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base1_null_f1_deref, 6, NULL_DEREFERENCE, ERROR, [start of procedure shared_ptr_constructors::get_from_base1_null_f1_deref(),start of procedure Base,return from a call to shared_ptr_constructors::Base_Base,start of procedure shared_ptr_constructors::getFromBase1(),return from a call to shared_ptr_constructors::getFromBase1] codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base1_nullptr_deref, 0, NULL_DEREFERENCE, ERROR, [start of procedure shared_ptr_constructors::get_from_base1_nullptr_deref(),start of procedure shared_ptr_constructors::getFromBase1(),return from a call to shared_ptr_constructors::getFromBase1] codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base2_null_f1_deref, 6, NULL_DEREFERENCE, ERROR, [start of procedure shared_ptr_constructors::get_from_base2_null_f1_deref(),start of procedure Base,return from a call to shared_ptr_constructors::Base_Base,start of procedure shared_ptr_constructors::getFromBase2(),return from a call to shared_ptr_constructors::getFromBase2] @@ -160,7 +160,7 @@ codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::lock_can_be codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::shared_still_in_scope_good_FP, 6, NULL_DEREFERENCE, ERROR, [start of procedure weak_ptr_observers::shared_still_in_scope_good_FP()] codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::use_count_after_reset_bad, 5, use_count after weak_ptr reset is 0, ERROR, [start of procedure weak_ptr_observers::use_count_after_reset_bad(),Taking true branch,return from a call to weak_ptr_observers::use_count_after_reset_bad] codetoanalyze/cpp/errors/smart_ptr/weak_ptr.cpp, weak_ptr_observers::use_count_empty_bad, 5, use_count on empty weak_ptr is 0, ERROR, [start of procedure weak_ptr_observers::use_count_empty_bad(),Taking true branch,return from a call to weak_ptr_observers::use_count_empty_bad] -codetoanalyze/cpp/errors/smart_ptr/weak_ptr_compil.cpp, weak_ptr_lock_repro_large::RDC::create::lambda_smart_ptr_weak_ptr_compil.cpp:62:7_operator(), 2, Cannot_star, ERROR, [start of procedure operator(),Taking true branch,Skipping function: function or method not found] +codetoanalyze/cpp/errors/smart_ptr/weak_ptr_compil.cpp, weak_ptr_lock_repro_large::RDC::create::lambda_smart_ptr_weak_ptr_compil.cpp:62:7_operator(), 2, Cannot_star, ERROR, [start of procedure operator(),Taking true branch,Skipping function: method has no implementation] codetoanalyze/cpp/errors/stack_escape/basic.cpp, B_return_ref, 0, STACK_VARIABLE_ADDRESS_ESCAPE, ERROR, [start of procedure return_ref,start of procedure A,return from a call to A_A,return from a call to B_return_ref] codetoanalyze/cpp/errors/stack_escape/basic.cpp, basic_escape_local_bad, 3, STACK_VARIABLE_ADDRESS_ESCAPE, ERROR, [start of procedure basic_escape_local_bad(),return from a call to basic_escape_local_bad] codetoanalyze/cpp/errors/stack_escape/basic.cpp, basic_escape_param_bad, 0, STACK_VARIABLE_ADDRESS_ESCAPE, ERROR, [start of procedure basic_escape_param_bad(),return from a call to basic_escape_param_bad] @@ -197,9 +197,9 @@ codetoanalyze/cpp/errors/types/typeid_expr.cpp, person_typeid_name, 8, DIVIDE_BY codetoanalyze/cpp/errors/types/typeid_expr.cpp, template_type_id_person, 2, MEMORY_LEAK, ERROR, [start of procedure template_type_id_person(),start of procedure Person,return from a call to Person_Person,Skipping template_typeid(): empty list of specs] codetoanalyze/cpp/errors/types/typeid_expr.cpp, template_type_id_person, 5, DIVIDE_BY_ZERO, ERROR, [start of procedure template_type_id_person(),start of procedure Person,return from a call to Person_Person,Taking false branch] codetoanalyze/cpp/errors/types/typeid_expr.cpp, template_typeid, 2, MEMORY_LEAK, ERROR, [start of procedure template_typeid(),start of procedure Person,return from a call to Person_Person,start of procedure Person,return from a call to Person_Person,start of procedure ~Person,start of procedure __infer_inner_destructor_~Person,return from a call to Person___infer_inner_destructor_~Person,return from a call to Person_~Person] -codetoanalyze/cpp/errors/use_after_free/foreach_map.cpp, use_after_free::Basic_test_double_delete_bad, 3, USE_AFTER_FREE, ERROR, [start of procedure test_double_delete_bad,Skipping Y: function or method not found] -codetoanalyze/cpp/errors/use_after_free/foreach_map.cpp, use_after_free::Basic_test_for_map_delete_ok_FP, 2, USE_AFTER_FREE, ERROR, [start of procedure test_for_map_delete_ok_FP,Loop condition is true. Entering loop body,Skipping operator*: function or method not found,Loop condition is true. Entering loop body,Skipping operator*: function or method not found] -codetoanalyze/cpp/errors/use_after_free/foreach_map.cpp, use_after_free::Basic_test_for_umap_delete_ok_FP, 2, USE_AFTER_FREE, ERROR, [start of procedure test_for_umap_delete_ok_FP,Loop condition is true. Entering loop body,Skipping operator*: function or method not found,Loop condition is true. Entering loop body,Skipping operator*: function or method not found] +codetoanalyze/cpp/errors/use_after_free/foreach_map.cpp, use_after_free::Basic_test_double_delete_bad, 3, USE_AFTER_FREE, ERROR, [start of procedure test_double_delete_bad,Skipping Y: method has no implementation] +codetoanalyze/cpp/errors/use_after_free/foreach_map.cpp, use_after_free::Basic_test_for_map_delete_ok_FP, 2, USE_AFTER_FREE, ERROR, [start of procedure test_for_map_delete_ok_FP,Loop condition is true. Entering loop body,Skipping operator*: method has no implementation,Loop condition is true. Entering loop body,Skipping operator*: method has no implementation] +codetoanalyze/cpp/errors/use_after_free/foreach_map.cpp, use_after_free::Basic_test_for_umap_delete_ok_FP, 2, USE_AFTER_FREE, ERROR, [start of procedure test_for_umap_delete_ok_FP,Loop condition is true. Entering loop body,Skipping operator*: method has no implementation,Loop condition is true. Entering loop body,Skipping operator*: method has no implementation] codetoanalyze/cpp/errors/vector/access_field_later.cpp, getIntPtr, 2, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure getIntPtr()] codetoanalyze/cpp/errors/vector/access_field_later.cpp, getWithCopy, 2, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure getWithCopy()] codetoanalyze/cpp/errors/vector/access_field_later.cpp, getWithCopyPtr, 2, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure getWithCopyPtr()] @@ -212,7 +212,7 @@ codetoanalyze/cpp/errors/vector/empty_access.cpp, assign_empty, 4, EMPTY_VECTOR_ codetoanalyze/cpp/errors/vector/empty_access.cpp, clear_empty, 3, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure clear_empty()] codetoanalyze/cpp/errors/vector/empty_access.cpp, copy_empty, 3, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure copy_empty()] codetoanalyze/cpp/errors/vector/empty_access.cpp, empty_check_access_empty, 2, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure empty_check_access_empty(),Taking true branch] -codetoanalyze/cpp/errors/vector/empty_access.cpp, getter_empty, 0, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure getter_empty(),start of procedure get_vector(),Skipping ~vector: function or method not found,return from a call to get_vector] +codetoanalyze/cpp/errors/vector/empty_access.cpp, getter_empty, 0, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure getter_empty(),start of procedure get_vector(),Skipping ~vector: method has no implementation,return from a call to get_vector] codetoanalyze/cpp/errors/vector/empty_access.cpp, size_check0_empty, 2, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure size_check0_empty(),Taking true branch] codetoanalyze/cpp/errors/vector/empty_access.cpp, vector_as_param_by_value_empty, 2, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure vector_as_param_by_value_empty(),start of procedure vector_param_by_value_access(),return from a call to vector_param_by_value_access] codetoanalyze/cpp/errors/vector/empty_access.cpp, vector_as_param_clear, 3, EMPTY_VECTOR_ACCESS, ERROR, [start of procedure vector_as_param_clear(),start of procedure vector_param_clear(),return from a call to vector_param_clear] @@ -271,9 +271,9 @@ codetoanalyze/cpp/shared/constructors/constructor_with_body.cpp, constructor_wit codetoanalyze/cpp/shared/constructors/copy_array_field.cpp, copy_array_field::npe, 4, NULL_DEREFERENCE, ERROR, [start of procedure copy_array_field::npe(),start of procedure X,return from a call to copy_array_field::X_X,start of procedure X,return from a call to copy_array_field::X_X] codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::copyX_div0, 4, DIVIDE_BY_ZERO, ERROR, [start of procedure copy_move_constructor::copyX_div0(),start of procedure X,return from a call to copy_move_constructor::X_X,start of procedure X,return from a call to copy_move_constructor::X_X] codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::copyY_div0, 4, DIVIDE_BY_ZERO, ERROR, [start of procedure copy_move_constructor::copyY_div0(),start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y] -codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveX_div0, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure copy_move_constructor::moveX_div0(),start of procedure copy_move_constructor::getX(),start of procedure X,return from a call to copy_move_constructor::X_X,start of procedure X,return from a call to copy_move_constructor::X_X,Skipping ~X: function or method not found,return from a call to copy_move_constructor::getX] -codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_div0, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure copy_move_constructor::moveY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y,Skipping ~Y: function or method not found,return from a call to copy_move_constructor::getY] -codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_moveY_copyY_div0, 3, DIVIDE_BY_ZERO, ERROR, [start of procedure copy_move_constructor::moveY_moveY_copyY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y,Skipping ~Y: function or method not found,return from a call to copy_move_constructor::getY,start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y] +codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveX_div0, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure copy_move_constructor::moveX_div0(),start of procedure copy_move_constructor::getX(),start of procedure X,return from a call to copy_move_constructor::X_X,start of procedure X,return from a call to copy_move_constructor::X_X,Skipping ~X: method has no implementation,return from a call to copy_move_constructor::getX] +codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_div0, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure copy_move_constructor::moveY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y,Skipping ~Y: method has no implementation,return from a call to copy_move_constructor::getY] +codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_moveY_copyY_div0, 3, DIVIDE_BY_ZERO, ERROR, [start of procedure copy_move_constructor::moveY_moveY_copyY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y,Skipping ~Y: method has no implementation,return from a call to copy_move_constructor::getY,start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y] codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::assign_temp_div0, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure temp_object::assign_temp_div0(),start of procedure X,return from a call to temp_object::X_X,start of procedure X,return from a call to temp_object::X_X,start of procedure div] codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::getX_field_div0, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure temp_object::getX_field_div0(),start of procedure temp_object::getX(),start of procedure X,return from a call to temp_object::X_X,start of procedure X,return from a call to temp_object::X_X,return from a call to temp_object::getX,start of procedure temp_object::div()] codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::getX_method_div0, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure temp_object::getX_method_div0(),start of procedure temp_object::getX(),start of procedure X,return from a call to temp_object::X_X,start of procedure X,return from a call to temp_object::X_X,return from a call to temp_object::getX,start of procedure div] @@ -358,8 +358,8 @@ codetoanalyze/cpp/shared/templates/method.cpp, method::div0_getter_templ2, 4, DI codetoanalyze/cpp/shared/types/const.cpp, call_const_params_with_pointer1, 2, NULL_DEREFERENCE, ERROR, [start of procedure call_const_params_with_pointer1(),start of procedure const_in_param1()] codetoanalyze/cpp/shared/types/const.cpp, call_const_params_with_pointer2, 2, NULL_DEREFERENCE, ERROR, [start of procedure call_const_params_with_pointer2(),start of procedure const_in_param2()] codetoanalyze/cpp/shared/types/const.cpp, call_const_params_with_pointer3, 2, NULL_DEREFERENCE, ERROR, [start of procedure call_const_params_with_pointer3(),start of procedure const_in_param2()] -codetoanalyze/cpp/shared/types/inheritance_casts.cpp, inheritance_casts::div0_A, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure inheritance_casts::div0_A(),start of procedure inheritance_casts::getA(),start of procedure A,return from a call to inheritance_casts::A_A,start of procedure A,return from a call to inheritance_casts::A_A,Skipping ~A: function or method not found,return from a call to inheritance_casts::getA,start of procedure inheritance_casts::div()] -codetoanalyze/cpp/shared/types/inheritance_casts.cpp, inheritance_casts::div0_B, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure inheritance_casts::div0_B(),start of procedure inheritance_casts::getB(),start of procedure B,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::B_B,start of procedure B,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::B_B,Skipping ~B: function or method not found,return from a call to inheritance_casts::getB,start of procedure inheritance_casts::div()] +codetoanalyze/cpp/shared/types/inheritance_casts.cpp, inheritance_casts::div0_A, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure inheritance_casts::div0_A(),start of procedure inheritance_casts::getA(),start of procedure A,return from a call to inheritance_casts::A_A,start of procedure A,return from a call to inheritance_casts::A_A,Skipping ~A: method has no implementation,return from a call to inheritance_casts::getA,start of procedure inheritance_casts::div()] +codetoanalyze/cpp/shared/types/inheritance_casts.cpp, inheritance_casts::div0_B, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure inheritance_casts::div0_B(),start of procedure inheritance_casts::getB(),start of procedure B,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::B_B,start of procedure B,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::B_B,Skipping ~B: method has no implementation,return from a call to inheritance_casts::getB,start of procedure inheritance_casts::div()] codetoanalyze/cpp/shared/types/inheritance_field.cpp, div0_b1, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure div0_b1()] codetoanalyze/cpp/shared/types/inheritance_field.cpp, div0_b1_s, 3, DIVIDE_BY_ZERO, ERROR, [start of procedure div0_b1_s()] codetoanalyze/cpp/shared/types/inheritance_field.cpp, div0_b2, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure div0_b2()] @@ -372,9 +372,9 @@ codetoanalyze/cpp/shared/types/operator_overload.cpp, div0_inheritted_op, 2, DIV codetoanalyze/cpp/shared/types/operator_overload.cpp, div0_method, 3, DIVIDE_BY_ZERO, ERROR, [start of procedure div0_method(),start of procedure operator[],return from a call to X_operator[]] codetoanalyze/cpp/shared/types/operator_overload.cpp, div0_method_op, 3, DIVIDE_BY_ZERO, ERROR, [start of procedure div0_method_op(),start of procedure operator[],return from a call to X_operator[]] codetoanalyze/cpp/shared/types/operator_overload.cpp, div0_method_op_ptr, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure div0_method_op_ptr(),start of procedure operator[],return from a call to X_operator[]] -codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_div0, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure return_struct::get_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: function or method not found,return from a call to return_struct::get,start of procedure X,return from a call to return_struct::X_X] -codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_field_div0, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure return_struct::get_field_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: function or method not found,return from a call to return_struct::get,Skipping skip: function or method not found,start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: function or method not found,return from a call to return_struct::get] -codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_method_div0, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure return_struct::get_method_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: function or method not found,return from a call to return_struct::get,start of procedure div] +codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_div0, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure return_struct::get_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: method has no implementation,return from a call to return_struct::get,start of procedure X,return from a call to return_struct::X_X] +codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_field_div0, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure return_struct::get_field_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: method has no implementation,return from a call to return_struct::get,Skipping skip: method has no implementation,start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: method has no implementation,return from a call to return_struct::get] +codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_method_div0, 0, DIVIDE_BY_ZERO, ERROR, [start of procedure return_struct::get_method_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: method has no implementation,return from a call to return_struct::get,start of procedure div] codetoanalyze/cpp/shared/types/struct_forward_declare.cpp, struct_forward_declare::X_Y_div0, 7, DIVIDE_BY_ZERO, ERROR, [start of procedure struct_forward_declare::X_Y_div0(),start of procedure X,return from a call to struct_forward_declare::X_X,Taking false branch,start of procedure getF,return from a call to struct_forward_declare::X_getF] codetoanalyze/cpp/shared/types/struct_forward_declare.cpp, struct_forward_declare::X_div0, 3, DIVIDE_BY_ZERO, ERROR, [start of procedure struct_forward_declare::X_div0(),start of procedure X,return from a call to struct_forward_declare::X_X,start of procedure getF,return from a call to struct_forward_declare::X_getF] codetoanalyze/cpp/shared/types/struct_forward_declare.cpp, struct_forward_declare::X_ptr_div0, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure struct_forward_declare::X_ptr_div0(),start of procedure getF,return from a call to struct_forward_declare::X_getF] diff --git a/infer/tests/codetoanalyze/objc/errors/issues.exp b/infer/tests/codetoanalyze/objc/errors/issues.exp index 2d9976013..6d2b1cdf2 100644 --- a/infer/tests/codetoanalyze/objc/errors/issues.exp +++ b/infer/tests/codetoanalyze/objc/errors/issues.exp @@ -4,9 +4,9 @@ codetoanalyze/objc/errors/global_const/global_const.m, SimpleRoot_doSomethingOkW codetoanalyze/objc/errors/initialization/compound_literal.c, init_with_compound_literal, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure init_with_compound_literal()] codetoanalyze/objc/errors/memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSV_foo, 13, RETAIN_CYCLE, ERROR, [start of procedure foo,Executing synthesized setter setHandler:] codetoanalyze/objc/errors/npe/null_returned_by_method.m, NullReturnedByMethodA_test1, 1, NULL_DEREFERENCE, ERROR, [start of procedure test1,start of procedure test,return from a call to NullReturnedByMethodA_test] -codetoanalyze/objc/errors/procdescs/main.c, ProcdescMain, 3, MEMORY_LEAK, ERROR, [start of procedure ProcdescMain(),Skipping plusX:andY:: function or method not found] -codetoanalyze/objc/errors/procdescs/main.c, call_nslog, 3, MEMORY_LEAK, ERROR, [start of procedure call_nslog(),Skipping NSLog(): function or method not found] -codetoanalyze/objc/errors/property/main.c, property_main, 3, MEMORY_LEAK, ERROR, [start of procedure property_main(),Skipping aProperty: function or method not found] +codetoanalyze/objc/errors/procdescs/main.c, ProcdescMain, 3, MEMORY_LEAK, ERROR, [start of procedure ProcdescMain(),Skipping plusX:andY:: method has no implementation] +codetoanalyze/objc/errors/procdescs/main.c, call_nslog, 3, MEMORY_LEAK, ERROR, [start of procedure call_nslog(),Skipping NSLog(): method has no implementation] +codetoanalyze/objc/errors/property/main.c, property_main, 3, MEMORY_LEAK, ERROR, [start of procedure property_main(),Skipping aProperty: method has no implementation] codetoanalyze/objc/errors/warnings/ParameterNotNullableExample.m, FBAudioRecorder_FBAudioInputCallbackChain:, 2, NULL_DEREFERENCE, ERROR, [start of procedure FBAudioInputCallbackChain:,Executing synthesized getter recorder Message recordState with receiver nil returns nil.] codetoanalyze/objc/errors/warnings/ParameterNotNullableExample.m, FBAudioRecorder_FBAudioInputCallbackChain:, 2, PARAMETER_NOT_NULL_CHECKED, WARNING, [start of procedure FBAudioInputCallbackChain:,Message recorder with receiver nil returns nil. Message recordState with receiver nil returns nil.] codetoanalyze/objc/errors/warnings/ParameterNotNullableExample.m, FBAudioRecorder_FBAudioInputCallbackField, 2, NULL_DEREFERENCE, ERROR, [start of procedure FBAudioInputCallbackField,Message recordState with receiver nil returns nil.] @@ -19,7 +19,7 @@ codetoanalyze/objc/shared/block/BlockVar.m, BlockVar_capturedNullDeref, 5, NULL_ codetoanalyze/objc/shared/block/BlockVar.m, BlockVar_navigateToURLInBackground, 8, NULL_DEREFERENCE, ERROR, [start of procedure navigateToURLInBackground,start of procedure block,start of procedure test,return from a call to BlockVar_test,return from a call to objc_blockBlockVar_navigateToURLInBackground_1,Taking true branch] codetoanalyze/objc/shared/block/block.m, main1, 31, DIVIDE_BY_ZERO, ERROR, [start of procedure main1(),start of procedure block,start of procedure block,return from a call to objc_blockobjc_blockmain1_2_3,return from a call to objc_blockmain1_2,start of procedure block,return from a call to objc_blockmain1_1] codetoanalyze/objc/shared/block/block_no_args.m, My_manager_m, 10, NULL_DEREFERENCE, ERROR, [start of procedure m,start of procedure block,return from a call to objc_blockMy_manager_m_1,Taking true branch] -codetoanalyze/objc/shared/category_procdesc/main.c, CategoryProcdescMain, 3, MEMORY_LEAK, ERROR, [start of procedure CategoryProcdescMain(),Skipping performDaysWork: function or method not found] +codetoanalyze/objc/shared/category_procdesc/main.c, CategoryProcdescMain, 3, MEMORY_LEAK, ERROR, [start of procedure CategoryProcdescMain(),Skipping performDaysWork: method has no implementation] codetoanalyze/objc/shared/field_superclass/SuperExample.m, ASuper_init, 2, NULL_DEREFERENCE, ERROR, [start of procedure init,start of procedure init,return from a call to BSuper_init] codetoanalyze/objc/errors/blocks_in_heap/BlockInHeap.m, block_in_heap_executed_after_bi_abduction_ok_test, 3, NULL_DEREFERENCE, ERROR, [start of procedure block_in_heap_executed_after_bi_abduction_ok_test(),start of procedure block_in_heap_executed_after_bi_abduction_ok_no_retain_cycle(),start of procedure assign_block_to_ivar,Executing synthesized setter setHandler:,return from a call to BlockInHeap_assign_block_to_ivar,Executing synthesized getter handler,start of procedure block,return from a call to objc_blockBlockInHeap_assign_block_to_ivar_1,return from a call to block_in_heap_executed_after_bi_abduction_ok_no_retain_cycle,Taking true branch] codetoanalyze/objc/errors/field_superclass/SubtypingExample.m, Employee_initWithName:andAge:andEducation:, 3, NULL_TEST_AFTER_DEREFERENCE, WARNING, [start of procedure initWithName:andAge:andEducation:,start of procedure initWithName:andAge:,return from a call to Person_initWithName:andAge:,Taking false branch] @@ -37,14 +37,14 @@ codetoanalyze/objc/errors/memory_leaks_benchmark/RetainCycleDeduplication.m, CVi codetoanalyze/objc/errors/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, MyCustomViewController_loadViewBad, 3, RETAIN_CYCLE, ERROR, [start of procedure loadViewBad,Executing synthesized setter setView:,Executing synthesized setter setStrong_delegate:] codetoanalyze/objc/errors/memory_leaks_benchmark/retain_cycle.m, strongcycle, 6, RETAIN_CYCLE, ERROR, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] codetoanalyze/objc/errors/memory_leaks_benchmark/retain_cycle2.m, strongcycle2, 4, RETAIN_CYCLE, ERROR, [start of procedure strongcycle2(),start of procedure init,return from a call to Parent_init,start of procedure init,return from a call to Child_init,start of procedure setChild:,return from a call to Parent_setChild:,start of procedure setParent:,return from a call to Child_setParent:] -codetoanalyze/objc/errors/npe/UpdateDict.m, add_nil_in_dict, 10, NULL_DEREFERENCE, ERROR, [start of procedure add_nil_in_dict(),Skipping dictionaryWithObjectsAndKeys:: function or method not found] +codetoanalyze/objc/errors/npe/UpdateDict.m, add_nil_in_dict, 10, NULL_DEREFERENCE, ERROR, [start of procedure add_nil_in_dict(),Skipping dictionaryWithObjectsAndKeys:: method has no implementation] codetoanalyze/objc/errors/npe/UpdateDict.m, add_nil_to_array, 4, NULL_DEREFERENCE, ERROR, [start of procedure add_nil_to_array()] codetoanalyze/objc/errors/npe/UpdateDict.m, insert_nil_in_array, 4, NULL_DEREFERENCE, ERROR, [start of procedure insert_nil_in_array()] codetoanalyze/objc/errors/npe/UpdateDict.m, nullable_NSDictionary_objectForKey, 4, NULL_DEREFERENCE, ERROR, [start of procedure nullable_NSDictionary_objectForKey(),Taking true branch,Condition is true,Taking true branch] codetoanalyze/objc/errors/npe/UpdateDict.m, nullable_NSDictionary_objectForKeyedSubscript, 5, NULL_DEREFERENCE, ERROR, [start of procedure nullable_NSDictionary_objectForKeyedSubscript(),Taking true branch,Condition is true,Taking true branch] codetoanalyze/objc/errors/npe/UpdateDict.m, nullable_NSMapTable_objectForKey, 4, NULL_DEREFERENCE, ERROR, [start of procedure nullable_NSMapTable_objectForKey(),Taking true branch,Condition is true,Taking true branch] codetoanalyze/objc/errors/npe/UpdateDict.m, update_array_with_null, 5, NULL_DEREFERENCE, ERROR, [start of procedure update_array_with_null()] -codetoanalyze/objc/errors/npe/UpdateDict.m, update_dict_with_key_null, 10, NULL_DEREFERENCE, ERROR, [start of procedure update_dict_with_key_null(),Skipping dictionaryWithObjectsAndKeys:: function or method not found] +codetoanalyze/objc/errors/npe/UpdateDict.m, update_dict_with_key_null, 10, NULL_DEREFERENCE, ERROR, [start of procedure update_dict_with_key_null(),Skipping dictionaryWithObjectsAndKeys:: method has no implementation] codetoanalyze/objc/errors/npe/WeakCapturedVarsNPE.m, objc_blockWeakCapturedA_strongSelfNoCheck_2, 2, NULL_DEREFERENCE, ERROR, [start of procedure block] codetoanalyze/objc/errors/npe/nil_in_array_literal.m, Arr_nilInArrayLiteral0, 4, NULL_DEREFERENCE, ERROR, [start of procedure nilInArrayLiteral0] codetoanalyze/objc/errors/npe/nil_in_array_literal.m, Arr_nilInArrayLiteral1, 4, NULL_DEREFERENCE, ERROR, [start of procedure nilInArrayLiteral1] @@ -65,7 +65,7 @@ codetoanalyze/objc/errors/npe/npe_self.m, CSelf_test, 3, NULL_DEREFERENCE, ERROR codetoanalyze/objc/errors/npe/nullable.m, derefNullableParamDirect, 0, NULL_DEREFERENCE, ERROR, [start of procedure derefNullableParamDirect()] codetoanalyze/objc/errors/npe/nullable.m, derefNullableParamIndirect, 2, NULL_DEREFERENCE, ERROR, [start of procedure derefNullableParamIndirect()] codetoanalyze/objc/errors/npe/nullable.m, parameter_nullable_bug, 5, NULL_DEREFERENCE, ERROR, [start of procedure parameter_nullable_bug()] -codetoanalyze/objc/errors/property/ExplicitIvarName.m, ExplicitIvarNameA_testDefaultName, 7, NULL_DEREFERENCE, ERROR, [start of procedure testDefaultName,Skipping setY:: function or method not found,Taking true branch] +codetoanalyze/objc/errors/property/ExplicitIvarName.m, ExplicitIvarNameA_testDefaultName, 7, NULL_DEREFERENCE, ERROR, [start of procedure testDefaultName,Skipping setY:: method has no implementation,Taking true branch] codetoanalyze/objc/errors/property/ExplicitIvarName.m, ExplicitIvarNameA_testExplicit, 6, NULL_DEREFERENCE, ERROR, [start of procedure testExplicit,Taking true branch] codetoanalyze/objc/errors/subtyping/KindOfClassExample.m, shouldThrowDivideByZero1, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure shouldThrowDivideByZero1(),start of procedure init,return from a call to Base_init,start of procedure returnsZero1:,Taking true branch,return from a call to Base_returnsZero1:] codetoanalyze/objc/errors/subtyping/KindOfClassExample.m, shouldThrowDivideByZero2, 2, DIVIDE_BY_ZERO, ERROR, [start of procedure shouldThrowDivideByZero2(),start of procedure init,return from a call to Base_init,start of procedure returnsZero2(),Taking false branch,return from a call to returnsZero2] @@ -73,7 +73,7 @@ codetoanalyze/objc/errors/subtyping/KindOfClassExample.m, shouldThrowDivideByZer codetoanalyze/objc/errors/variadic_methods/premature_nil_termination.m, PrematureNilTermA_nilInArrayWithObjects, 5, PREMATURE_NIL_TERMINATION_ARGUMENT, ERROR, [start of procedure nilInArrayWithObjects] codetoanalyze/objc/errors/memory_leaks_benchmark/CoreVideoExample.m, CoreVideoExample_cvpixelbuffer_not_released_leak, 1, MEMORY_LEAK, ERROR, [start of procedure cvpixelbuffer_not_released_leak] codetoanalyze/objc/errors/memory_leaks_benchmark/NSData_models_tests.m, NSData_models_tests_macForIV:, 2, MEMORY_LEAK, ERROR, [start of procedure macForIV:] -codetoanalyze/objc/errors/memory_leaks_benchmark/NSString_models_tests.m, StringInitA_hexStringValue, 11, MEMORY_LEAK, ERROR, [start of procedure hexStringValue,Skipping CFStringCreateWithBytesNoCopy(): function or method not found,Taking false branch] +codetoanalyze/objc/errors/memory_leaks_benchmark/NSString_models_tests.m, StringInitA_hexStringValue, 11, MEMORY_LEAK, ERROR, [start of procedure hexStringValue,Skipping CFStringCreateWithBytesNoCopy(): method has no implementation,Taking false branch] codetoanalyze/objc/errors/memory_leaks_benchmark/RetainCycleLength3.m, strongcycle, 6, RETAIN_CYCLE, ERROR, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setC:,Executing synthesized setter setA:] codetoanalyze/objc/errors/npe/Fraction.m, test_virtual_call, 7, NULL_DEREFERENCE, ERROR, [start of procedure test_virtual_call(),start of procedure setNumerator:,return from a call to Fraction_setNumerator:,start of procedure getNumerator,return from a call to Fraction_getNumerator,Taking true branch] codetoanalyze/objc/errors/npe/Npe_with_equal_names.m, EqualNamesTest, 3, NULL_DEREFERENCE, ERROR, [start of procedure EqualNamesTest(),start of procedure meth,return from a call to EqualNamesA_meth] @@ -84,21 +84,21 @@ codetoanalyze/objc/errors/npe/block.m, BlockA_foo4:, 6, NULL_DEREFERENCE, ERROR, codetoanalyze/objc/errors/npe/block.m, BlockA_foo7, 2, IVAR_NOT_NULL_CHECKED, WARNING, [start of procedure foo7] codetoanalyze/objc/errors/npe/ivar_blocks.m, MyClass_ivar_npe, 1, IVAR_NOT_NULL_CHECKED, WARNING, [start of procedure ivar_npe] codetoanalyze/objc/errors/npe/skip_method_with_nil_object.m, SkipMethodNilA_testBug:, 6, PARAMETER_NOT_NULL_CHECKED, WARNING, [start of procedure testBug:,Message get_a with receiver nil returns nil.,Message skip_method with receiver nil returns nil.,Taking false branch] -codetoanalyze/objc/errors/property/main.c, property_main, 3, MEMORY_LEAK, ERROR, [start of procedure property_main(),Skipping aProperty: function or method not found] -codetoanalyze/objc/errors/resource_leaks/Dispatch_sources.m, ProcessContentsOfFile, 35, RESOURCE_LEAK, ERROR, [start of procedure ProcessContentsOfFile(),Taking false branch,Skipping dispatch_get_global_queue(): function or method not found,Skipping dispatch_source_create(): function or method not found,Taking false branch] -codetoanalyze/objc/errors/resource_leaks/Dispatch_sources.m, objc_blockProcessContentsOfFile_2, 6, MEMORY_LEAK, ERROR, [start of procedure block,Skipping dispatch_source_get_data(): function or method not found,Taking true branch,Skipping MyProcessFileData(): function or method not found] -codetoanalyze/objc/errors/resource_leaks/ResourceLeakExample.m, NSFileHandle_fileHandleForLoggingAtPath:mode:, 9, RESOURCE_LEAK, ERROR, [start of procedure fileHandleForLoggingAtPath:mode:,Taking true branch,Skipping fileSystemRepresentation: function or method not found,Taking false branch,Taking true branch,Skipping autorelease: no implementation found for method declared in Objective-C protocol] +codetoanalyze/objc/errors/property/main.c, property_main, 3, MEMORY_LEAK, ERROR, [start of procedure property_main(),Skipping aProperty: method has no implementation] +codetoanalyze/objc/errors/resource_leaks/Dispatch_sources.m, ProcessContentsOfFile, 35, RESOURCE_LEAK, ERROR, [start of procedure ProcessContentsOfFile(),Taking false branch,Skipping dispatch_get_global_queue(): method has no implementation,Skipping dispatch_source_create(): method has no implementation,Taking false branch] +codetoanalyze/objc/errors/resource_leaks/Dispatch_sources.m, objc_blockProcessContentsOfFile_2, 6, MEMORY_LEAK, ERROR, [start of procedure block,Skipping dispatch_source_get_data(): method has no implementation,Taking true branch,Skipping MyProcessFileData(): method has no implementation] +codetoanalyze/objc/errors/resource_leaks/ResourceLeakExample.m, NSFileHandle_fileHandleForLoggingAtPath:mode:, 9, RESOURCE_LEAK, ERROR, [start of procedure fileHandleForLoggingAtPath:mode:,Taking true branch,Skipping fileSystemRepresentation: method has no implementation,Taking false branch,Taking true branch,Skipping autorelease: no implementation found for method declared in Objective-C protocol] codetoanalyze/objc/shared/annotations/nonnull_annotations.m, A_test1:, 2, PARAMETER_NOT_NULL_CHECKED, WARNING, [start of procedure test1:,Message child with receiver nil returns nil.] codetoanalyze/objc/shared/annotations/nonnull_annotations.m, A_test3:, 1, PARAMETER_NOT_NULL_CHECKED, WARNING, [start of procedure test3:] -codetoanalyze/objc/shared/annotations/nullable_annotations.m, User_otherUserName, 2, NULL_DEREFERENCE, ERROR, [start of procedure otherUserName,Skipping otherUser: function or method not found] -codetoanalyze/objc/shared/annotations/nullable_annotations.m, npe_property_nullable, 3, NULL_DEREFERENCE, ERROR, [start of procedure npe_property_nullable(),Skipping child: function or method not found] -codetoanalyze/objc/shared/annotations/nullable_annotations_fields.m, A_nullable_field, 3, NULL_DEREFERENCE, ERROR, [start of procedure nullable_field,Skipping getA(): function or method not found] +codetoanalyze/objc/shared/annotations/nullable_annotations.m, User_otherUserName, 2, NULL_DEREFERENCE, ERROR, [start of procedure otherUserName,Skipping otherUser: method has no implementation] +codetoanalyze/objc/shared/annotations/nullable_annotations.m, npe_property_nullable, 3, NULL_DEREFERENCE, ERROR, [start of procedure npe_property_nullable(),Skipping child: method has no implementation] +codetoanalyze/objc/shared/annotations/nullable_annotations_fields.m, A_nullable_field, 3, NULL_DEREFERENCE, ERROR, [start of procedure nullable_field,Skipping getA(): method has no implementation] codetoanalyze/objc/shared/block/dispatch.m, DispatchA_dispatch_a_block_variable_from_macro_delivers_initialised_object, 3, DIVIDE_BY_ZERO, ERROR, [start of procedure dispatch_a_block_variable_from_macro_delivers_initialised_object,start of procedure dispatch_a_block_variable_from_macro,Skipping _dispatch_once(): empty list of specs,return from a call to DispatchA_dispatch_a_block_variable_from_macro] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_blockCapturedVarLeak, 6, MEMORY_LEAK, ERROR, [start of procedure blockCapturedVarLeak,start of procedure block,return from a call to objc_blockMemoryLeakExample_blockCapturedVarLeak_1] -codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_createCloseCrossGlyph:, 2, MEMORY_LEAK, ERROR, [start of procedure createCloseCrossGlyph:,Skipping CGRectGetHeight(): function or method not found] +codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_createCloseCrossGlyph:, 2, MEMORY_LEAK, ERROR, [start of procedure createCloseCrossGlyph:,Skipping CGRectGetHeight(): method has no implementation] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_measureFrameSizeForText, 1, MEMORY_LEAK, ERROR, [start of procedure measureFrameSizeForText] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_regularLeak, 3, MEMORY_LEAK, ERROR, [start of procedure regularLeak] -codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_test, 3, MEMORY_LEAK, ERROR, [start of procedure test,Skipping bounds: function or method not found,Skipping setShadowPath:: function or method not found] +codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_test, 3, MEMORY_LEAK, ERROR, [start of procedure test,Skipping bounds: method has no implementation,Skipping setShadowPath:: method has no implementation] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_test1:, 1, MEMORY_LEAK, ERROR, [start of procedure test1:] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_test2:, 1, MEMORY_LEAK, ERROR, [start of procedure test2:] codetoanalyze/objc/shared/npe/Available_expr.m, Available_expr_test_no_bug, 3, NULL_DEREFERENCE, ERROR, [start of procedure test_no_bug,Taking true branch]