From d366bb970b3d821c5f1b75bf53ad60bc5f6bab20 Mon Sep 17 00:00:00 2001 From: Dulma Rodriguez Date: Thu, 14 Apr 2016 03:08:29 -0700 Subject: [PATCH] Create the procdescs for frontend checks only when needed Reviewed By: sblackshear, ddino Differential Revision: D3173939 fb-gh-sync-id: 236898b fbshipit-source-id: 236898b --- infer/src/clang/cFrontend_decl.ml | 3 +- infer/src/clang/cFrontend_errors.ml | 62 ++- infer/src/clang/cFrontend_errors.mli | 2 +- infer/src/clang/cLocation.ml | 23 +- infer/src/clang/cMethod_trans.ml | 27 +- infer/src/clang/cMethod_trans.mli | 3 +- .../errors/category_procdesc/EOCPerson.dot | 27 +- .../errors/field_superclass/SuperExample.dot | 52 +-- .../memory_leaks_benchmark/ArcExample.dot | 35 +- .../AutoreleaseExample.dot | 4 +- .../MemoryLeakExample.dot | 251 +++++------ .../RetainReleaseExample.dot | 23 +- .../RetainReleaseExample2.dot | 117 +++-- .../TollBridgeExample.dot | 73 ++- .../memory_leaks_benchmark/arc_methods.dot | 55 +-- .../errors/npe/Nonnull_attribute_example.dot | 56 +-- .../objc/errors/npe/npe_malloc.dot | 23 +- .../frontend/assertions/NSAssert_example.dot | 421 +++++++++--------- .../objc/frontend/block/BlockVar.dot | 187 ++++---- .../objc/frontend/block/block-it.dot | 211 +++++---- .../objc/frontend/block/block_no_args.dot | 63 ++- .../objc/frontend/block/block_release.dot | 75 ++-- .../objc/frontend/block/dispatch.dot | 99 ++-- .../objc/frontend/block/dispatch_examples.dot | 211 +++++---- .../objc/frontend/block/retain_cycle.dot | 74 ++- .../objc/frontend/block/static.dot | 111 +++-- .../objc/frontend/boxing/Boxing.dot | 95 ++-- .../ConditionalOperation.dot | 49 +- .../frontend/exceptions/ExceptionExample.dot | 47 +- .../fast_enumeration/Fast_enumeration.dot | 89 ++-- .../predefined_expr/PredefinedExprExample.dot | 37 +- .../frontend/property/PropertyAttributes.dot | 4 +- .../property/PropertyCustomAccessor.dot | 9 - .../frontend/property/PropertyImplSetter.dot | 17 +- .../frontend/property/Property_getter.dot | 17 +- .../objc/frontend/property/aclass.dot | 9 - .../frontend/property_in_protocol/Test.dot | 9 - .../objc/frontend/protocol/protocol.dot | 42 +- .../objc/frontend/returnstmt/void_return.dot | 65 ++- .../objc/frontend/self_static/Self.dot | 182 ++++---- .../objc/frontend/self_static/static.dot | 57 ++- .../objc/frontend/subclass/MyClass.dot | 17 +- .../objc/frontend/subclass/MySubClass.dot | 21 +- .../objc/frontend/types/attributes.dot | 41 +- .../objc/frontend/types/testloop.dot | 17 +- .../objc/frontend/types/void_call.dot | 89 ++-- .../objc/frontend/vardecl/aclass.dot | 17 +- .../objc/frontend/vardecl/aclass_2.dot | 17 +- .../endtoend/objc/AssignPointerTest.java | 2 +- .../endtoend/objc/RegisteredObserver3.java | 9 +- .../endtoend/objc/StrongDelegateTest.java | 13 +- 51 files changed, 1462 insertions(+), 1797 deletions(-) diff --git a/infer/src/clang/cFrontend_decl.ml b/infer/src/clang/cFrontend_decl.ml index 0281bd0ae..a0a98e293 100644 --- a/infer/src/clang/cFrontend_decl.ml +++ b/infer/src/clang/cFrontend_decl.ml @@ -131,7 +131,8 @@ struct let open Clang_ast_t in (* Run the frontend checkers on this declaration *) if decl_trans_context = `DeclTraversal then - CFrontend_errors.run_frontend_checkers_on_decl tenv cg cfg dec; + CFrontend_errors.run_frontend_checkers_on_decl cfg cg dec; + (* each procedure has different scope: start names from id 0 *) Ident.NameGenerator.reset (); diff --git a/infer/src/clang/cFrontend_errors.ml b/infer/src/clang/cFrontend_errors.ml index d9c6f2b54..8eda22123 100644 --- a/infer/src/clang/cFrontend_errors.ml +++ b/infer/src/clang/cFrontend_errors.ml @@ -61,25 +61,32 @@ let log_frontend_warning pdesc warn_desc = 1. f a particular way to apply a checker, it's a partial function 2. context 3. the list of checkers to be applied *) -let invoke_set_of_checkers f pdesc checkers = +let invoke_set_of_checkers f cfg cg pdesc_opt checkers = IList.iter (fun checker -> match f checker with - | Some warning_desc -> log_frontend_warning pdesc warning_desc + | Some warning_desc -> + let pdesc = + match pdesc_opt with + | Some pdesc -> pdesc + | None -> + let loc = warning_desc.CFrontend_checkers.loc in + CMethod_trans.get_method_for_frontend_checks cfg cg loc in + log_frontend_warning pdesc warning_desc | None -> ()) checkers (* Call all checkers on properties of class c *) -let rec check_for_property_errors cfg cg tenv pdesc decl_list = +let rec check_for_property_errors cfg cg decl_list = let open Clang_ast_t in let do_one_property decl_info pname_info pdi = let call_property_checker = checkers_for_property decl_info pname_info pdi in - invoke_set_of_checkers call_property_checker pdesc property_checkers_list in + invoke_set_of_checkers call_property_checker cfg cg None property_checkers_list in match decl_list with | [] -> () | ObjCPropertyDecl (decl_info, pname_info, pdi) :: rest -> do_one_property decl_info pname_info pdi; - check_for_property_errors cfg cg tenv pdesc rest + check_for_property_errors cfg cg rest | _ :: rest -> - check_for_property_errors cfg cg tenv pdesc rest + check_for_property_errors cfg cg rest let get_categories_decls decl_ref = match Ast_utils.get_decl_opt_with_decl_ref decl_ref with @@ -91,48 +98,39 @@ let run_frontend_checkers_on_stmt trans_state instr = let open Clang_ast_t in let context = trans_state.CTrans_utils.context in let pdesc = CContext.get_procdesc context in + let cg = context.CContext.cg in + let cfg = context.CContext.cfg in match instr with | ObjCIvarRefExpr(stmt_info, _, _, obj_c_ivar_ref_expr_info) -> let dr_name = obj_c_ivar_ref_expr_info.Clang_ast_t.ovrei_decl_ref.Clang_ast_t.dr_name in let call_checker_for_ivar = checkers_for_ivar context stmt_info dr_name in - invoke_set_of_checkers call_checker_for_ivar pdesc ivar_access_checker_list + invoke_set_of_checkers call_checker_for_ivar cfg cg (Some pdesc) ivar_access_checker_list | BlockExpr(stmt_info, _ , _, Clang_ast_t.BlockDecl (_, block_decl_info)) -> let captured_block_vars = block_decl_info.Clang_ast_t.bdi_captured_variables in let captured_vars = CVar_decl.captured_vars_from_block_info context captured_block_vars in let call_captured_vars_checker = checkers_for_capture_vars stmt_info captured_vars in - invoke_set_of_checkers call_captured_vars_checker pdesc captured_vars_checker_list + let pdesc_opt = Some pdesc in + invoke_set_of_checkers call_captured_vars_checker cfg cg pdesc_opt captured_vars_checker_list | _ -> () -let rec run_frontend_checkers_on_decl tenv cg cfg dec = - let pdesc_checker curr_class = - let name = CContext.get_curr_class_name curr_class in - let di = Clang_ast_proj.get_decl_tuple dec in - CMethod_trans.get_method_for_frontend_checks cfg cg tenv name di in +let rec run_frontend_checkers_on_decl cfg cg dec = let open Clang_ast_t in match dec with - | ObjCCategoryImplDecl(_, name_info, decl_list, _, ocidi) -> - let name = Ast_utils.get_qualified_name name_info in - let curr_class = ObjcCategory_decl.get_curr_class_from_category_impl name ocidi in - let pdesc = pdesc_checker curr_class in + | ObjCCategoryImplDecl(_, _, decl_list, _, ocidi) -> let decls = (get_categories_decls ocidi.Clang_ast_t.ocidi_category_decl) @ decl_list in - check_for_property_errors cfg cg tenv pdesc decls; - IList.iter (run_frontend_checkers_on_decl tenv cg cfg) decl_list + check_for_property_errors cfg cg decls; + IList.iter (run_frontend_checkers_on_decl cfg cg) decl_list | ObjCImplementationDecl(decl_info, _, decl_list, _, idi) -> - let curr_class = ObjcInterface_decl.get_curr_class_impl idi in - let pdesc = pdesc_checker curr_class in let decls = (get_categories_decls idi.Clang_ast_t.oidi_class_interface) @ decl_list in - check_for_property_errors cfg cg tenv pdesc decls; + check_for_property_errors cfg cg decls; let call_ns_checker = checkers_for_ns decl_info decl_list in - invoke_set_of_checkers call_ns_checker pdesc ns_notification_checker_list; - IList.iter (run_frontend_checkers_on_decl tenv cg cfg) decl_list - | ObjCProtocolDecl (decl_info, name_info, decl_list, _, _) -> + invoke_set_of_checkers call_ns_checker cfg cg None ns_notification_checker_list; + IList.iter (run_frontend_checkers_on_decl cfg cg) decl_list + | ObjCProtocolDecl (decl_info, _, decl_list, _, _) -> if CLocation.should_do_frontend_check decl_info.Clang_ast_t.di_source_range then - let name = Ast_utils.get_qualified_name name_info in - let curr_class = CContext.ContextProtocol name in - let pdesc = pdesc_checker curr_class in - check_for_property_errors cfg cg tenv pdesc decl_list; - let call_ns_checker = checkers_for_ns decl_info decl_list in - invoke_set_of_checkers call_ns_checker pdesc ns_notification_checker_list; - IList.iter (run_frontend_checkers_on_decl tenv cg cfg) decl_list + (check_for_property_errors cfg cg decl_list; + let call_ns_checker = checkers_for_ns decl_info decl_list in + invoke_set_of_checkers call_ns_checker cfg cg None ns_notification_checker_list; + IList.iter (run_frontend_checkers_on_decl cfg cg) decl_list) else () | _ -> () diff --git a/infer/src/clang/cFrontend_errors.mli b/infer/src/clang/cFrontend_errors.mli index 0f45235c3..60c52576f 100644 --- a/infer/src/clang/cFrontend_errors.mli +++ b/infer/src/clang/cFrontend_errors.mli @@ -16,5 +16,5 @@ open! Utils val run_frontend_checkers_on_stmt : CTrans_utils.trans_state -> Clang_ast_t.stmt -> unit (* Run frontend checkers on a declaration *) -val run_frontend_checkers_on_decl : Tenv.t -> Cg.t -> Cfg.cfg -> Clang_ast_t.decl -> unit +val run_frontend_checkers_on_decl : Cfg.cfg -> Cg.t -> Clang_ast_t.decl -> unit diff --git a/infer/src/clang/cLocation.ml b/infer/src/clang/cLocation.ml index c629e5d54..1ccfa9fc6 100644 --- a/infer/src/clang/cLocation.ml +++ b/infer/src/clang/cLocation.ml @@ -76,14 +76,19 @@ let clang_to_sil_location clang_loc procdesc_opt = | None -> !curr_file, !Config.nLOC in Location.{line; col; file; nLOC} +let file_in_project file = match !Config.project_root with + | Some root -> string_is_prefix root file + | None -> false + let should_do_frontend_check (loc_start, _) = - let equal_current_source loc = - match loc.Clang_ast_t.sl_file with - | Some f -> DB.source_file_equal (source_file_from_path f) !DB.current_source - | None -> false in - if !CFrontend_config.testing_mode then - equal_current_source loc_start - else true + let file = + match loc_start.Clang_ast_t.sl_file with + | Some f -> f + | None -> assert false in + let equal_current_source file = + DB.source_file_equal (source_file_from_path file) !DB.current_source in + equal_current_source file || + (file_in_project file && not !CFrontend_config.testing_mode) (* We translate by default the instructions in the current file.*) (* In C++ development, we also translate the headers that are part *) @@ -104,10 +109,6 @@ let should_translate (loc_start, loc_end) decl_trans_context = let equal_current_source file = DB.source_file_equal file !DB.current_source in - let file_in_project file = match !Config.project_root with - | Some root -> string_is_prefix root file - | None -> false - in let file_in_project = map_path_of file_in_project loc_end || map_path_of file_in_project loc_start in let file_in_models file = Str.string_match (Str.regexp "^.*/infer/models/cpp/include/") file 0 in diff --git a/infer/src/clang/cMethod_trans.ml b/infer/src/clang/cMethod_trans.ml index 091835bcb..d72fdc109 100644 --- a/infer/src/clang/cMethod_trans.ml +++ b/infer/src/clang/cMethod_trans.ml @@ -443,23 +443,22 @@ let create_procdesc_with_pointer context pointer class_name_opt name tp = create_external_procdesc context.cfg callee_name false None; callee_name -let get_method_for_frontend_checks cfg cg tenv class_name decl_info = - let stmt_info = Ast_expressions.make_stmt_info decl_info in - let source_range = decl_info.Clang_ast_t.di_source_range in - let proc_name = General_utils.mk_procname_from_objc_method class_name "frontendChecks" - Procname.Class_objc_method in +let get_method_for_frontend_checks cfg cg loc = + let mangled = string_crc_hex32 (DB.source_file_to_string loc.Location.file) in + let proc_name = Procname.from_string_c_fun ("frontend_checks_" ^ mangled) in match Cfg.Procdesc.find_from_name cfg proc_name with | Some pdesc -> pdesc | None -> - let ms_type_ptr = Clang_ast_types.pointer_to_type_ptr (Ast_utils.get_invalid_pointer ()) in - let ms = CMethod_signature.make_ms proc_name [] ms_type_ptr [] source_range false - CFrontend_config.OBJC None None None in - let body = [Clang_ast_t.CompoundStmt (stmt_info, [])] in - ignore (create_local_procdesc cfg tenv ms body [] false); - let pdesc = Option.get (Cfg.Procdesc.find_from_name cfg proc_name) in - let start_node = Cfg.Procdesc.get_start_node pdesc in - let end_node = Cfg.Procdesc.get_exit_node pdesc in - Cfg.Node.set_succs_exn start_node [end_node] []; + let attrs = { (ProcAttributes.default proc_name Config.C_CPP) with + is_defined = true; + loc = loc; + } in + let pdesc = Cfg.Procdesc.create cfg attrs in + let start_node = Cfg.Node.create cfg loc (Cfg.Node.Start_node pdesc) [] pdesc [] in + let exit_node = Cfg.Node.create cfg loc (Cfg.Node.Exit_node pdesc) [] pdesc [] in + Cfg.Procdesc.set_start_node pdesc start_node; + Cfg.Procdesc.set_exit_node pdesc exit_node; + Cfg.Node.set_succs_exn start_node [exit_node] []; Cg.add_defined_node cg proc_name; pdesc diff --git a/infer/src/clang/cMethod_trans.mli b/infer/src/clang/cMethod_trans.mli index d84881ef7..29553394b 100644 --- a/infer/src/clang/cMethod_trans.mli +++ b/infer/src/clang/cMethod_trans.mli @@ -50,5 +50,4 @@ val get_method_name_from_clang : Tenv.t -> CMethod_signature.method_signature op val create_procdesc_with_pointer : CContext.t -> Clang_ast_t.pointer -> string option -> string -> Clang_ast_t.type_ptr -> Procname.t -val get_method_for_frontend_checks : Cfg.cfg -> Cg.t -> Tenv.t -> string -> - Clang_ast_t.decl_info -> Cfg.Procdesc.t +val get_method_for_frontend_checks : Cfg.cfg -> Cg.t -> Location.t -> Cfg.Procdesc.t diff --git a/infer/tests/codetoanalyze/objc/errors/category_procdesc/EOCPerson.dot b/infer/tests/codetoanalyze/objc/errors/category_procdesc/EOCPerson.dot index c6a5872eb..ea392e410 100644 --- a/infer/tests/codetoanalyze/objc/errors/category_procdesc/EOCPerson.dot +++ b/infer/tests/codetoanalyze/objc/errors/category_procdesc/EOCPerson.dot @@ -1,31 +1,24 @@ digraph iCFG { -8 [label="8: Call _fun_NSLog \n n$1=_fun_NSString_stringWithUTF8String:(\"BTaking vacations\":char *) [line 19]\n _fun_NSLog(n$1:struct objc_object *) [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +6 [label="6: Call _fun_NSLog \n n$1=_fun_NSString_stringWithUTF8String:(\"BTaking vacations\":char *) [line 19]\n _fun_NSLog(n$1:struct objc_object *) [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 8 -> 7 ; -7 [label="7: Exit EOCPerson_takeVacationFromWork \n " color=yellow style=filled] + 6 -> 5 ; +5 [label="5: Exit EOCPerson_takeVacationFromWork \n " color=yellow style=filled] -6 [label="6: Start EOCPerson_takeVacationFromWork\nFormals: self:class EOCPerson *\nLocals: \n DECLARE_LOCALS(&return); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] +4 [label="4: Start EOCPerson_takeVacationFromWork\nFormals: self:class EOCPerson *\nLocals: \n DECLARE_LOCALS(&return); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] - 6 -> 8 ; -5 [label="5: Call _fun_NSLog \n n$0=_fun_NSString_stringWithUTF8String:(\"Performing days at work\":char *) [line 15]\n _fun_NSLog(n$0:struct objc_object *) [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] + 4 -> 6 ; +3 [label="3: Call _fun_NSLog \n n$0=_fun_NSString_stringWithUTF8String:(\"Performing days at work\":char *) [line 15]\n _fun_NSLog(n$0:struct objc_object *) [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit EOCPerson_performDaysWork \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit EOCPerson_performDaysWork \n " color=yellow style=filled] -3 [label="3: Start EOCPerson_performDaysWork\nFormals: self:class EOCPerson *\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n NULLIFY(&self,false); [line 14]\n " color=yellow style=filled] +1 [label="1: Start EOCPerson_performDaysWork\nFormals: self:class EOCPerson *\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n NULLIFY(&self,false); [line 14]\n " color=yellow style=filled] - 3 -> 5 ; -2 [label="2: Exit EOCPerson_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start EOCPerson_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.dot b/infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.dot index c66012417..c822e3ce0 100644 --- a/infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.dot @@ -1,61 +1,47 @@ digraph iCFG { -16 [label="16: DeclStmt \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 42]\n n$2=_fun_NSObject_init(n$1:class A *) virtual [line 42]\n *&a:struct objc_object *=n$2 [line 42]\n REMOVE_TEMPS(n$1,n$2); [line 42]\n NULLIFY(&a,false); [line 42]\n " shape="box"] - - - 16 -> 15 ; -15 [label="15: Release the autorelease pool \n n$0=_fun___objc_release_autorelease_pool() [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] - - - 15 -> 14 ; -14 [label="14: Exit main \n " color=yellow style=filled] - - -13 [label="13: Start main\nFormals: argc:int argv:char **\nLocals: a:struct objc_object * \n DECLARE_LOCALS(&return,&a); [line 40]\n NULLIFY(&a,false); [line 40]\n NULLIFY(&argc,false); [line 40]\n NULLIFY(&argv,false); [line 40]\n " color=yellow style=filled] - - - 13 -> 16 ; -12 [label="12: BinaryOperatorStmt: Assign \n n$2=*&self:class A * [line 33]\n n$3=_fun_B_init(n$2:class A *) [line 33]\n *&self:class A *=n$3 [line 33]\n REMOVE_TEMPS(n$2,n$3); [line 33]\n " shape="box"] +12 [label="12: DeclStmt \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 42]\n n$2=_fun_NSObject_init(n$1:class A *) virtual [line 42]\n *&a:struct objc_object *=n$2 [line 42]\n REMOVE_TEMPS(n$1,n$2); [line 42]\n NULLIFY(&a,false); [line 42]\n " shape="box"] 12 -> 11 ; -11 [label="11: BinaryOperatorStmt: Assign \n n$1=*&self:class A * [line 34]\n *n$1.a:int =4 [line 34]\n REMOVE_TEMPS(n$1); [line 34]\n " shape="box"] +11 [label="11: Release the autorelease pool \n n$0=_fun___objc_release_autorelease_pool() [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] 11 -> 10 ; -10 [label="10: Return Stmt \n n$0=*&self:class A * [line 35]\n *&return:struct objc_object *=n$0 [line 35]\n REMOVE_TEMPS(n$0); [line 35]\n NULLIFY(&self,false); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] +10 [label="10: Exit main \n " color=yellow style=filled] - 10 -> 9 ; -9 [label="9: Exit A_init \n " color=yellow style=filled] +9 [label="9: Start main\nFormals: argc:int argv:char **\nLocals: a:struct objc_object * \n DECLARE_LOCALS(&return,&a); [line 40]\n NULLIFY(&a,false); [line 40]\n NULLIFY(&argc,false); [line 40]\n NULLIFY(&argv,false); [line 40]\n " color=yellow style=filled] -8 [label="8: Start A_init\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] + 9 -> 12 ; +8 [label="8: BinaryOperatorStmt: Assign \n n$2=*&self:class A * [line 33]\n n$3=_fun_B_init(n$2:class A *) [line 33]\n *&self:class A *=n$3 [line 33]\n REMOVE_TEMPS(n$2,n$3); [line 33]\n " shape="box"] - 8 -> 12 ; -7 [label="7: Exit A_frontendChecks \n " color=yellow style=filled] + 8 -> 7 ; +7 [label="7: BinaryOperatorStmt: Assign \n n$1=*&self:class A * [line 34]\n *n$1.a:int =4 [line 34]\n REMOVE_TEMPS(n$1); [line 34]\n " shape="box"] -6 [label="6: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] + 7 -> 6 ; +6 [label="6: Return Stmt \n n$0=*&self:class A * [line 35]\n *&return:struct objc_object *=n$0 [line 35]\n REMOVE_TEMPS(n$0); [line 35]\n NULLIFY(&self,false); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] - 6 -> 7 ; -5 [label="5: Return Stmt \n *&return:struct objc_object *=0 [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] + 6 -> 5 ; +5 [label="5: Exit A_init \n " color=yellow style=filled] - 5 -> 4 ; -4 [label="4: Exit B_init \n " color=yellow style=filled] +4 [label="4: Start A_init\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] -3 [label="3: Start B_init\nFormals: self:class B *\nLocals: \n DECLARE_LOCALS(&return); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] + 4 -> 8 ; +3 [label="3: Return Stmt \n *&return:struct objc_object *=0 [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 3 -> 5 ; -2 [label="2: Exit B_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit B_init \n " color=yellow style=filled] -1 [label="1: Start B_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start B_init\nFormals: self:class B *\nLocals: \n DECLARE_LOCALS(&return); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.dot index cecc181d7..ff0c3827b 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.dot @@ -1,39 +1,32 @@ digraph iCFG { -10 [label="10: DeclStmt \n n$4=_fun___objc_alloc_no_fail(sizeof(class NSString ):unsigned long ) [line 29]\n *&s:class NSString *=n$4 [line 29]\n REMOVE_TEMPS(n$4); [line 29]\n " shape="box"] +8 [label="8: DeclStmt \n n$4=_fun___objc_alloc_no_fail(sizeof(class NSString ):unsigned long ) [line 29]\n *&s:class NSString *=n$4 [line 29]\n REMOVE_TEMPS(n$4); [line 29]\n " shape="box"] - 10 -> 9 ; -9 [label="9: Return Stmt \n n$3=*&s:class NSString * [line 30]\n *&return:class NSString *=n$3 [line 30]\n REMOVE_TEMPS(n$3); [line 30]\n NULLIFY(&s,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] + 8 -> 7 ; +7 [label="7: Return Stmt \n n$3=*&s:class NSString * [line 30]\n *&return:class NSString *=n$3 [line 30]\n REMOVE_TEMPS(n$3); [line 30]\n NULLIFY(&s,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] - 9 -> 8 ; -8 [label="8: Exit A_newS \n " color=yellow style=filled] + 7 -> 6 ; +6 [label="6: Exit A_newS \n " color=yellow style=filled] -7 [label="7: Start A_newS\nFormals: self:class A *\nLocals: s:class NSString * \n DECLARE_LOCALS(&return,&s); [line 28]\n NULLIFY(&s,false); [line 28]\n NULLIFY(&self,false); [line 28]\n " color=yellow style=filled] +5 [label="5: Start A_newS\nFormals: self:class A *\nLocals: s:class NSString * \n DECLARE_LOCALS(&return,&s); [line 28]\n NULLIFY(&s,false); [line 28]\n NULLIFY(&self,false); [line 28]\n " color=yellow style=filled] - 7 -> 10 ; -6 [label="6: DeclStmt \n n$2=_fun___objc_alloc_no_fail(sizeof(class NSString ):unsigned long ) [line 23]\n *&s:class NSString *=n$2 [line 23]\n REMOVE_TEMPS(n$2); [line 23]\n " shape="box"] + 5 -> 8 ; +4 [label="4: DeclStmt \n n$2=_fun___objc_alloc_no_fail(sizeof(class NSString ):unsigned long ) [line 23]\n *&s:class NSString *=n$2 [line 23]\n REMOVE_TEMPS(n$2); [line 23]\n " shape="box"] - 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&s:class NSString * [line 24]\n *&return:class NSString *=n$0 [line 24]\n n$1=_fun___set_autorelease_attribute(n$0:class NSString *) [line 24]\n REMOVE_TEMPS(n$0,n$1); [line 24]\n NULLIFY(&s,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] + 4 -> 3 ; +3 [label="3: Return Stmt \n n$0=*&s:class NSString * [line 24]\n *&return:class NSString *=n$0 [line 24]\n n$1=_fun___set_autorelease_attribute(n$0:class NSString *) [line 24]\n REMOVE_TEMPS(n$0,n$1); [line 24]\n NULLIFY(&s,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit A_getS \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_getS \n " color=yellow style=filled] -3 [label="3: Start A_getS\nFormals: self:class A *\nLocals: s:class NSString * \n DECLARE_LOCALS(&return,&s); [line 22]\n NULLIFY(&s,false); [line 22]\n NULLIFY(&self,false); [line 22]\n " color=yellow style=filled] +1 [label="1: Start A_getS\nFormals: self:class A *\nLocals: s:class NSString * \n DECLARE_LOCALS(&return,&s); [line 22]\n NULLIFY(&s,false); [line 22]\n NULLIFY(&self,false); [line 22]\n " color=yellow style=filled] - 3 -> 6 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 4 ; } diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot index 108ef7441..40c0c9369 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot @@ -134,10 +134,10 @@ digraph iCFG { 3 -> 6 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] +2 [label="2: Exit frontend_checks_260aba1187e75a8c3340e4b361681569 \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start frontend_checks_260aba1187e75a8c3340e4b361681569\nFormals: \nLocals: \n " color=yellow style=filled] 1 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot index bbc3766cf..8d10c3fd5 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot @@ -1,284 +1,277 @@ digraph iCFG { -75 [label="75: DeclStmt \n n$59=_fun_malloc_no_fail(sizeof(int ):int ) [line 103]\n *&x:int *=n$59 [line 103]\n REMOVE_TEMPS(n$59); [line 103]\n " shape="box"] +73 [label="73: DeclStmt \n n$59=_fun_malloc_no_fail(sizeof(int ):int ) [line 103]\n *&x:int *=n$59 [line 103]\n REMOVE_TEMPS(n$59); [line 103]\n " shape="box"] - 75 -> 74 ; -74 [label="74: BinaryOperatorStmt: Assign \n n$58=*&x:int * [line 104]\n *n$58:int =2 [line 104]\n REMOVE_TEMPS(n$58); [line 104]\n " shape="box"] - - - 74 -> 73 ; -73 [label="73: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2); [line 105]\n n$56=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 ):unsigned long ) [line 105]\n *&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2:class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 =n$56 [line 105]\n n$57=*&x:int * [line 105]\n *n$56.x:int *=n$57 [line 105]\n n$51=*&x:int * [line 105]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,n$51) [line 105]\n REMOVE_TEMPS(n$56,n$57,n$51); [line 105]\n NULLIFY(&x,false); [line 105]\n " shape="box"] - - - 73 -> 67 ; -72 [label="72: DeclStmt \n n$54=*&x:int * [line 106]\n n$55=*n$54:int [line 106]\n *&i:int =n$55 [line 106]\n REMOVE_TEMPS(n$54,n$55); [line 106]\n " shape="box"] + 73 -> 72 ; +72 [label="72: BinaryOperatorStmt: Assign \n n$58=*&x:int * [line 104]\n *n$58:int =2 [line 104]\n REMOVE_TEMPS(n$58); [line 104]\n " shape="box"] 72 -> 71 ; -71 [label="71: Call _fun_free \n n$53=*&x:int * [line 107]\n _fun_free(n$53:void *) [line 107]\n REMOVE_TEMPS(n$53); [line 107]\n NULLIFY(&x,false); [line 107]\n " shape="box"] +71 [label="71: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2); [line 105]\n n$56=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 ):unsigned long ) [line 105]\n *&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2:class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 =n$56 [line 105]\n n$57=*&x:int * [line 105]\n *n$56.x:int *=n$57 [line 105]\n n$51=*&x:int * [line 105]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,n$51) [line 105]\n REMOVE_TEMPS(n$56,n$57,n$51); [line 105]\n NULLIFY(&x,false); [line 105]\n " shape="box"] - 71 -> 70 ; -70 [label="70: Return Stmt \n n$52=*&i:int [line 108]\n *&return:int =n$52 [line 108]\n REMOVE_TEMPS(n$52); [line 108]\n NULLIFY(&i,false); [line 108]\n APPLY_ABSTRACTION; [line 108]\n " shape="box"] + 71 -> 65 ; +70 [label="70: DeclStmt \n n$54=*&x:int * [line 106]\n n$55=*n$54:int [line 106]\n *&i:int =n$55 [line 106]\n REMOVE_TEMPS(n$54,n$55); [line 106]\n " shape="box"] 70 -> 69 ; -69 [label="69: Exit __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 \n " color=yellow style=filled] +69 [label="69: Call _fun_free \n n$53=*&x:int * [line 107]\n _fun_free(n$53:void *) [line 107]\n REMOVE_TEMPS(n$53); [line 107]\n NULLIFY(&x,false); [line 107]\n " shape="box"] -68 [label="68: Start __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2\nFormals: x:int *\nLocals: i:int \nCaptured: x:int * \n DECLARE_LOCALS(&return,&i); [line 105]\n NULLIFY(&i,false); [line 105]\n " color=yellow style=filled] + 69 -> 68 ; +68 [label="68: Return Stmt \n n$52=*&i:int [line 108]\n *&return:int =n$52 [line 108]\n REMOVE_TEMPS(n$52); [line 108]\n NULLIFY(&i,false); [line 108]\n APPLY_ABSTRACTION; [line 108]\n " shape="box"] - 68 -> 72 ; -67 [label="67: Return Stmt \n n$49=*&blk:_fn_ (*) [line 110]\n n$50=n$49() [line 110]\n *&return:int =n$50 [line 110]\n REMOVE_TEMPS(n$49,n$50); [line 110]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,true); [line 110]\n NULLIFY(&blk,false); [line 110]\n APPLY_ABSTRACTION; [line 110]\n " shape="box"] + 68 -> 67 ; +67 [label="67: Exit __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 \n " color=yellow style=filled] - 67 -> 66 ; -66 [label="66: Exit MemoryLeakExample_blockFreeNoLeakTODO \n " color=yellow style=filled] +66 [label="66: Start __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2\nFormals: x:int *\nLocals: i:int \nCaptured: x:int * \n DECLARE_LOCALS(&return,&i); [line 105]\n NULLIFY(&i,false); [line 105]\n " color=yellow style=filled] -65 [label="65: Start MemoryLeakExample_blockFreeNoLeakTODO\nFormals: self:class MemoryLeakExample *\nLocals: blk:_fn_ (*) x:int * \n DECLARE_LOCALS(&return,&blk,&x); [line 102]\n NULLIFY(&blk,false); [line 102]\n NULLIFY(&self,false); [line 102]\n NULLIFY(&x,false); [line 102]\n " color=yellow style=filled] + 66 -> 70 ; +65 [label="65: Return Stmt \n n$49=*&blk:_fn_ (*) [line 110]\n n$50=n$49() [line 110]\n *&return:int =n$50 [line 110]\n REMOVE_TEMPS(n$49,n$50); [line 110]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,true); [line 110]\n NULLIFY(&blk,false); [line 110]\n APPLY_ABSTRACTION; [line 110]\n " shape="box"] - 65 -> 75 ; -64 [label="64: DeclStmt \n n$48=_fun_malloc_no_fail(sizeof(int ):int ) [line 94]\n *&x:int *=n$48 [line 94]\n REMOVE_TEMPS(n$48); [line 94]\n " shape="box"] + 65 -> 64 ; +64 [label="64: Exit MemoryLeakExample_blockFreeNoLeakTODO \n " color=yellow style=filled] - 64 -> 63 ; -63 [label="63: BinaryOperatorStmt: Assign \n n$47=*&x:int * [line 95]\n *n$47:int =2 [line 95]\n REMOVE_TEMPS(n$47); [line 95]\n " shape="box"] +63 [label="63: Start MemoryLeakExample_blockFreeNoLeakTODO\nFormals: self:class MemoryLeakExample *\nLocals: blk:_fn_ (*) x:int * \n DECLARE_LOCALS(&return,&blk,&x); [line 102]\n NULLIFY(&blk,false); [line 102]\n NULLIFY(&self,false); [line 102]\n NULLIFY(&x,false); [line 102]\n " color=yellow style=filled] - 63 -> 62 ; -62 [label="62: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1); [line 96]\n n$45=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 ):unsigned long ) [line 96]\n *&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1:class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 =n$45 [line 96]\n n$46=*&x:int * [line 96]\n *n$45.x:int *=n$46 [line 96]\n n$42=*&x:int * [line 96]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,n$42) [line 96]\n REMOVE_TEMPS(n$45,n$46,n$42); [line 96]\n NULLIFY(&x,false); [line 96]\n " shape="box"] + 63 -> 73 ; +62 [label="62: DeclStmt \n n$48=_fun_malloc_no_fail(sizeof(int ):int ) [line 94]\n *&x:int *=n$48 [line 94]\n REMOVE_TEMPS(n$48); [line 94]\n " shape="box"] - 62 -> 58 ; -61 [label="61: Return Stmt \n n$43=*&x:int * [line 97]\n n$44=*n$43:int [line 97]\n *&return:int =n$44 [line 97]\n REMOVE_TEMPS(n$43,n$44); [line 97]\n NULLIFY(&x,false); [line 97]\n APPLY_ABSTRACTION; [line 97]\n " shape="box"] + 62 -> 61 ; +61 [label="61: BinaryOperatorStmt: Assign \n n$47=*&x:int * [line 95]\n *n$47:int =2 [line 95]\n REMOVE_TEMPS(n$47); [line 95]\n " shape="box"] 61 -> 60 ; -60 [label="60: Exit __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 \n " color=yellow style=filled] +60 [label="60: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1); [line 96]\n n$45=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 ):unsigned long ) [line 96]\n *&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1:class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 =n$45 [line 96]\n n$46=*&x:int * [line 96]\n *n$45.x:int *=n$46 [line 96]\n n$42=*&x:int * [line 96]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,n$42) [line 96]\n REMOVE_TEMPS(n$45,n$46,n$42); [line 96]\n NULLIFY(&x,false); [line 96]\n " shape="box"] -59 [label="59: Start __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1\nFormals: x:int *\nLocals: \nCaptured: x:int * \n DECLARE_LOCALS(&return); [line 96]\n " color=yellow style=filled] + 60 -> 56 ; +59 [label="59: Return Stmt \n n$43=*&x:int * [line 97]\n n$44=*n$43:int [line 97]\n *&return:int =n$44 [line 97]\n REMOVE_TEMPS(n$43,n$44); [line 97]\n NULLIFY(&x,false); [line 97]\n APPLY_ABSTRACTION; [line 97]\n " shape="box"] - 59 -> 61 ; -58 [label="58: Return Stmt \n n$40=*&blk:_fn_ (*) [line 99]\n n$41=n$40() [line 99]\n *&return:int =n$41 [line 99]\n REMOVE_TEMPS(n$40,n$41); [line 99]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,true); [line 99]\n NULLIFY(&blk,false); [line 99]\n APPLY_ABSTRACTION; [line 99]\n " shape="box"] + 59 -> 58 ; +58 [label="58: Exit __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 \n " color=yellow style=filled] - 58 -> 57 ; -57 [label="57: Exit MemoryLeakExample_blockCapturedVarLeak \n " color=yellow style=filled] +57 [label="57: Start __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1\nFormals: x:int *\nLocals: \nCaptured: x:int * \n DECLARE_LOCALS(&return); [line 96]\n " color=yellow style=filled] -56 [label="56: Start MemoryLeakExample_blockCapturedVarLeak\nFormals: self:class MemoryLeakExample *\nLocals: blk:_fn_ (*) x:int * \n DECLARE_LOCALS(&return,&blk,&x); [line 93]\n NULLIFY(&blk,false); [line 93]\n NULLIFY(&self,false); [line 93]\n NULLIFY(&x,false); [line 93]\n " color=yellow style=filled] + 57 -> 59 ; +56 [label="56: Return Stmt \n n$40=*&blk:_fn_ (*) [line 99]\n n$41=n$40() [line 99]\n *&return:int =n$41 [line 99]\n REMOVE_TEMPS(n$40,n$41); [line 99]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,true); [line 99]\n NULLIFY(&blk,false); [line 99]\n APPLY_ABSTRACTION; [line 99]\n " shape="box"] - 56 -> 64 ; -55 [label="55: DeclStmt \n n$39=_fun_malloc_no_fail(sizeof(int ):int ) [line 88]\n *&x:int *=n$39 [line 88]\n REMOVE_TEMPS(n$39); [line 88]\n " shape="box"] + 56 -> 55 ; +55 [label="55: Exit MemoryLeakExample_blockCapturedVarLeak \n " color=yellow style=filled] - 55 -> 54 ; -54 [label="54: BinaryOperatorStmt: Assign \n n$38=*&x:int * [line 89]\n *n$38:int =7 [line 89]\n REMOVE_TEMPS(n$38); [line 89]\n " shape="box"] +54 [label="54: Start MemoryLeakExample_blockCapturedVarLeak\nFormals: self:class MemoryLeakExample *\nLocals: blk:_fn_ (*) x:int * \n DECLARE_LOCALS(&return,&blk,&x); [line 93]\n NULLIFY(&blk,false); [line 93]\n NULLIFY(&self,false); [line 93]\n NULLIFY(&x,false); [line 93]\n " color=yellow style=filled] - 54 -> 53 ; -53 [label="53: Return Stmt \n n$36=*&x:int * [line 90]\n n$37=*n$36:int [line 90]\n *&return:int =n$37 [line 90]\n REMOVE_TEMPS(n$36,n$37); [line 90]\n NULLIFY(&x,false); [line 90]\n APPLY_ABSTRACTION; [line 90]\n " shape="box"] + 54 -> 62 ; +53 [label="53: DeclStmt \n n$39=_fun_malloc_no_fail(sizeof(int ):int ) [line 88]\n *&x:int *=n$39 [line 88]\n REMOVE_TEMPS(n$39); [line 88]\n " shape="box"] 53 -> 52 ; -52 [label="52: Exit MemoryLeakExample_regularLeak \n " color=yellow style=filled] +52 [label="52: BinaryOperatorStmt: Assign \n n$38=*&x:int * [line 89]\n *n$38:int =7 [line 89]\n REMOVE_TEMPS(n$38); [line 89]\n " shape="box"] -51 [label="51: Start MemoryLeakExample_regularLeak\nFormals: self:class MemoryLeakExample *\nLocals: x:int * \n DECLARE_LOCALS(&return,&x); [line 87]\n NULLIFY(&self,false); [line 87]\n NULLIFY(&x,false); [line 87]\n " color=yellow style=filled] + 52 -> 51 ; +51 [label="51: Return Stmt \n n$36=*&x:int * [line 90]\n n$37=*n$36:int [line 90]\n *&return:int =n$37 [line 90]\n REMOVE_TEMPS(n$36,n$37); [line 90]\n NULLIFY(&x,false); [line 90]\n APPLY_ABSTRACTION; [line 90]\n " shape="box"] - 51 -> 55 ; -50 [label="50: DeclStmt \n n$35=_fun_FBColorCreateWithGray(0.000000:double ,0.300000:double ) [line 83]\n *&borderColor:struct CGColor *=n$35 [line 83]\n REMOVE_TEMPS(n$35); [line 83]\n " shape="box"] + 51 -> 50 ; +50 [label="50: Exit MemoryLeakExample_regularLeak \n " color=yellow style=filled] - 50 -> 49 ; -49 [label="49: Call _fun_CGColorRelease \n n$34=*&borderColor:struct CGColor * [line 84]\n _fun_CGColorRelease(n$34:struct CGColor *) [line 84]\n REMOVE_TEMPS(n$34); [line 84]\n NULLIFY(&borderColor,false); [line 84]\n APPLY_ABSTRACTION; [line 84]\n " shape="box"] +49 [label="49: Start MemoryLeakExample_regularLeak\nFormals: self:class MemoryLeakExample *\nLocals: x:int * \n DECLARE_LOCALS(&return,&x); [line 87]\n NULLIFY(&self,false); [line 87]\n NULLIFY(&x,false); [line 87]\n " color=yellow style=filled] - 49 -> 48 ; -48 [label="48: Exit MemoryLeakExample_testFBColorCreateWithGray \n " color=yellow style=filled] + 49 -> 53 ; +48 [label="48: DeclStmt \n n$35=_fun_FBColorCreateWithGray(0.000000:double ,0.300000:double ) [line 83]\n *&borderColor:struct CGColor *=n$35 [line 83]\n REMOVE_TEMPS(n$35); [line 83]\n " shape="box"] -47 [label="47: Start MemoryLeakExample_testFBColorCreateWithGray\nFormals: self:class MemoryLeakExample *\nLocals: borderColor:struct CGColor * \n DECLARE_LOCALS(&return,&borderColor); [line 82]\n NULLIFY(&borderColor,false); [line 82]\n NULLIFY(&self,false); [line 82]\n " color=yellow style=filled] + 48 -> 47 ; +47 [label="47: Call _fun_CGColorRelease \n n$34=*&borderColor:struct CGColor * [line 84]\n _fun_CGColorRelease(n$34:struct CGColor *) [line 84]\n REMOVE_TEMPS(n$34); [line 84]\n NULLIFY(&borderColor,false); [line 84]\n APPLY_ABSTRACTION; [line 84]\n " shape="box"] - 47 -> 50 ; -46 [label="46: DeclStmt \n n$33=_fun_CGBitmapContextCreateImage(0:struct CGContext *) [line 76]\n *&newImage:struct CGImage *=n$33 [line 76]\n REMOVE_TEMPS(n$33); [line 76]\n " shape="box"] + 47 -> 46 ; +46 [label="46: Exit MemoryLeakExample_testFBColorCreateWithGray \n " color=yellow style=filled] - 46 -> 45 ; -45 [label="45: Call _fun_CGImageRelease \n n$32=*&newImage:struct CGImage * [line 77]\n _fun_CGImageRelease(n$32:struct CGImage *) [line 77]\n REMOVE_TEMPS(n$32); [line 77]\n NULLIFY(&newImage,false); [line 77]\n APPLY_ABSTRACTION; [line 77]\n " shape="box"] +45 [label="45: Start MemoryLeakExample_testFBColorCreateWithGray\nFormals: self:class MemoryLeakExample *\nLocals: borderColor:struct CGColor * \n DECLARE_LOCALS(&return,&borderColor); [line 82]\n NULLIFY(&borderColor,false); [line 82]\n NULLIFY(&self,false); [line 82]\n " color=yellow style=filled] - 45 -> 44 ; -44 [label="44: Exit MemoryLeakExample_testImageRefRelease \n " color=yellow style=filled] + 45 -> 48 ; +44 [label="44: DeclStmt \n n$33=_fun_CGBitmapContextCreateImage(0:struct CGContext *) [line 76]\n *&newImage:struct CGImage *=n$33 [line 76]\n REMOVE_TEMPS(n$33); [line 76]\n " shape="box"] -43 [label="43: Start MemoryLeakExample_testImageRefRelease\nFormals: \nLocals: newImage:struct CGImage * \n DECLARE_LOCALS(&return,&newImage); [line 75]\n NULLIFY(&newImage,false); [line 75]\n " color=yellow style=filled] + 44 -> 43 ; +43 [label="43: Call _fun_CGImageRelease \n n$32=*&newImage:struct CGImage * [line 77]\n _fun_CGImageRelease(n$32:struct CGImage *) [line 77]\n REMOVE_TEMPS(n$32); [line 77]\n NULLIFY(&newImage,false); [line 77]\n APPLY_ABSTRACTION; [line 77]\n " shape="box"] - 43 -> 46 ; -42 [label="42: DeclStmt \n n$31=_fun_SecTrustCopyPublicKey(0:struct __SecTrust *) [line 71]\n *&allowedPublicKey:struct __SecKey *=n$31 [line 71]\n REMOVE_TEMPS(n$31); [line 71]\n " shape="box"] + 43 -> 42 ; +42 [label="42: Exit MemoryLeakExample_testImageRefRelease \n " color=yellow style=filled] - 42 -> 41 ; -41 [label="41: Call _fun___objc_release_cf \n n$30=*&allowedPublicKey:struct __SecKey * [line 72]\n _fun___objc_release_cf(1:_Bool ,n$30:void *) [line 72]\n REMOVE_TEMPS(n$30); [line 72]\n NULLIFY(&allowedPublicKey,false); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"] +41 [label="41: Start MemoryLeakExample_testImageRefRelease\nFormals: \nLocals: newImage:struct CGImage * \n DECLARE_LOCALS(&return,&newImage); [line 75]\n NULLIFY(&newImage,false); [line 75]\n " color=yellow style=filled] - 41 -> 40 ; -40 [label="40: Exit MemoryLeakExample_test2NoLeak \n " color=yellow style=filled] + 41 -> 44 ; +40 [label="40: DeclStmt \n n$31=_fun_SecTrustCopyPublicKey(0:struct __SecTrust *) [line 71]\n *&allowedPublicKey:struct __SecKey *=n$31 [line 71]\n REMOVE_TEMPS(n$31); [line 71]\n " shape="box"] -39 [label="39: Start MemoryLeakExample_test2NoLeak\nFormals: \nLocals: allowedPublicKey:struct __SecKey * \n DECLARE_LOCALS(&return,&allowedPublicKey); [line 70]\n NULLIFY(&allowedPublicKey,false); [line 70]\n " color=yellow style=filled] + 40 -> 39 ; +39 [label="39: Call _fun___objc_release_cf \n n$30=*&allowedPublicKey:struct __SecKey * [line 72]\n _fun___objc_release_cf(1:_Bool ,n$30:void *) [line 72]\n REMOVE_TEMPS(n$30); [line 72]\n NULLIFY(&allowedPublicKey,false); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"] - 39 -> 42 ; -38 [label="38: Call _fun_SecTrustCopyPublicKey \n n$28=*&trust:struct __SecTrust * [line 67]\n n$29=_fun_SecTrustCopyPublicKey(n$28:struct __SecTrust *) [line 67]\n REMOVE_TEMPS(n$28,n$29); [line 67]\n NULLIFY(&trust,false); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] + 39 -> 38 ; +38 [label="38: Exit MemoryLeakExample_test2NoLeak \n " color=yellow style=filled] - 38 -> 37 ; -37 [label="37: Exit MemoryLeakExample_test2: \n " color=yellow style=filled] +37 [label="37: Start MemoryLeakExample_test2NoLeak\nFormals: \nLocals: allowedPublicKey:struct __SecKey * \n DECLARE_LOCALS(&return,&allowedPublicKey); [line 70]\n NULLIFY(&allowedPublicKey,false); [line 70]\n " color=yellow style=filled] -36 [label="36: Start MemoryLeakExample_test2:\nFormals: trust:struct __SecTrust *\nLocals: \n DECLARE_LOCALS(&return); [line 66]\n " color=yellow style=filled] + 37 -> 40 ; +36 [label="36: Call _fun_SecTrustCopyPublicKey \n n$28=*&trust:struct __SecTrust * [line 67]\n n$29=_fun_SecTrustCopyPublicKey(n$28:struct __SecTrust *) [line 67]\n REMOVE_TEMPS(n$28,n$29); [line 67]\n NULLIFY(&trust,false); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] - 36 -> 38 ; -35 [label="35: DeclStmt \n n$26=*&rect:struct CGRect [line 59]\n n$27=_fun_CGRectGetHeight(n$26:struct CGRect ) [line 59]\n *&lineThickness:double =(0.200000 * n$27) [line 59]\n REMOVE_TEMPS(n$26,n$27); [line 59]\n NULLIFY(&rect,false); [line 59]\n NULLIFY(&lineThickness,false); [line 59]\n " shape="box"] + 36 -> 35 ; +35 [label="35: Exit MemoryLeakExample_test2: \n " color=yellow style=filled] - 35 -> 34 ; -34 [label="34: DeclStmt \n n$25=_fun_CGPathCreateMutable() [line 62]\n *&path1:struct CGPath *=n$25 [line 62]\n REMOVE_TEMPS(n$25); [line 62]\n " shape="box"] +34 [label="34: Start MemoryLeakExample_test2:\nFormals: trust:struct __SecTrust *\nLocals: \n DECLARE_LOCALS(&return); [line 66]\n " color=yellow style=filled] - 34 -> 33 ; -33 [label="33: Call _fun___objc_release_cf \n n$24=*&path1:struct CGPath * [line 63]\n _fun___objc_release_cf(1:_Bool ,n$24:void *) [line 63]\n REMOVE_TEMPS(n$24); [line 63]\n NULLIFY(&path1,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] + 34 -> 36 ; +33 [label="33: DeclStmt \n n$26=*&rect:struct CGRect [line 59]\n n$27=_fun_CGRectGetHeight(n$26:struct CGRect ) [line 59]\n *&lineThickness:double =(0.200000 * n$27) [line 59]\n REMOVE_TEMPS(n$26,n$27); [line 59]\n NULLIFY(&rect,false); [line 59]\n NULLIFY(&lineThickness,false); [line 59]\n " shape="box"] 33 -> 32 ; -32 [label="32: Exit MemoryLeakExample_createCloseCrossGlyphNoLeak: \n " color=yellow style=filled] +32 [label="32: DeclStmt \n n$25=_fun_CGPathCreateMutable() [line 62]\n *&path1:struct CGPath *=n$25 [line 62]\n REMOVE_TEMPS(n$25); [line 62]\n " shape="box"] -31 [label="31: Start MemoryLeakExample_createCloseCrossGlyphNoLeak:\nFormals: rect:struct CGRect \nLocals: path1:struct CGPath * lineThickness:double \n DECLARE_LOCALS(&return,&path1,&lineThickness); [line 58]\n NULLIFY(&lineThickness,false); [line 58]\n NULLIFY(&path1,false); [line 58]\n " color=yellow style=filled] + 32 -> 31 ; +31 [label="31: Call _fun___objc_release_cf \n n$24=*&path1:struct CGPath * [line 63]\n _fun___objc_release_cf(1:_Bool ,n$24:void *) [line 63]\n REMOVE_TEMPS(n$24); [line 63]\n NULLIFY(&path1,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] - 31 -> 35 ; -30 [label="30: BinaryOperatorStmt: Mul \n n$22=*&rect:struct CGRect [line 54]\n n$23=_fun_CGRectGetHeight(n$22:struct CGRect ) [line 54]\n REMOVE_TEMPS(n$22,n$23); [line 54]\n NULLIFY(&rect,false); [line 54]\n " shape="box"] + 31 -> 30 ; +30 [label="30: Exit MemoryLeakExample_createCloseCrossGlyphNoLeak: \n " color=yellow style=filled] - 30 -> 29 ; -29 [label="29: Call _fun_CGPathCreateMutable \n n$21=_fun_CGPathCreateMutable() [line 55]\n REMOVE_TEMPS(n$21); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"] +29 [label="29: Start MemoryLeakExample_createCloseCrossGlyphNoLeak:\nFormals: rect:struct CGRect \nLocals: path1:struct CGPath * lineThickness:double \n DECLARE_LOCALS(&return,&path1,&lineThickness); [line 58]\n NULLIFY(&lineThickness,false); [line 58]\n NULLIFY(&path1,false); [line 58]\n " color=yellow style=filled] - 29 -> 28 ; -28 [label="28: Exit MemoryLeakExample_createCloseCrossGlyph: \n " color=yellow style=filled] + 29 -> 33 ; +28 [label="28: BinaryOperatorStmt: Mul \n n$22=*&rect:struct CGRect [line 54]\n n$23=_fun_CGRectGetHeight(n$22:struct CGRect ) [line 54]\n REMOVE_TEMPS(n$22,n$23); [line 54]\n NULLIFY(&rect,false); [line 54]\n " shape="box"] -27 [label="27: Start MemoryLeakExample_createCloseCrossGlyph:\nFormals: rect:struct CGRect \nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled] + 28 -> 27 ; +27 [label="27: Call _fun_CGPathCreateMutable \n n$21=_fun_CGPathCreateMutable() [line 55]\n REMOVE_TEMPS(n$21); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"] - 27 -> 30 ; -26 [label="26: DeclStmt \n n$20=_fun_CTFramesetterCreateWithAttributedString(0:struct __CFAttributedString *) [line 49]\n *&framesetter:struct __CTFramesetter *=n$20 [line 49]\n REMOVE_TEMPS(n$20); [line 49]\n " shape="box"] + 27 -> 26 ; +26 [label="26: Exit MemoryLeakExample_createCloseCrossGlyph: \n " color=yellow style=filled] - 26 -> 25 ; -25 [label="25: Call _fun___objc_release_cf \n n$19=*&framesetter:struct __CTFramesetter * [line 50]\n _fun___objc_release_cf(1:_Bool ,n$19:void *) [line 50]\n REMOVE_TEMPS(n$19); [line 50]\n NULLIFY(&framesetter,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +25 [label="25: Start MemoryLeakExample_createCloseCrossGlyph:\nFormals: rect:struct CGRect \nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled] - 25 -> 24 ; -24 [label="24: Exit MemoryLeakExample_test1NoLeak \n " color=yellow style=filled] + 25 -> 28 ; +24 [label="24: DeclStmt \n n$20=_fun_CTFramesetterCreateWithAttributedString(0:struct __CFAttributedString *) [line 49]\n *&framesetter:struct __CTFramesetter *=n$20 [line 49]\n REMOVE_TEMPS(n$20); [line 49]\n " shape="box"] -23 [label="23: Start MemoryLeakExample_test1NoLeak\nFormals: \nLocals: framesetter:struct __CTFramesetter * \n DECLARE_LOCALS(&return,&framesetter); [line 48]\n NULLIFY(&framesetter,false); [line 48]\n " color=yellow style=filled] + 24 -> 23 ; +23 [label="23: Call _fun___objc_release_cf \n n$19=*&framesetter:struct __CTFramesetter * [line 50]\n _fun___objc_release_cf(1:_Bool ,n$19:void *) [line 50]\n REMOVE_TEMPS(n$19); [line 50]\n NULLIFY(&framesetter,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] - 23 -> 26 ; -22 [label="22: Call _fun_CTFramesetterCreateWithAttributedString \n n$17=*&str:struct __CFAttributedString * [line 45]\n n$18=_fun_CTFramesetterCreateWithAttributedString(n$17:struct __CFAttributedString *) [line 45]\n REMOVE_TEMPS(n$17,n$18); [line 45]\n NULLIFY(&str,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] + 23 -> 22 ; +22 [label="22: Exit MemoryLeakExample_test1NoLeak \n " color=yellow style=filled] - 22 -> 21 ; -21 [label="21: Exit MemoryLeakExample_test1: \n " color=yellow style=filled] +21 [label="21: Start MemoryLeakExample_test1NoLeak\nFormals: \nLocals: framesetter:struct __CTFramesetter * \n DECLARE_LOCALS(&return,&framesetter); [line 48]\n NULLIFY(&framesetter,false); [line 48]\n " color=yellow style=filled] -20 [label="20: Start MemoryLeakExample_test1:\nFormals: str:struct __CFAttributedString *\nLocals: \n DECLARE_LOCALS(&return); [line 44]\n " color=yellow style=filled] + 21 -> 24 ; +20 [label="20: Call _fun_CTFramesetterCreateWithAttributedString \n n$17=*&str:struct __CFAttributedString * [line 45]\n n$18=_fun_CTFramesetterCreateWithAttributedString(n$17:struct __CFAttributedString *) [line 45]\n REMOVE_TEMPS(n$17,n$18); [line 45]\n NULLIFY(&str,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] - 20 -> 22 ; -19 [label="19: DeclStmt \n n$16=_fun_CFAttributedStringCreateMutable(0:struct __CFAllocator *,0:long ) [line 40]\n *&maString:struct __CFAttributedString *=n$16 [line 39]\n REMOVE_TEMPS(n$16); [line 39]\n " shape="box"] + 20 -> 19 ; +19 [label="19: Exit MemoryLeakExample_test1: \n " color=yellow style=filled] - 19 -> 18 ; -18 [label="18: Call _fun___objc_release_cf \n n$15=*&maString:struct __CFAttributedString * [line 41]\n _fun___objc_release_cf(1:_Bool ,n$15:void *) [line 41]\n REMOVE_TEMPS(n$15); [line 41]\n NULLIFY(&maString,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] +18 [label="18: Start MemoryLeakExample_test1:\nFormals: str:struct __CFAttributedString *\nLocals: \n DECLARE_LOCALS(&return); [line 44]\n " color=yellow style=filled] - 18 -> 17 ; -17 [label="17: Exit MemoryLeakExample_measureFrameSizeForTextNoLeak \n " color=yellow style=filled] + 18 -> 20 ; +17 [label="17: DeclStmt \n n$16=_fun_CFAttributedStringCreateMutable(0:struct __CFAllocator *,0:long ) [line 40]\n *&maString:struct __CFAttributedString *=n$16 [line 39]\n REMOVE_TEMPS(n$16); [line 39]\n " shape="box"] -16 [label="16: Start MemoryLeakExample_measureFrameSizeForTextNoLeak\nFormals: \nLocals: maString:struct __CFAttributedString * \n DECLARE_LOCALS(&return,&maString); [line 38]\n NULLIFY(&maString,false); [line 38]\n " color=yellow style=filled] + 17 -> 16 ; +16 [label="16: Call _fun___objc_release_cf \n n$15=*&maString:struct __CFAttributedString * [line 41]\n _fun___objc_release_cf(1:_Bool ,n$15:void *) [line 41]\n REMOVE_TEMPS(n$15); [line 41]\n NULLIFY(&maString,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] - 16 -> 19 ; -15 [label="15: Call _fun_CFAttributedStringCreateMutable \n n$14=_fun_CFAttributedStringCreateMutable(0:struct __CFAllocator *,0:long ) [line 35]\n REMOVE_TEMPS(n$14); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] + 16 -> 15 ; +15 [label="15: Exit MemoryLeakExample_measureFrameSizeForTextNoLeak \n " color=yellow style=filled] - 15 -> 14 ; -14 [label="14: Exit MemoryLeakExample_measureFrameSizeForText \n " color=yellow style=filled] +14 [label="14: Start MemoryLeakExample_measureFrameSizeForTextNoLeak\nFormals: \nLocals: maString:struct __CFAttributedString * \n DECLARE_LOCALS(&return,&maString); [line 38]\n NULLIFY(&maString,false); [line 38]\n " color=yellow style=filled] -13 [label="13: Start MemoryLeakExample_measureFrameSizeForText\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 34]\n " color=yellow style=filled] + 14 -> 17 ; +13 [label="13: Call _fun_CFAttributedStringCreateMutable \n n$14=_fun_CFAttributedStringCreateMutable(0:struct __CFAllocator *,0:long ) [line 35]\n REMOVE_TEMPS(n$14); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] - 13 -> 15 ; -12 [label="12: DeclStmt \n n$10=*&self:class MemoryLeakExample * [line 30]\n n$11=_fun_MemoryLeakExample_backgroundCoveringView(n$10:class MemoryLeakExample *) [line 30]\n n$12=_fun_UIView_bounds(n$11:class UIView *) [line 30]\n n$13=_fun_CGPathCreateWithRect(n$12:struct CGRect ,0:struct CGAffineTransform *) [line 30]\n *&shadowPath:struct CGPath *=n$13 [line 29]\n REMOVE_TEMPS(n$10,n$11,n$12,n$13); [line 29]\n " shape="box"] + 13 -> 12 ; +12 [label="12: Exit MemoryLeakExample_measureFrameSizeForText \n " color=yellow style=filled] - 12 -> 11 ; -11 [label="11: Message Call: setShadowPath: \n n$6=*&self:class MemoryLeakExample * [line 31]\n n$7=_fun_MemoryLeakExample_backgroundCoveringView(n$6:class MemoryLeakExample *) [line 31]\n n$8=_fun_UIView_layer(n$7:class UIView *) [line 31]\n n$9=*&shadowPath:struct CGPath * [line 31]\n _fun_CALayer_setShadowPath:(n$8:class CALayer *,n$9:struct CGPath *) [line 31]\n REMOVE_TEMPS(n$6,n$7,n$8,n$9); [line 31]\n NULLIFY(&self,false); [line 31]\n NULLIFY(&shadowPath,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +11 [label="11: Start MemoryLeakExample_measureFrameSizeForText\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 34]\n " color=yellow style=filled] - 11 -> 10 ; -10 [label="10: Exit MemoryLeakExample_test \n " color=yellow style=filled] + 11 -> 13 ; +10 [label="10: DeclStmt \n n$10=*&self:class MemoryLeakExample * [line 30]\n n$11=_fun_MemoryLeakExample_backgroundCoveringView(n$10:class MemoryLeakExample *) [line 30]\n n$12=_fun_UIView_bounds(n$11:class UIView *) [line 30]\n n$13=_fun_CGPathCreateWithRect(n$12:struct CGRect ,0:struct CGAffineTransform *) [line 30]\n *&shadowPath:struct CGPath *=n$13 [line 29]\n REMOVE_TEMPS(n$10,n$11,n$12,n$13); [line 29]\n " shape="box"] -9 [label="9: Start MemoryLeakExample_test\nFormals: self:class MemoryLeakExample *\nLocals: shadowPath:struct CGPath * \n DECLARE_LOCALS(&return,&shadowPath); [line 28]\n NULLIFY(&shadowPath,false); [line 28]\n " color=yellow style=filled] + 10 -> 9 ; +9 [label="9: Message Call: setShadowPath: \n n$6=*&self:class MemoryLeakExample * [line 31]\n n$7=_fun_MemoryLeakExample_backgroundCoveringView(n$6:class MemoryLeakExample *) [line 31]\n n$8=_fun_UIView_layer(n$7:class UIView *) [line 31]\n n$9=*&shadowPath:struct CGPath * [line 31]\n _fun_CALayer_setShadowPath:(n$8:class CALayer *,n$9:struct CGPath *) [line 31]\n REMOVE_TEMPS(n$6,n$7,n$8,n$9); [line 31]\n NULLIFY(&self,false); [line 31]\n NULLIFY(&shadowPath,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 9 -> 12 ; -8 [label="8: DeclStmt \n n$5=_fun___objc_alloc_no_fail(sizeof(class UIView ):unsigned long ) [line 20]\n *&attachmentContainerView:class UIView *=n$5 [line 20]\n REMOVE_TEMPS(n$5); [line 20]\n " shape="box"] + 9 -> 8 ; +8 [label="8: Exit MemoryLeakExample_test \n " color=yellow style=filled] - 8 -> 7 ; -7 [label="7: DeclStmt \n n$2=*&attachmentContainerView:class UIView * [line 22]\n n$3=_fun_UIView_bounds(n$2:class UIView *) [line 22]\n n$4=_fun_CGPathCreateWithRect(n$3:struct CGRect ,0:struct CGAffineTransform *) [line 22]\n *&shadowPath:struct CGPath *=n$4 [line 21]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 21]\n " shape="box"] +7 [label="7: Start MemoryLeakExample_test\nFormals: self:class MemoryLeakExample *\nLocals: shadowPath:struct CGPath * \n DECLARE_LOCALS(&return,&shadowPath); [line 28]\n NULLIFY(&shadowPath,false); [line 28]\n " color=yellow style=filled] - 7 -> 6 ; -6 [label="6: Call _fun_CGPathRelease \n n$1=*&shadowPath:struct CGPath * [line 24]\n _fun_CGPathRelease(n$1:struct CGPath *) [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&shadowPath,false); [line 24]\n " shape="box"] + 7 -> 10 ; +6 [label="6: DeclStmt \n n$5=_fun___objc_alloc_no_fail(sizeof(class UIView ):unsigned long ) [line 20]\n *&attachmentContainerView:class UIView *=n$5 [line 20]\n REMOVE_TEMPS(n$5); [line 20]\n " shape="box"] 6 -> 5 ; -5 [label="5: Message Call: release \n n$0=*&attachmentContainerView:class UIView * [line 25]\n _fun___objc_release(n$0:class UIView *) [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&attachmentContainerView,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +5 [label="5: DeclStmt \n n$2=*&attachmentContainerView:class UIView * [line 22]\n n$3=_fun_UIView_bounds(n$2:class UIView *) [line 22]\n n$4=_fun_CGPathCreateWithRect(n$3:struct CGRect ,0:struct CGAffineTransform *) [line 22]\n *&shadowPath:struct CGPath *=n$4 [line 21]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 21]\n " shape="box"] 5 -> 4 ; -4 [label="4: Exit MemoryLeakExample_layoutSubviews \n " color=yellow style=filled] +4 [label="4: Call _fun_CGPathRelease \n n$1=*&shadowPath:struct CGPath * [line 24]\n _fun_CGPathRelease(n$1:struct CGPath *) [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&shadowPath,false); [line 24]\n " shape="box"] -3 [label="3: Start MemoryLeakExample_layoutSubviews\nFormals: self:class MemoryLeakExample *\nLocals: shadowPath:struct CGPath * attachmentContainerView:class UIView * \n DECLARE_LOCALS(&return,&shadowPath,&attachmentContainerView); [line 19]\n NULLIFY(&attachmentContainerView,false); [line 19]\n NULLIFY(&self,false); [line 19]\n NULLIFY(&shadowPath,false); [line 19]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Message Call: release \n n$0=*&attachmentContainerView:class UIView * [line 25]\n _fun___objc_release(n$0:class UIView *) [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&attachmentContainerView,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] - 3 -> 8 ; -2 [label="2: Exit MemoryLeakExample_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit MemoryLeakExample_layoutSubviews \n " color=yellow style=filled] -1 [label="1: Start MemoryLeakExample_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start MemoryLeakExample_layoutSubviews\nFormals: self:class MemoryLeakExample *\nLocals: shadowPath:struct CGPath * attachmentContainerView:class UIView * \n DECLARE_LOCALS(&return,&shadowPath,&attachmentContainerView); [line 19]\n NULLIFY(&attachmentContainerView,false); [line 19]\n NULLIFY(&self,false); [line 19]\n NULLIFY(&shadowPath,false); [line 19]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 6 ; } diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.dot index d40579273..c6074171e 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.dot @@ -1,28 +1,21 @@ digraph iCFG { -7 [label="7: DeclStmt \n n$3=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 21]\n n$4=_fun_NSObject_init(n$3:class A *) virtual [line 21]\n *&a:class A *=n$4 [line 21]\n REMOVE_TEMPS(n$3,n$4); [line 21]\n " shape="box"] - - - 7 -> 6 ; -6 [label="6: Message Call: retain \n n$1=*&a:class A * [line 22]\n n$2=_fun___objc_retain(n$1:class A *) [line 22]\n REMOVE_TEMPS(n$1,n$2); [line 22]\n " shape="box"] - - - 6 -> 5 ; -5 [label="5: Message Call: release \n n$0=*&a:class A * [line 23]\n _fun___objc_release(n$0:class A *) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&a,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +5 [label="5: DeclStmt \n n$3=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 21]\n n$4=_fun_NSObject_init(n$3:class A *) virtual [line 21]\n *&a:class A *=n$4 [line 21]\n REMOVE_TEMPS(n$3,n$4); [line 21]\n " shape="box"] 5 -> 4 ; -4 [label="4: Exit test \n " color=yellow style=filled] +4 [label="4: Message Call: retain \n n$1=*&a:class A * [line 22]\n n$2=_fun___objc_retain(n$1:class A *) [line 22]\n REMOVE_TEMPS(n$1,n$2); [line 22]\n " shape="box"] -3 [label="3: Start test\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 20]\n NULLIFY(&a,false); [line 20]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Message Call: release \n n$0=*&a:class A * [line 23]\n _fun___objc_release(n$0:class A *) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&a,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] - 3 -> 7 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit test \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start test\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 20]\n NULLIFY(&a,false); [line 20]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 5 ; } diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot index 238587bc9..7e4af8274 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot @@ -1,131 +1,124 @@ digraph iCFG { -34 [label="34: Call _fun___objc_release \n n$1=*&a:class A * [line 65]\n _fun___objc_release(n$1:class A *) [line 65]\n REMOVE_TEMPS(n$1); [line 65]\n NULLIFY(&a,false); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] +32 [label="32: Call _fun___objc_release \n n$1=*&a:class A * [line 65]\n _fun___objc_release(n$1:class A *) [line 65]\n REMOVE_TEMPS(n$1); [line 65]\n NULLIFY(&a,false); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] - 34 -> 31 ; -33 [label="33: Prune (false branch) \n n$0=*&a:class A * [line 64]\n PRUNE((n$0 == 0), false); [line 64]\n REMOVE_TEMPS(n$0); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="invhouse"] + 32 -> 29 ; +31 [label="31: Prune (false branch) \n n$0=*&a:class A * [line 64]\n PRUNE((n$0 == 0), false); [line 64]\n REMOVE_TEMPS(n$0); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="invhouse"] - 33 -> 31 ; -32 [label="32: Prune (true branch) \n n$0=*&a:class A * [line 64]\n PRUNE((n$0 != 0), true); [line 64]\n REMOVE_TEMPS(n$0); [line 64]\n " shape="invhouse"] + 31 -> 29 ; +30 [label="30: Prune (true branch) \n n$0=*&a:class A * [line 64]\n PRUNE((n$0 != 0), true); [line 64]\n REMOVE_TEMPS(n$0); [line 64]\n " shape="invhouse"] - 32 -> 34 ; -31 [label="31: + \n NULLIFY(&a,false); [line 64]\n " ] + 30 -> 32 ; +29 [label="29: + \n NULLIFY(&a,false); [line 64]\n " ] - 31 -> 30 ; -30 [label="30: Exit test7 \n " color=yellow style=filled] + 29 -> 28 ; +28 [label="28: Exit test7 \n " color=yellow style=filled] -29 [label="29: Start test7\nFormals: a:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 63]\n " color=yellow style=filled] +27 [label="27: Start test7\nFormals: a:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 63]\n " color=yellow style=filled] - 29 -> 32 ; - 29 -> 33 ; -28 [label="28: DeclStmt \n n$3=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 57]\n n$4=_fun_NSObject_init(n$3:class A *) virtual [line 57]\n *&a:class A *=n$4 [line 57]\n REMOVE_TEMPS(n$3,n$4); [line 57]\n " shape="box"] - - - 28 -> 27 ; -27 [label="27: Message Call: retain \n n$1=*&a:class A * [line 58]\n n$2=_fun___objc_retain(n$1:class A *) [line 58]\n REMOVE_TEMPS(n$1,n$2); [line 58]\n " shape="box"] - - - 27 -> 26 ; -26 [label="26: Message Call: release \n n$0=*&a:class A * [line 59]\n _fun___objc_release(n$0:class A *) [line 59]\n REMOVE_TEMPS(n$0); [line 59]\n NULLIFY(&a,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] + 27 -> 30 ; + 27 -> 31 ; +26 [label="26: DeclStmt \n n$3=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 57]\n n$4=_fun_NSObject_init(n$3:class A *) virtual [line 57]\n *&a:class A *=n$4 [line 57]\n REMOVE_TEMPS(n$3,n$4); [line 57]\n " shape="box"] 26 -> 25 ; -25 [label="25: Exit test6 \n " color=yellow style=filled] +25 [label="25: Message Call: retain \n n$1=*&a:class A * [line 58]\n n$2=_fun___objc_retain(n$1:class A *) [line 58]\n REMOVE_TEMPS(n$1,n$2); [line 58]\n " shape="box"] -24 [label="24: Start test6\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 56]\n NULLIFY(&a,false); [line 56]\n " color=yellow style=filled] + 25 -> 24 ; +24 [label="24: Message Call: release \n n$0=*&a:class A * [line 59]\n _fun___objc_release(n$0:class A *) [line 59]\n REMOVE_TEMPS(n$0); [line 59]\n NULLIFY(&a,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] - 24 -> 28 ; -23 [label="23: DeclStmt \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 51]\n n$2=_fun_NSObject_init(n$1:class A *) virtual [line 51]\n *&a:class A *=n$2 [line 51]\n REMOVE_TEMPS(n$1,n$2); [line 51]\n " shape="box"] + 24 -> 23 ; +23 [label="23: Exit test6 \n " color=yellow style=filled] - 23 -> 22 ; -22 [label="22: Message Call: release \n n$0=*&a:class A * [line 52]\n _fun___objc_release(n$0:class A *) [line 52]\n REMOVE_TEMPS(n$0); [line 52]\n NULLIFY(&a,false); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] +22 [label="22: Start test6\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 56]\n NULLIFY(&a,false); [line 56]\n " color=yellow style=filled] - 22 -> 21 ; -21 [label="21: Exit test5 \n " color=yellow style=filled] + 22 -> 26 ; +21 [label="21: DeclStmt \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 51]\n n$2=_fun_NSObject_init(n$1:class A *) virtual [line 51]\n *&a:class A *=n$2 [line 51]\n REMOVE_TEMPS(n$1,n$2); [line 51]\n " shape="box"] -20 [label="20: Start test5\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 50]\n NULLIFY(&a,false); [line 50]\n " color=yellow style=filled] + 21 -> 20 ; +20 [label="20: Message Call: release \n n$0=*&a:class A * [line 52]\n _fun___objc_release(n$0:class A *) [line 52]\n REMOVE_TEMPS(n$0); [line 52]\n NULLIFY(&a,false); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] - 20 -> 23 ; -19 [label="19: DeclStmt \n n$1=_fun_test() [line 45]\n *&b:class A *=n$1 [line 45]\n REMOVE_TEMPS(n$1); [line 45]\n " shape="box"] + 20 -> 19 ; +19 [label="19: Exit test5 \n " color=yellow style=filled] - 19 -> 18 ; -18 [label="18: Message Call: release \n n$0=*&b:class A * [line 46]\n _fun___objc_release(n$0:class A *) [line 46]\n REMOVE_TEMPS(n$0); [line 46]\n NULLIFY(&b,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] +18 [label="18: Start test5\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 50]\n NULLIFY(&a,false); [line 50]\n " color=yellow style=filled] - 18 -> 17 ; -17 [label="17: Exit test4 \n " color=yellow style=filled] + 18 -> 21 ; +17 [label="17: DeclStmt \n n$1=_fun_test() [line 45]\n *&b:class A *=n$1 [line 45]\n REMOVE_TEMPS(n$1); [line 45]\n " shape="box"] -16 [label="16: Start test4\nFormals: \nLocals: b:class A * \n DECLARE_LOCALS(&return,&b); [line 43]\n NULLIFY(&b,false); [line 43]\n " color=yellow style=filled] + 17 -> 16 ; +16 [label="16: Message Call: release \n n$0=*&b:class A * [line 46]\n _fun___objc_release(n$0:class A *) [line 46]\n REMOVE_TEMPS(n$0); [line 46]\n NULLIFY(&b,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] - 16 -> 19 ; -15 [label="15: DeclStmt \n n$0=_fun_test() [line 40]\n *&b:class A *=n$0 [line 40]\n REMOVE_TEMPS(n$0); [line 40]\n NULLIFY(&b,false); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] + 16 -> 15 ; +15 [label="15: Exit test4 \n " color=yellow style=filled] - 15 -> 14 ; -14 [label="14: Exit test3 \n " color=yellow style=filled] +14 [label="14: Start test4\nFormals: \nLocals: b:class A * \n DECLARE_LOCALS(&return,&b); [line 43]\n NULLIFY(&b,false); [line 43]\n " color=yellow style=filled] -13 [label="13: Start test3\nFormals: \nLocals: b:class A * \n DECLARE_LOCALS(&return,&b); [line 40]\n NULLIFY(&b,false); [line 40]\n " color=yellow style=filled] + 14 -> 17 ; +13 [label="13: DeclStmt \n n$0=_fun_test() [line 40]\n *&b:class A *=n$0 [line 40]\n REMOVE_TEMPS(n$0); [line 40]\n NULLIFY(&b,false); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] - 13 -> 15 ; -12 [label="12: DeclStmt \n n$1=_fun_test() [line 35]\n *&b:class A *=n$1 [line 35]\n REMOVE_TEMPS(n$1); [line 35]\n " shape="box"] + 13 -> 12 ; +12 [label="12: Exit test3 \n " color=yellow style=filled] - 12 -> 11 ; -11 [label="11: BinaryOperatorStmt: Assign \n n$0=*&b:class A * [line 36]\n *&#GB$g:class A *=n$0 [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&b,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +11 [label="11: Start test3\nFormals: \nLocals: b:class A * \n DECLARE_LOCALS(&return,&b); [line 40]\n NULLIFY(&b,false); [line 40]\n " color=yellow style=filled] - 11 -> 10 ; -10 [label="10: Exit test2 \n " color=yellow style=filled] + 11 -> 13 ; +10 [label="10: DeclStmt \n n$1=_fun_test() [line 35]\n *&b:class A *=n$1 [line 35]\n REMOVE_TEMPS(n$1); [line 35]\n " shape="box"] -9 [label="9: Start test2\nFormals: \nLocals: b:class A * \n DECLARE_LOCALS(&return,&b); [line 33]\n NULLIFY(&b,false); [line 33]\n " color=yellow style=filled] + 10 -> 9 ; +9 [label="9: BinaryOperatorStmt: Assign \n n$0=*&b:class A * [line 36]\n *&#GB$g:class A *=n$0 [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&b,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] - 9 -> 12 ; -8 [label="8: DeclStmt \n n$4=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 25]\n n$5=_fun_NSObject_init(n$4:class A *) virtual [line 25]\n *&a:class A *=n$5 [line 25]\n REMOVE_TEMPS(n$4,n$5); [line 25]\n " shape="box"] + 9 -> 8 ; +8 [label="8: Exit test2 \n " color=yellow style=filled] - 8 -> 7 ; -7 [label="7: Message Call: retain \n n$2=*&a:class A * [line 26]\n n$3=_fun___objc_retain(n$2:class A *) [line 26]\n REMOVE_TEMPS(n$2,n$3); [line 26]\n " shape="box"] +7 [label="7: Start test2\nFormals: \nLocals: b:class A * \n DECLARE_LOCALS(&return,&b); [line 33]\n NULLIFY(&b,false); [line 33]\n " color=yellow style=filled] - 7 -> 6 ; -6 [label="6: Message Call: release \n n$1=*&a:class A * [line 27]\n _fun___objc_release(n$1:class A *) [line 27]\n REMOVE_TEMPS(n$1); [line 27]\n " shape="box"] + 7 -> 10 ; +6 [label="6: DeclStmt \n n$4=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 25]\n n$5=_fun_NSObject_init(n$4:class A *) virtual [line 25]\n *&a:class A *=n$5 [line 25]\n REMOVE_TEMPS(n$4,n$5); [line 25]\n " shape="box"] 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&a:class A * [line 29]\n *&return:class A *=n$0 [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&a,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +5 [label="5: Message Call: retain \n n$2=*&a:class A * [line 26]\n n$3=_fun___objc_retain(n$2:class A *) [line 26]\n REMOVE_TEMPS(n$2,n$3); [line 26]\n " shape="box"] 5 -> 4 ; -4 [label="4: Exit test \n " color=yellow style=filled] +4 [label="4: Message Call: release \n n$1=*&a:class A * [line 27]\n _fun___objc_release(n$1:class A *) [line 27]\n REMOVE_TEMPS(n$1); [line 27]\n " shape="box"] -3 [label="3: Start test\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 24]\n NULLIFY(&a,false); [line 24]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Return Stmt \n n$0=*&a:class A * [line 29]\n *&return:class A *=n$0 [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&a,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] - 3 -> 8 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit test \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start test\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 24]\n NULLIFY(&a,false); [line 24]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 6 ; } diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.dot index 749035e1d..e0769049a 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.dot @@ -1,80 +1,73 @@ digraph iCFG { -21 [label="21: Return Stmt \n n$0=_fun___builtin___CFStringMakeConstantString(\"Icon\":char *) [line 41]\n n$1=_fun_CTFontCreateWithName(n$0:struct __CFString *,17.000000:double ,0:struct CGAffineTransform *) [line 41]\n n$2=_fun___objc_cast(n$1:void *,sizeof(void ):unsigned long ) [line 41]\n *&return:struct __CTFont *=n$2 [line 41]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] +19 [label="19: Return Stmt \n n$0=_fun___builtin___CFStringMakeConstantString(\"Icon\":char *) [line 41]\n n$1=_fun_CTFontCreateWithName(n$0:struct __CFString *,17.000000:double ,0:struct CGAffineTransform *) [line 41]\n n$2=_fun___objc_cast(n$1:void *,sizeof(void ):unsigned long ) [line 41]\n *&return:struct __CTFont *=n$2 [line 41]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] - 21 -> 20 ; -20 [label="20: Exit cfautorelease_test \n " color=yellow style=filled] + 19 -> 18 ; +18 [label="18: Exit cfautorelease_test \n " color=yellow style=filled] -19 [label="19: Start cfautorelease_test\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 40]\n " color=yellow style=filled] +17 [label="17: Start cfautorelease_test\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 40]\n " color=yellow style=filled] - 19 -> 21 ; -18 [label="18: DeclStmt \n n$8=_fun_CFHTTPMessageCopyAllHeaderFields(0:struct __CFHTTPMessage *) [line 36]\n *&ref:struct __CFDictionary *=n$8 [line 36]\n REMOVE_TEMPS(n$8); [line 36]\n " shape="box"] + 17 -> 19 ; +16 [label="16: DeclStmt \n n$8=_fun_CFHTTPMessageCopyAllHeaderFields(0:struct __CFHTTPMessage *) [line 36]\n *&ref:struct __CFDictionary *=n$8 [line 36]\n REMOVE_TEMPS(n$8); [line 36]\n " shape="box"] - 18 -> 17 ; -17 [label="17: Call _fun_CFBridgingRelease \n n$6=*&ref:struct __CFDictionary * [line 37]\n n$7=_fun___objc_cast(n$6:void *,sizeof(struct objc_object ):unsigned long ) [line 37]\n REMOVE_TEMPS(n$6,n$7); [line 37]\n NULLIFY(&ref,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] + 16 -> 15 ; +15 [label="15: Call _fun_CFBridgingRelease \n n$6=*&ref:struct __CFDictionary * [line 37]\n n$7=_fun___objc_cast(n$6:void *,sizeof(struct objc_object ):unsigned long ) [line 37]\n REMOVE_TEMPS(n$6,n$7); [line 37]\n NULLIFY(&ref,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] - 17 -> 16 ; -16 [label="16: Exit TollBridgeExample__readHTTPHeader \n " color=yellow style=filled] + 15 -> 14 ; +14 [label="14: Exit TollBridgeExample__readHTTPHeader \n " color=yellow style=filled] -15 [label="15: Start TollBridgeExample__readHTTPHeader\nFormals: self:class TollBridgeExample *\nLocals: ref:struct __CFDictionary * \n DECLARE_LOCALS(&return,&ref); [line 34]\n NULLIFY(&ref,false); [line 34]\n NULLIFY(&self,false); [line 34]\n " color=yellow style=filled] +13 [label="13: Start TollBridgeExample__readHTTPHeader\nFormals: self:class TollBridgeExample *\nLocals: ref:struct __CFDictionary * \n DECLARE_LOCALS(&return,&ref); [line 34]\n NULLIFY(&ref,false); [line 34]\n NULLIFY(&self,false); [line 34]\n " color=yellow style=filled] - 15 -> 18 ; -14 [label="14: DeclStmt \n n$5=_fun___objc_alloc_no_fail(sizeof(class NSLocale ):unsigned long ) [line 30]\n *&observer:struct objc_object *=n$5 [line 30]\n REMOVE_TEMPS(n$5); [line 30]\n " shape="box"] + 13 -> 16 ; +12 [label="12: DeclStmt \n n$5=_fun___objc_alloc_no_fail(sizeof(class NSLocale ):unsigned long ) [line 30]\n *&observer:struct objc_object *=n$5 [line 30]\n REMOVE_TEMPS(n$5); [line 30]\n " shape="box"] - 14 -> 13 ; -13 [label="13: DeclStmt \n n$4=*&observer:struct objc_object * [line 31]\n *&a:struct __CFLocale *=n$4 [line 31]\n REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&a,false); [line 31]\n NULLIFY(&observer,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] + 12 -> 11 ; +11 [label="11: DeclStmt \n n$4=*&observer:struct objc_object * [line 31]\n *&a:struct __CFLocale *=n$4 [line 31]\n REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&a,false); [line 31]\n NULLIFY(&observer,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 13 -> 12 ; -12 [label="12: Exit TollBridgeExample_brideRetained \n " color=yellow style=filled] + 11 -> 10 ; +10 [label="10: Exit TollBridgeExample_brideRetained \n " color=yellow style=filled] -11 [label="11: Start TollBridgeExample_brideRetained\nFormals: self:class TollBridgeExample *\nLocals: a:struct __CFLocale * observer:struct objc_object * \n DECLARE_LOCALS(&return,&a,&observer); [line 29]\n NULLIFY(&a,false); [line 29]\n NULLIFY(&observer,false); [line 29]\n NULLIFY(&self,false); [line 29]\n " color=yellow style=filled] +9 [label="9: Start TollBridgeExample_brideRetained\nFormals: self:class TollBridgeExample *\nLocals: a:struct __CFLocale * observer:struct objc_object * \n DECLARE_LOCALS(&return,&a,&observer); [line 29]\n NULLIFY(&a,false); [line 29]\n NULLIFY(&observer,false); [line 29]\n NULLIFY(&self,false); [line 29]\n " color=yellow style=filled] - 11 -> 14 ; -10 [label="10: DeclStmt \n n$3=_fun_CFLocaleCreate(0:struct __CFAllocator *,0:struct __CFString *) [line 25]\n *&nameRef:struct __CFLocale *=n$3 [line 25]\n REMOVE_TEMPS(n$3); [line 25]\n " shape="box"] + 9 -> 12 ; +8 [label="8: DeclStmt \n n$3=_fun_CFLocaleCreate(0:struct __CFAllocator *,0:struct __CFString *) [line 25]\n *&nameRef:struct __CFLocale *=n$3 [line 25]\n REMOVE_TEMPS(n$3); [line 25]\n " shape="box"] - 10 -> 9 ; -9 [label="9: DeclStmt \n n$2=*&nameRef:struct __CFLocale * [line 26]\n *&a:class NSLocale *=(struct __CFLocale *)n$2 [line 26]\n REMOVE_TEMPS(n$2); [line 26]\n NULLIFY(&a,false); [line 26]\n NULLIFY(&nameRef,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] + 8 -> 7 ; +7 [label="7: DeclStmt \n n$2=*&nameRef:struct __CFLocale * [line 26]\n *&a:class NSLocale *=(struct __CFLocale *)n$2 [line 26]\n REMOVE_TEMPS(n$2); [line 26]\n NULLIFY(&a,false); [line 26]\n NULLIFY(&nameRef,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] - 9 -> 8 ; -8 [label="8: Exit TollBridgeExample_bridge \n " color=yellow style=filled] + 7 -> 6 ; +6 [label="6: Exit TollBridgeExample_bridge \n " color=yellow style=filled] -7 [label="7: Start TollBridgeExample_bridge\nFormals: self:class TollBridgeExample *\nLocals: a:class NSLocale * nameRef:struct __CFLocale * \n DECLARE_LOCALS(&return,&a,&nameRef); [line 24]\n NULLIFY(&a,false); [line 24]\n NULLIFY(&nameRef,false); [line 24]\n NULLIFY(&self,false); [line 24]\n " color=yellow style=filled] +5 [label="5: Start TollBridgeExample_bridge\nFormals: self:class TollBridgeExample *\nLocals: a:class NSLocale * nameRef:struct __CFLocale * \n DECLARE_LOCALS(&return,&a,&nameRef); [line 24]\n NULLIFY(&a,false); [line 24]\n NULLIFY(&nameRef,false); [line 24]\n NULLIFY(&self,false); [line 24]\n " color=yellow style=filled] - 7 -> 10 ; -6 [label="6: DeclStmt \n n$1=_fun_CFLocaleCreate(0:struct __CFAllocator *,0:struct __CFString *) [line 20]\n *&nameRef:struct __CFLocale *=n$1 [line 20]\n REMOVE_TEMPS(n$1); [line 20]\n " shape="box"] + 5 -> 8 ; +4 [label="4: DeclStmt \n n$1=_fun_CFLocaleCreate(0:struct __CFAllocator *,0:struct __CFString *) [line 20]\n *&nameRef:struct __CFLocale *=n$1 [line 20]\n REMOVE_TEMPS(n$1); [line 20]\n " shape="box"] - 6 -> 5 ; -5 [label="5: DeclStmt \n n$0=*&nameRef:struct __CFLocale * [line 21]\n *&a:class NSLocale *=(struct __CFLocale *)n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&a,false); [line 21]\n NULLIFY(&nameRef,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] + 4 -> 3 ; +3 [label="3: DeclStmt \n n$0=*&nameRef:struct __CFLocale * [line 21]\n *&a:class NSLocale *=(struct __CFLocale *)n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&a,false); [line 21]\n NULLIFY(&nameRef,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit TollBridgeExample_bridgeTransfer \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit TollBridgeExample_bridgeTransfer \n " color=yellow style=filled] -3 [label="3: Start TollBridgeExample_bridgeTransfer\nFormals: self:class TollBridgeExample *\nLocals: a:class NSLocale * nameRef:struct __CFLocale * \n DECLARE_LOCALS(&return,&a,&nameRef); [line 19]\n NULLIFY(&a,false); [line 19]\n NULLIFY(&nameRef,false); [line 19]\n NULLIFY(&self,false); [line 19]\n " color=yellow style=filled] +1 [label="1: Start TollBridgeExample_bridgeTransfer\nFormals: self:class TollBridgeExample *\nLocals: a:class NSLocale * nameRef:struct __CFLocale * \n DECLARE_LOCALS(&return,&a,&nameRef); [line 19]\n NULLIFY(&a,false); [line 19]\n NULLIFY(&nameRef,false); [line 19]\n NULLIFY(&self,false); [line 19]\n " color=yellow style=filled] - 3 -> 6 ; -2 [label="2: Exit TollBridgeExample_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start TollBridgeExample_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 4 ; } diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.dot index 84e15d776..a61b92c81 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.dot @@ -1,66 +1,59 @@ digraph iCFG { -17 [label="17: DeclStmt \n n$3=_fun_A_newA() [line 42]\n *&a1:class A *=n$3 [line 42]\n REMOVE_TEMPS(n$3); [line 42]\n " shape="box"] - - - 17 -> 16 ; -16 [label="16: DeclStmt \n n$2=*&a1:class A * [line 43]\n _fun___objc_retain(n$2:class A *) [line 43]\n *&aa:class A *=n$2 [line 43]\n REMOVE_TEMPS(n$2); [line 43]\n NULLIFY(&a1,false); [line 43]\n NULLIFY(&aa,false); [line 43]\n " shape="box"] - - - 16 -> 15 ; -15 [label="15: DeclStmt \n n$1=_fun_A_someA() [line 44]\n _fun___objc_retain(n$1:class A *) [line 44]\n *&a2:class A *=n$1 [line 44]\n REMOVE_TEMPS(n$1); [line 44]\n " shape="box"] +15 [label="15: DeclStmt \n n$3=_fun_A_newA() [line 42]\n *&a1:class A *=n$3 [line 42]\n REMOVE_TEMPS(n$3); [line 42]\n " shape="box"] 15 -> 14 ; -14 [label="14: DeclStmt \n n$0=*&a2:class A * [line 45]\n _fun___objc_retain(n$0:class A *) [line 45]\n *&ab:class A *=n$0 [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n NULLIFY(&a2,false); [line 45]\n NULLIFY(&ab,false); [line 45]\n " shape="box"] +14 [label="14: DeclStmt \n n$2=*&a1:class A * [line 43]\n _fun___objc_retain(n$2:class A *) [line 43]\n *&aa:class A *=n$2 [line 43]\n REMOVE_TEMPS(n$2); [line 43]\n NULLIFY(&a1,false); [line 43]\n NULLIFY(&aa,false); [line 43]\n " shape="box"] 14 -> 13 ; -13 [label="13: Return Stmt \n *&return:int =0 [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] +13 [label="13: DeclStmt \n n$1=_fun_A_someA() [line 44]\n _fun___objc_retain(n$1:class A *) [line 44]\n *&a2:class A *=n$1 [line 44]\n REMOVE_TEMPS(n$1); [line 44]\n " shape="box"] 13 -> 12 ; -12 [label="12: Exit main \n " color=yellow style=filled] +12 [label="12: DeclStmt \n n$0=*&a2:class A * [line 45]\n _fun___objc_retain(n$0:class A *) [line 45]\n *&ab:class A *=n$0 [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n NULLIFY(&a2,false); [line 45]\n NULLIFY(&ab,false); [line 45]\n " shape="box"] -11 [label="11: Start main\nFormals: \nLocals: ab:class A * a2:class A * aa:class A * a1:class A * \n DECLARE_LOCALS(&return,&ab,&a2,&aa,&a1); [line 35]\n NULLIFY(&a1,false); [line 35]\n NULLIFY(&a2,false); [line 35]\n NULLIFY(&aa,false); [line 35]\n NULLIFY(&ab,false); [line 35]\n " color=yellow style=filled] + 12 -> 11 ; +11 [label="11: Return Stmt \n *&return:int =0 [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] - 11 -> 17 ; -10 [label="10: DeclStmt \n n$5=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 28]\n n$6=_fun_NSObject_init(n$5:class A *) virtual [line 28]\n *&a:class A *=n$6 [line 28]\n REMOVE_TEMPS(n$5,n$6); [line 28]\n " shape="box"] + 11 -> 10 ; +10 [label="10: Exit main \n " color=yellow style=filled] - 10 -> 9 ; -9 [label="9: Return Stmt \n n$3=*&a:class A * [line 30]\n *&return:class A *=n$3 [line 30]\n n$4=_fun___set_autorelease_attribute(n$3:class A *) [line 30]\n REMOVE_TEMPS(n$3,n$4); [line 30]\n NULLIFY(&a,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +9 [label="9: Start main\nFormals: \nLocals: ab:class A * a2:class A * aa:class A * a1:class A * \n DECLARE_LOCALS(&return,&ab,&a2,&aa,&a1); [line 35]\n NULLIFY(&a1,false); [line 35]\n NULLIFY(&a2,false); [line 35]\n NULLIFY(&aa,false); [line 35]\n NULLIFY(&ab,false); [line 35]\n " color=yellow style=filled] - 9 -> 8 ; -8 [label="8: Exit A_someA \n " color=yellow style=filled] + 9 -> 15 ; +8 [label="8: DeclStmt \n n$5=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 28]\n n$6=_fun_NSObject_init(n$5:class A *) virtual [line 28]\n *&a:class A *=n$6 [line 28]\n REMOVE_TEMPS(n$5,n$6); [line 28]\n " shape="box"] -7 [label="7: Start A_someA\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 27]\n NULLIFY(&a,false); [line 27]\n " color=yellow style=filled] + 8 -> 7 ; +7 [label="7: Return Stmt \n n$3=*&a:class A * [line 30]\n *&return:class A *=n$3 [line 30]\n n$4=_fun___set_autorelease_attribute(n$3:class A *) [line 30]\n REMOVE_TEMPS(n$3,n$4); [line 30]\n NULLIFY(&a,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] - 7 -> 10 ; -6 [label="6: DeclStmt \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 23]\n n$2=_fun_NSObject_init(n$1:class A *) virtual [line 23]\n *&a:class A *=n$2 [line 23]\n REMOVE_TEMPS(n$1,n$2); [line 23]\n " shape="box"] + 7 -> 6 ; +6 [label="6: Exit A_someA \n " color=yellow style=filled] - 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&a:class A * [line 24]\n *&return:class A *=n$0 [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&a,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +5 [label="5: Start A_someA\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 27]\n NULLIFY(&a,false); [line 27]\n " color=yellow style=filled] - 5 -> 4 ; -4 [label="4: Exit A_newA \n " color=yellow style=filled] + 5 -> 8 ; +4 [label="4: DeclStmt \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 23]\n n$2=_fun_NSObject_init(n$1:class A *) virtual [line 23]\n *&a:class A *=n$2 [line 23]\n REMOVE_TEMPS(n$1,n$2); [line 23]\n " shape="box"] -3 [label="3: Start A_newA\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 22]\n NULLIFY(&a,false); [line 22]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Return Stmt \n n$0=*&a:class A * [line 24]\n *&return:class A *=n$0 [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&a,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 3 -> 6 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_newA \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start A_newA\nFormals: \nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 22]\n NULLIFY(&a,false); [line 22]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 4 ; } diff --git a/infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.dot b/infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.dot index bf2df6237..43914ef0e 100644 --- a/infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.dot +++ b/infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.dot @@ -1,65 +1,51 @@ digraph iCFG { -17 [label="17: Call _fun___infer_assume \n n$1=*&callback:_fn_ (*) [line 46]\n n$2=_fun___infer_assume((n$1 != 0):_fn_ (*)) [line 46]\n REMOVE_TEMPS(n$1,n$2); [line 46]\n " shape="box"] - - - 17 -> 16 ; -16 [label="16: Call n$0 \n n$0=*&callback:_fn_ (*) [line 46]\n n$0(0:class NSError *,0:struct objc_object *) [line 46]\n REMOVE_TEMPS(n$0); [line 46]\n NULLIFY(&callback,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] - - - 16 -> 15 ; -15 [label="15: Exit test \n " color=yellow style=filled] - - -14 [label="14: Start test\nFormals: callback:_fn_ (*)\nLocals: \n DECLARE_LOCALS(&return); [line 46]\n " color=yellow style=filled] - - - 14 -> 17 ; -13 [label="13: Call _fun___infer_assume \n n$5=*&a:class A * [line 38]\n n$6=_fun___infer_assume((n$5 != 0):class A *) [line 38]\n REMOVE_TEMPS(n$5,n$6); [line 38]\n " shape="box"] +13 [label="13: Call _fun___infer_assume \n n$1=*&callback:_fn_ (*) [line 46]\n n$2=_fun___infer_assume((n$1 != 0):_fn_ (*)) [line 46]\n REMOVE_TEMPS(n$1,n$2); [line 46]\n " shape="box"] 13 -> 12 ; -12 [label="12: DeclStmt \n n$3=*&a:class A * [line 39]\n n$4=_fun_A_getA(n$3:class A *) virtual [line 39]\n _fun___objc_retain(n$4:class A *) [line 39]\n *&a1:class A *=n$4 [line 39]\n REMOVE_TEMPS(n$3,n$4); [line 39]\n NULLIFY(&a,false); [line 39]\n " shape="box"] +12 [label="12: Call n$0 \n n$0=*&callback:_fn_ (*) [line 46]\n n$0(0:class NSError *,0:struct objc_object *) [line 46]\n REMOVE_TEMPS(n$0); [line 46]\n NULLIFY(&callback,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] 12 -> 11 ; -11 [label="11: DeclStmt \n n$1=*&a1:class A * [line 40]\n n$2=*n$1.x:int [line 40]\n *&y:int =n$2 [line 40]\n REMOVE_TEMPS(n$1,n$2); [line 40]\n NULLIFY(&a1,false); [line 40]\n NULLIFY(&y,false); [line 40]\n " shape="box"] +11 [label="11: Exit test \n " color=yellow style=filled] - 11 -> 10 ; -10 [label="10: Return Stmt \n n$0=*&self:class C * [line 41]\n *&return:struct objc_object *=n$0 [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n NULLIFY(&self,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] +10 [label="10: Start test\nFormals: callback:_fn_ (*)\nLocals: \n DECLARE_LOCALS(&return); [line 46]\n " color=yellow style=filled] - 10 -> 9 ; -9 [label="9: Exit C_initWithCoder:and: \n " color=yellow style=filled] + 10 -> 13 ; +9 [label="9: Call _fun___infer_assume \n n$5=*&a:class A * [line 38]\n n$6=_fun___infer_assume((n$5 != 0):class A *) [line 38]\n REMOVE_TEMPS(n$5,n$6); [line 38]\n " shape="box"] -8 [label="8: Start C_initWithCoder:and:\nFormals: self:class C * aDecoder:class NSString * a:class A *\nLocals: y:int a1:class A * \n DECLARE_LOCALS(&return,&y,&a1); [line 38]\n NULLIFY(&a1,false); [line 38]\n NULLIFY(&aDecoder,false); [line 38]\n NULLIFY(&y,false); [line 38]\n " color=yellow style=filled] + 9 -> 8 ; +8 [label="8: DeclStmt \n n$3=*&a:class A * [line 39]\n n$4=_fun_A_getA(n$3:class A *) virtual [line 39]\n _fun___objc_retain(n$4:class A *) [line 39]\n *&a1:class A *=n$4 [line 39]\n REMOVE_TEMPS(n$3,n$4); [line 39]\n NULLIFY(&a,false); [line 39]\n " shape="box"] - 8 -> 13 ; -7 [label="7: Exit C_frontendChecks \n " color=yellow style=filled] + 8 -> 7 ; +7 [label="7: DeclStmt \n n$1=*&a1:class A * [line 40]\n n$2=*n$1.x:int [line 40]\n *&y:int =n$2 [line 40]\n REMOVE_TEMPS(n$1,n$2); [line 40]\n NULLIFY(&a1,false); [line 40]\n NULLIFY(&y,false); [line 40]\n " shape="box"] -6 [label="6: Start C_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] + 7 -> 6 ; +6 [label="6: Return Stmt \n n$0=*&self:class C * [line 41]\n *&return:struct objc_object *=n$0 [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n NULLIFY(&self,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] - 6 -> 7 ; -5 [label="5: Return Stmt \n n$0=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 26]\n n$1=_fun_NSObject_init(n$0:class A *) virtual [line 26]\n *&return:class A *=n$1 [line 26]\n n$2=_fun___set_autorelease_attribute(n$1:class A *) [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] + 6 -> 5 ; +5 [label="5: Exit C_initWithCoder:and: \n " color=yellow style=filled] - 5 -> 4 ; -4 [label="4: Exit A_getA \n " color=yellow style=filled] +4 [label="4: Start C_initWithCoder:and:\nFormals: self:class C * aDecoder:class NSString * a:class A *\nLocals: y:int a1:class A * \n DECLARE_LOCALS(&return,&y,&a1); [line 38]\n NULLIFY(&a1,false); [line 38]\n NULLIFY(&aDecoder,false); [line 38]\n NULLIFY(&y,false); [line 38]\n " color=yellow style=filled] -3 [label="3: Start A_getA\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 25]\n NULLIFY(&self,false); [line 25]\n " color=yellow style=filled] + 4 -> 9 ; +3 [label="3: Return Stmt \n n$0=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 26]\n n$1=_fun_NSObject_init(n$0:class A *) virtual [line 26]\n *&return:class A *=n$1 [line 26]\n n$2=_fun___set_autorelease_attribute(n$1:class A *) [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] - 3 -> 5 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_getA \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start A_getA\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 25]\n NULLIFY(&self,false); [line 25]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.dot b/infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.dot index 42c532c07..ca1a7e105 100644 --- a/infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.dot +++ b/infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.dot @@ -1,28 +1,21 @@ digraph iCFG { -7 [label="7: DeclStmt \n n$2=_fun_malloc_no_fail(sizeof(struct Person ):struct Person ) [line 25]\n *&person:struct Person *=n$2 [line 25]\n REMOVE_TEMPS(n$2); [line 25]\n " shape="box"] - - - 7 -> 6 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$1=*&person:struct Person * [line 26]\n *n$1.x:int =10 [line 26]\n REMOVE_TEMPS(n$1); [line 26]\n " shape="box"] - - - 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&person:struct Person * [line 27]\n *&return:struct Person *=n$0 [line 27]\n REMOVE_TEMPS(n$0); [line 27]\n NULLIFY(&person,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +5 [label="5: DeclStmt \n n$2=_fun_malloc_no_fail(sizeof(struct Person ):struct Person ) [line 25]\n *&person:struct Person *=n$2 [line 25]\n REMOVE_TEMPS(n$2); [line 25]\n " shape="box"] 5 -> 4 ; -4 [label="4: Exit C_test \n " color=yellow style=filled] +4 [label="4: BinaryOperatorStmt: Assign \n n$1=*&person:struct Person * [line 26]\n *n$1.x:int =10 [line 26]\n REMOVE_TEMPS(n$1); [line 26]\n " shape="box"] -3 [label="3: Start C_test\nFormals: self:class C *\nLocals: person:struct Person * \n DECLARE_LOCALS(&return,&person); [line 24]\n NULLIFY(&person,false); [line 24]\n NULLIFY(&self,false); [line 24]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Return Stmt \n n$0=*&person:struct Person * [line 27]\n *&return:struct Person *=n$0 [line 27]\n REMOVE_TEMPS(n$0); [line 27]\n NULLIFY(&person,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] - 3 -> 7 ; -2 [label="2: Exit C_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit C_test \n " color=yellow style=filled] -1 [label="1: Start C_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start C_test\nFormals: self:class C *\nLocals: person:struct Person * \n DECLARE_LOCALS(&return,&person); [line 24]\n NULLIFY(&person,false); [line 24]\n NULLIFY(&self,false); [line 24]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 5 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot b/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot index 01b4a8962..2437dfb86 100644 --- a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot +++ b/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot @@ -1,443 +1,436 @@ digraph iCFG { -107 [label="107: DeclStmt \n n$20=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n _fun___objc_retain(n$20:class NSString *) [line 36]\n *&__assert_fn__:class NSString *=n$20 [line 36]\n REMOVE_TEMPS(n$20); [line 36]\n " shape="box"] - - - 107 -> 102 ; - 107 -> 103 ; -106 [label="106: BinaryOperatorStmt: Assign \n n$18=*&SIL_temp_conditional___101:class NSString * [line 36]\n NULLIFY(&SIL_temp_conditional___101,true); [line 36]\n _fun___objc_retain(n$18:class NSString *) [line 36]\n n$19=*&__assert_fn__:class NSString * [line 36]\n *&__assert_fn__:class NSString *=n$18 [line 36]\n _fun___objc_release(n$19:class NSString *) [line 36]\n REMOVE_TEMPS(n$18,n$19); [line 36]\n NULLIFY(&__assert_fn__,false); [line 36]\n " shape="box"] - - - 106 -> 100 ; -105 [label="105: ConditinalStmt Branch \n n$17=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n DECLARE_LOCALS(&SIL_temp_conditional___101); [line 36]\n *&SIL_temp_conditional___101:class NSString *=n$17 [line 36]\n REMOVE_TEMPS(n$17); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +105 [label="105: DeclStmt \n n$20=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n _fun___objc_retain(n$20:class NSString *) [line 36]\n *&__assert_fn__:class NSString *=n$20 [line 36]\n REMOVE_TEMPS(n$20); [line 36]\n " shape="box"] + 105 -> 100 ; 105 -> 101 ; -104 [label="104: ConditinalStmt Branch \n n$16=*&__assert_fn__:class NSString * [line 36]\n DECLARE_LOCALS(&SIL_temp_conditional___101); [line 36]\n *&SIL_temp_conditional___101:class NSString *=n$16 [line 36]\n REMOVE_TEMPS(n$16); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +104 [label="104: BinaryOperatorStmt: Assign \n n$18=*&SIL_temp_conditional___99:class NSString * [line 36]\n NULLIFY(&SIL_temp_conditional___99,true); [line 36]\n _fun___objc_retain(n$18:class NSString *) [line 36]\n n$19=*&__assert_fn__:class NSString * [line 36]\n *&__assert_fn__:class NSString *=n$18 [line 36]\n _fun___objc_release(n$19:class NSString *) [line 36]\n REMOVE_TEMPS(n$18,n$19); [line 36]\n NULLIFY(&__assert_fn__,false); [line 36]\n " shape="box"] - 104 -> 101 ; -103 [label="103: Prune (false branch) \n n$15=*&__assert_fn__:class NSString * [line 36]\n PRUNE((n$15 == 0), false); [line 36]\n REMOVE_TEMPS(n$15); [line 36]\n " shape="invhouse"] + 104 -> 98 ; +103 [label="103: ConditinalStmt Branch \n n$17=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n DECLARE_LOCALS(&SIL_temp_conditional___99); [line 36]\n *&SIL_temp_conditional___99:class NSString *=n$17 [line 36]\n REMOVE_TEMPS(n$17); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] - 103 -> 105 ; -102 [label="102: Prune (true branch) \n n$15=*&__assert_fn__:class NSString * [line 36]\n PRUNE((n$15 != 0), true); [line 36]\n REMOVE_TEMPS(n$15); [line 36]\n " shape="invhouse"] + 103 -> 99 ; +102 [label="102: ConditinalStmt Branch \n n$16=*&__assert_fn__:class NSString * [line 36]\n DECLARE_LOCALS(&SIL_temp_conditional___99); [line 36]\n *&SIL_temp_conditional___99:class NSString *=n$16 [line 36]\n REMOVE_TEMPS(n$16); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] - 102 -> 104 ; -101 [label="101: + \n " ] + 102 -> 99 ; +101 [label="101: Prune (false branch) \n n$15=*&__assert_fn__:class NSString * [line 36]\n PRUNE((n$15 == 0), false); [line 36]\n REMOVE_TEMPS(n$15); [line 36]\n " shape="invhouse"] - 101 -> 106 ; -100 [label="100: DeclStmt \n n$14=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 36]\n _fun___objc_retain(n$14:class NSString *) [line 36]\n *&__assert_file__:class NSString *=n$14 [line 36]\n REMOVE_TEMPS(n$14); [line 36]\n " shape="box"] + 101 -> 103 ; +100 [label="100: Prune (true branch) \n n$15=*&__assert_fn__:class NSString * [line 36]\n PRUNE((n$15 != 0), true); [line 36]\n REMOVE_TEMPS(n$15); [line 36]\n " shape="invhouse"] - 100 -> 95 ; - 100 -> 96 ; -99 [label="99: BinaryOperatorStmt: Assign \n n$12=*&SIL_temp_conditional___94:class NSString * [line 36]\n NULLIFY(&SIL_temp_conditional___94,true); [line 36]\n _fun___objc_retain(n$12:class NSString *) [line 36]\n n$13=*&__assert_file__:class NSString * [line 36]\n *&__assert_file__:class NSString *=n$12 [line 36]\n _fun___objc_release(n$13:class NSString *) [line 36]\n REMOVE_TEMPS(n$12,n$13); [line 36]\n NULLIFY(&__assert_file__,false); [line 36]\n " shape="box"] + 100 -> 102 ; +99 [label="99: + \n " ] - 99 -> 93 ; -98 [label="98: ConditinalStmt Branch \n n$11=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n DECLARE_LOCALS(&SIL_temp_conditional___94); [line 36]\n *&SIL_temp_conditional___94:class NSString *=n$11 [line 36]\n REMOVE_TEMPS(n$11); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] + 99 -> 104 ; +98 [label="98: DeclStmt \n n$14=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 36]\n _fun___objc_retain(n$14:class NSString *) [line 36]\n *&__assert_file__:class NSString *=n$14 [line 36]\n REMOVE_TEMPS(n$14); [line 36]\n " shape="box"] + 98 -> 93 ; 98 -> 94 ; -97 [label="97: ConditinalStmt Branch \n n$10=*&__assert_file__:class NSString * [line 36]\n DECLARE_LOCALS(&SIL_temp_conditional___94); [line 36]\n *&SIL_temp_conditional___94:class NSString *=n$10 [line 36]\n REMOVE_TEMPS(n$10); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +97 [label="97: BinaryOperatorStmt: Assign \n n$12=*&SIL_temp_conditional___92:class NSString * [line 36]\n NULLIFY(&SIL_temp_conditional___92,true); [line 36]\n _fun___objc_retain(n$12:class NSString *) [line 36]\n n$13=*&__assert_file__:class NSString * [line 36]\n *&__assert_file__:class NSString *=n$12 [line 36]\n _fun___objc_release(n$13:class NSString *) [line 36]\n REMOVE_TEMPS(n$12,n$13); [line 36]\n NULLIFY(&__assert_file__,false); [line 36]\n " shape="box"] - 97 -> 94 ; -96 [label="96: Prune (false branch) \n n$9=*&__assert_file__:class NSString * [line 36]\n PRUNE((n$9 == 0), false); [line 36]\n REMOVE_TEMPS(n$9); [line 36]\n " shape="invhouse"] + 97 -> 91 ; +96 [label="96: ConditinalStmt Branch \n n$11=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n DECLARE_LOCALS(&SIL_temp_conditional___92); [line 36]\n *&SIL_temp_conditional___92:class NSString *=n$11 [line 36]\n REMOVE_TEMPS(n$11); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] - 96 -> 98 ; -95 [label="95: Prune (true branch) \n n$9=*&__assert_file__:class NSString * [line 36]\n PRUNE((n$9 != 0), true); [line 36]\n REMOVE_TEMPS(n$9); [line 36]\n " shape="invhouse"] + 96 -> 92 ; +95 [label="95: ConditinalStmt Branch \n n$10=*&__assert_file__:class NSString * [line 36]\n DECLARE_LOCALS(&SIL_temp_conditional___92); [line 36]\n *&SIL_temp_conditional___92:class NSString *=n$10 [line 36]\n REMOVE_TEMPS(n$10); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] - 95 -> 97 ; -94 [label="94: + \n " ] + 95 -> 92 ; +94 [label="94: Prune (false branch) \n n$9=*&__assert_file__:class NSString * [line 36]\n PRUNE((n$9 == 0), false); [line 36]\n REMOVE_TEMPS(n$9); [line 36]\n " shape="invhouse"] - 94 -> 99 ; -93 [label="93: Assertion failure \n _fun___infer_fail(\"ASSERTION_FAILURE\":void ) [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] + 94 -> 96 ; +93 [label="93: Prune (true branch) \n n$9=*&__assert_file__:class NSString * [line 36]\n PRUNE((n$9 != 0), true); [line 36]\n REMOVE_TEMPS(n$9); [line 36]\n " shape="invhouse"] - 93 -> 80 ; -92 [label="92: Prune (false branch) \n n$3=*&SIL_temp_conditional___86:int [line 36]\n NULLIFY(&SIL_temp_conditional___86,true); [line 36]\n PRUNE((n$3 == 0), false); [line 36]\n REMOVE_TEMPS(n$3); [line 36]\n " shape="invhouse"] + 93 -> 95 ; +92 [label="92: + \n " ] - 92 -> 85 ; -91 [label="91: Prune (true branch) \n n$3=*&SIL_temp_conditional___86:int [line 36]\n NULLIFY(&SIL_temp_conditional___86,true); [line 36]\n PRUNE((n$3 != 0), true); [line 36]\n REMOVE_TEMPS(n$3); [line 36]\n NULLIFY(&target,false); [line 36]\n " shape="invhouse"] + 92 -> 97 ; +91 [label="91: Assertion failure \n _fun___infer_fail(\"ASSERTION_FAILURE\":void ) [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] - 91 -> 107 ; -90 [label="90: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___86); [line 36]\n *&SIL_temp_conditional___86:int =1 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] + 91 -> 78 ; +90 [label="90: Prune (false branch) \n n$3=*&SIL_temp_conditional___84:int [line 36]\n NULLIFY(&SIL_temp_conditional___84,true); [line 36]\n PRUNE((n$3 == 0), false); [line 36]\n REMOVE_TEMPS(n$3); [line 36]\n " shape="invhouse"] - 90 -> 86 ; -89 [label="89: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___86); [line 36]\n *&SIL_temp_conditional___86:int =0 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] + 90 -> 83 ; +89 [label="89: Prune (true branch) \n n$3=*&SIL_temp_conditional___84:int [line 36]\n NULLIFY(&SIL_temp_conditional___84,true); [line 36]\n PRUNE((n$3 != 0), true); [line 36]\n REMOVE_TEMPS(n$3); [line 36]\n NULLIFY(&target,false); [line 36]\n " shape="invhouse"] - 89 -> 86 ; -88 [label="88: Prune (false branch) \n n$2=*&target:class A * [line 36]\n PRUNE((n$2 == 0), false); [line 36]\n REMOVE_TEMPS(n$2); [line 36]\n " shape="invhouse"] + 89 -> 105 ; +88 [label="88: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___84); [line 36]\n *&SIL_temp_conditional___84:int =1 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] - 88 -> 90 ; -87 [label="87: Prune (true branch) \n n$2=*&target:class A * [line 36]\n PRUNE((n$2 != 0), true); [line 36]\n REMOVE_TEMPS(n$2); [line 36]\n " shape="invhouse"] + 88 -> 84 ; +87 [label="87: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___84); [line 36]\n *&SIL_temp_conditional___84:int =0 [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] - 87 -> 89 ; -86 [label="86: + \n " ] + 87 -> 84 ; +86 [label="86: Prune (false branch) \n n$2=*&target:class A * [line 36]\n PRUNE((n$2 == 0), false); [line 36]\n REMOVE_TEMPS(n$2); [line 36]\n " shape="invhouse"] - 86 -> 91 ; - 86 -> 92 ; -85 [label="85: + \n " ] + 86 -> 88 ; +85 [label="85: Prune (true branch) \n n$2=*&target:class A * [line 36]\n PRUNE((n$2 != 0), true); [line 36]\n REMOVE_TEMPS(n$2); [line 36]\n " shape="invhouse"] - 85 -> 83 ; - 85 -> 84 ; -84 [label="84: Prune (false branch) \n PRUNE((0 == 0), false); [line 36]\n " shape="invhouse"] + 85 -> 87 ; +84 [label="84: + \n " ] - 84 -> 81 ; -83 [label="83: Prune (true branch) \n PRUNE((0 != 0), true); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="invhouse"] + 84 -> 89 ; + 84 -> 90 ; +83 [label="83: + \n " ] + 83 -> 81 ; 83 -> 82 ; -82 [label="82: + \n " ] +82 [label="82: Prune (false branch) \n PRUNE((0 == 0), false); [line 36]\n " shape="invhouse"] - 82 -> 87 ; - 82 -> 88 ; -81 [label="81: Return Stmt \n n$0=*&target:class A * [line 37]\n n$1=_fun_A_x(n$0:class A *) [line 37]\n *&return:int =n$1 [line 37]\n REMOVE_TEMPS(n$0,n$1); [line 37]\n NULLIFY(&target,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] + 82 -> 79 ; +81 [label="81: Prune (true branch) \n PRUNE((0 != 0), true); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="invhouse"] 81 -> 80 ; -80 [label="80: Exit test2 \n " color=yellow style=filled] +80 [label="80: + \n " ] -79 [label="79: Start test2\nFormals: target:class A *\nLocals: __assert_file__:class NSString * __assert_fn__:class NSString * \n DECLARE_LOCALS(&return,&__assert_file__,&__assert_fn__); [line 35]\n NULLIFY(&__assert_file__,false); [line 35]\n NULLIFY(&__assert_fn__,false); [line 35]\n " color=yellow style=filled] + 80 -> 85 ; + 80 -> 86 ; +79 [label="79: Return Stmt \n n$0=*&target:class A * [line 37]\n n$1=_fun_A_x(n$0:class A *) [line 37]\n *&return:int =n$1 [line 37]\n REMOVE_TEMPS(n$0,n$1); [line 37]\n NULLIFY(&target,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] - 79 -> 82 ; -78 [label="78: DeclStmt \n n$19=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n _fun___objc_retain(n$19:class NSString *) [line 31]\n *&__assert_fn__:class NSString *=n$19 [line 31]\n REMOVE_TEMPS(n$19); [line 31]\n " shape="box"] + 79 -> 78 ; +78 [label="78: Exit test2 \n " color=yellow style=filled] - 78 -> 73 ; - 78 -> 74 ; -77 [label="77: BinaryOperatorStmt: Assign \n n$17=*&SIL_temp_conditional___72:class NSString * [line 31]\n NULLIFY(&SIL_temp_conditional___72,true); [line 31]\n _fun___objc_retain(n$17:class NSString *) [line 31]\n n$18=*&__assert_fn__:class NSString * [line 31]\n *&__assert_fn__:class NSString *=n$17 [line 31]\n _fun___objc_release(n$18:class NSString *) [line 31]\n REMOVE_TEMPS(n$17,n$18); [line 31]\n NULLIFY(&__assert_fn__,false); [line 31]\n " shape="box"] +77 [label="77: Start test2\nFormals: target:class A *\nLocals: __assert_file__:class NSString * __assert_fn__:class NSString * \n DECLARE_LOCALS(&return,&__assert_file__,&__assert_fn__); [line 35]\n NULLIFY(&__assert_file__,false); [line 35]\n NULLIFY(&__assert_fn__,false); [line 35]\n " color=yellow style=filled] - 77 -> 71 ; -76 [label="76: ConditinalStmt Branch \n n$16=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n DECLARE_LOCALS(&SIL_temp_conditional___72); [line 31]\n *&SIL_temp_conditional___72:class NSString *=n$16 [line 31]\n REMOVE_TEMPS(n$16); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] + 77 -> 80 ; +76 [label="76: DeclStmt \n n$19=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n _fun___objc_retain(n$19:class NSString *) [line 31]\n *&__assert_fn__:class NSString *=n$19 [line 31]\n REMOVE_TEMPS(n$19); [line 31]\n " shape="box"] + 76 -> 71 ; 76 -> 72 ; -75 [label="75: ConditinalStmt Branch \n n$15=*&__assert_fn__:class NSString * [line 31]\n DECLARE_LOCALS(&SIL_temp_conditional___72); [line 31]\n *&SIL_temp_conditional___72:class NSString *=n$15 [line 31]\n REMOVE_TEMPS(n$15); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +75 [label="75: BinaryOperatorStmt: Assign \n n$17=*&SIL_temp_conditional___70:class NSString * [line 31]\n NULLIFY(&SIL_temp_conditional___70,true); [line 31]\n _fun___objc_retain(n$17:class NSString *) [line 31]\n n$18=*&__assert_fn__:class NSString * [line 31]\n *&__assert_fn__:class NSString *=n$17 [line 31]\n _fun___objc_release(n$18:class NSString *) [line 31]\n REMOVE_TEMPS(n$17,n$18); [line 31]\n NULLIFY(&__assert_fn__,false); [line 31]\n " shape="box"] - 75 -> 72 ; -74 [label="74: Prune (false branch) \n n$14=*&__assert_fn__:class NSString * [line 31]\n PRUNE((n$14 == 0), false); [line 31]\n REMOVE_TEMPS(n$14); [line 31]\n " shape="invhouse"] + 75 -> 69 ; +74 [label="74: ConditinalStmt Branch \n n$16=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n DECLARE_LOCALS(&SIL_temp_conditional___70); [line 31]\n *&SIL_temp_conditional___70:class NSString *=n$16 [line 31]\n REMOVE_TEMPS(n$16); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 74 -> 76 ; -73 [label="73: Prune (true branch) \n n$14=*&__assert_fn__:class NSString * [line 31]\n PRUNE((n$14 != 0), true); [line 31]\n REMOVE_TEMPS(n$14); [line 31]\n " shape="invhouse"] + 74 -> 70 ; +73 [label="73: ConditinalStmt Branch \n n$15=*&__assert_fn__:class NSString * [line 31]\n DECLARE_LOCALS(&SIL_temp_conditional___70); [line 31]\n *&SIL_temp_conditional___70:class NSString *=n$15 [line 31]\n REMOVE_TEMPS(n$15); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 73 -> 75 ; -72 [label="72: + \n " ] + 73 -> 70 ; +72 [label="72: Prune (false branch) \n n$14=*&__assert_fn__:class NSString * [line 31]\n PRUNE((n$14 == 0), false); [line 31]\n REMOVE_TEMPS(n$14); [line 31]\n " shape="invhouse"] - 72 -> 77 ; -71 [label="71: DeclStmt \n n$13=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 31]\n _fun___objc_retain(n$13:class NSString *) [line 31]\n *&__assert_file__:class NSString *=n$13 [line 31]\n REMOVE_TEMPS(n$13); [line 31]\n " shape="box"] + 72 -> 74 ; +71 [label="71: Prune (true branch) \n n$14=*&__assert_fn__:class NSString * [line 31]\n PRUNE((n$14 != 0), true); [line 31]\n REMOVE_TEMPS(n$14); [line 31]\n " shape="invhouse"] - 71 -> 66 ; - 71 -> 67 ; -70 [label="70: BinaryOperatorStmt: Assign \n n$11=*&SIL_temp_conditional___65:class NSString * [line 31]\n NULLIFY(&SIL_temp_conditional___65,true); [line 31]\n _fun___objc_retain(n$11:class NSString *) [line 31]\n n$12=*&__assert_file__:class NSString * [line 31]\n *&__assert_file__:class NSString *=n$11 [line 31]\n _fun___objc_release(n$12:class NSString *) [line 31]\n REMOVE_TEMPS(n$11,n$12); [line 31]\n NULLIFY(&__assert_file__,false); [line 31]\n " shape="box"] + 71 -> 73 ; +70 [label="70: + \n " ] - 70 -> 64 ; -69 [label="69: ConditinalStmt Branch \n n$10=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n DECLARE_LOCALS(&SIL_temp_conditional___65); [line 31]\n *&SIL_temp_conditional___65:class NSString *=n$10 [line 31]\n REMOVE_TEMPS(n$10); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] + 70 -> 75 ; +69 [label="69: DeclStmt \n n$13=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 31]\n _fun___objc_retain(n$13:class NSString *) [line 31]\n *&__assert_file__:class NSString *=n$13 [line 31]\n REMOVE_TEMPS(n$13); [line 31]\n " shape="box"] + 69 -> 64 ; 69 -> 65 ; -68 [label="68: ConditinalStmt Branch \n n$9=*&__assert_file__:class NSString * [line 31]\n DECLARE_LOCALS(&SIL_temp_conditional___65); [line 31]\n *&SIL_temp_conditional___65:class NSString *=n$9 [line 31]\n REMOVE_TEMPS(n$9); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +68 [label="68: BinaryOperatorStmt: Assign \n n$11=*&SIL_temp_conditional___63:class NSString * [line 31]\n NULLIFY(&SIL_temp_conditional___63,true); [line 31]\n _fun___objc_retain(n$11:class NSString *) [line 31]\n n$12=*&__assert_file__:class NSString * [line 31]\n *&__assert_file__:class NSString *=n$11 [line 31]\n _fun___objc_release(n$12:class NSString *) [line 31]\n REMOVE_TEMPS(n$11,n$12); [line 31]\n NULLIFY(&__assert_file__,false); [line 31]\n " shape="box"] - 68 -> 65 ; -67 [label="67: Prune (false branch) \n n$8=*&__assert_file__:class NSString * [line 31]\n PRUNE((n$8 == 0), false); [line 31]\n REMOVE_TEMPS(n$8); [line 31]\n " shape="invhouse"] + 68 -> 62 ; +67 [label="67: ConditinalStmt Branch \n n$10=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n DECLARE_LOCALS(&SIL_temp_conditional___63); [line 31]\n *&SIL_temp_conditional___63:class NSString *=n$10 [line 31]\n REMOVE_TEMPS(n$10); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 67 -> 69 ; -66 [label="66: Prune (true branch) \n n$8=*&__assert_file__:class NSString * [line 31]\n PRUNE((n$8 != 0), true); [line 31]\n REMOVE_TEMPS(n$8); [line 31]\n " shape="invhouse"] + 67 -> 63 ; +66 [label="66: ConditinalStmt Branch \n n$9=*&__assert_file__:class NSString * [line 31]\n DECLARE_LOCALS(&SIL_temp_conditional___63); [line 31]\n *&SIL_temp_conditional___63:class NSString *=n$9 [line 31]\n REMOVE_TEMPS(n$9); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 66 -> 68 ; -65 [label="65: + \n " ] + 66 -> 63 ; +65 [label="65: Prune (false branch) \n n$8=*&__assert_file__:class NSString * [line 31]\n PRUNE((n$8 == 0), false); [line 31]\n REMOVE_TEMPS(n$8); [line 31]\n " shape="invhouse"] - 65 -> 70 ; -64 [label="64: Assertion failure \n _fun___infer_fail(\"ASSERTION_FAILURE\":void ) [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] + 65 -> 67 ; +64 [label="64: Prune (true branch) \n n$8=*&__assert_file__:class NSString * [line 31]\n PRUNE((n$8 != 0), true); [line 31]\n REMOVE_TEMPS(n$8); [line 31]\n " shape="invhouse"] - 64 -> 50 ; -63 [label="63: Prune (false branch) \n n$3=*&SIL_temp_conditional___56:int [line 31]\n NULLIFY(&SIL_temp_conditional___56,true); [line 31]\n PRUNE((n$3 == 0), false); [line 31]\n REMOVE_TEMPS(n$3); [line 31]\n " shape="invhouse"] + 64 -> 66 ; +63 [label="63: + \n " ] - 63 -> 55 ; -62 [label="62: Prune (true branch) \n n$3=*&SIL_temp_conditional___56:int [line 31]\n NULLIFY(&SIL_temp_conditional___56,true); [line 31]\n PRUNE((n$3 != 0), true); [line 31]\n REMOVE_TEMPS(n$3); [line 31]\n NULLIFY(&target,false); [line 31]\n " shape="invhouse"] + 63 -> 68 ; +62 [label="62: Assertion failure \n _fun___infer_fail(\"ASSERTION_FAILURE\":void ) [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 62 -> 78 ; -61 [label="61: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___56); [line 31]\n *&SIL_temp_conditional___56:int =1 [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] + 62 -> 48 ; +61 [label="61: Prune (false branch) \n n$3=*&SIL_temp_conditional___54:int [line 31]\n NULLIFY(&SIL_temp_conditional___54,true); [line 31]\n PRUNE((n$3 == 0), false); [line 31]\n REMOVE_TEMPS(n$3); [line 31]\n " shape="invhouse"] - 61 -> 56 ; -60 [label="60: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___56); [line 31]\n *&SIL_temp_conditional___56:int =0 [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] + 61 -> 53 ; +60 [label="60: Prune (true branch) \n n$3=*&SIL_temp_conditional___54:int [line 31]\n NULLIFY(&SIL_temp_conditional___54,true); [line 31]\n PRUNE((n$3 != 0), true); [line 31]\n REMOVE_TEMPS(n$3); [line 31]\n NULLIFY(&target,false); [line 31]\n " shape="invhouse"] - 60 -> 56 ; -59 [label="59: Prune (false branch) \n PRUNE(((n$2 != (void *)0) == 0), false); [line 31]\n REMOVE_TEMPS(n$2); [line 31]\n " shape="invhouse"] + 60 -> 76 ; +59 [label="59: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___54); [line 31]\n *&SIL_temp_conditional___54:int =1 [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 59 -> 61 ; -58 [label="58: Prune (true branch) \n PRUNE(((n$2 != (void *)0) != 0), true); [line 31]\n REMOVE_TEMPS(n$2); [line 31]\n " shape="invhouse"] + 59 -> 54 ; +58 [label="58: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___54); [line 31]\n *&SIL_temp_conditional___54:int =0 [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 58 -> 60 ; -57 [label="57: BinaryOperatorStmt: NE \n n$2=*&target:class A * [line 31]\n " shape="box"] + 58 -> 54 ; +57 [label="57: Prune (false branch) \n PRUNE(((n$2 != (void *)0) == 0), false); [line 31]\n REMOVE_TEMPS(n$2); [line 31]\n " shape="invhouse"] - 57 -> 58 ; 57 -> 59 ; -56 [label="56: + \n " ] +56 [label="56: Prune (true branch) \n PRUNE(((n$2 != (void *)0) != 0), true); [line 31]\n REMOVE_TEMPS(n$2); [line 31]\n " shape="invhouse"] - 56 -> 62 ; - 56 -> 63 ; -55 [label="55: + \n " ] + 56 -> 58 ; +55 [label="55: BinaryOperatorStmt: NE \n n$2=*&target:class A * [line 31]\n " shape="box"] - 55 -> 53 ; - 55 -> 54 ; -54 [label="54: Prune (false branch) \n PRUNE((0 == 0), false); [line 31]\n " shape="invhouse"] + 55 -> 56 ; + 55 -> 57 ; +54 [label="54: + \n " ] - 54 -> 51 ; -53 [label="53: Prune (true branch) \n PRUNE((0 != 0), true); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="invhouse"] + 54 -> 60 ; + 54 -> 61 ; +53 [label="53: + \n " ] + 53 -> 51 ; 53 -> 52 ; -52 [label="52: + \n " ] +52 [label="52: Prune (false branch) \n PRUNE((0 == 0), false); [line 31]\n " shape="invhouse"] - 52 -> 57 ; -51 [label="51: Return Stmt \n n$0=*&target:class A * [line 32]\n n$1=_fun_A_x(n$0:class A *) [line 32]\n *&return:int =n$1 [line 32]\n REMOVE_TEMPS(n$0,n$1); [line 32]\n NULLIFY(&target,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] + 52 -> 49 ; +51 [label="51: Prune (true branch) \n PRUNE((0 != 0), true); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="invhouse"] 51 -> 50 ; -50 [label="50: Exit test1 \n " color=yellow style=filled] +50 [label="50: + \n " ] -49 [label="49: Start test1\nFormals: target:class A *\nLocals: __assert_file__:class NSString * __assert_fn__:class NSString * \n DECLARE_LOCALS(&return,&__assert_file__,&__assert_fn__); [line 30]\n NULLIFY(&__assert_file__,false); [line 30]\n NULLIFY(&__assert_fn__,false); [line 30]\n " color=yellow style=filled] + 50 -> 55 ; +49 [label="49: Return Stmt \n n$0=*&target:class A * [line 32]\n n$1=_fun_A_x(n$0:class A *) [line 32]\n *&return:int =n$1 [line 32]\n REMOVE_TEMPS(n$0,n$1); [line 32]\n NULLIFY(&target,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] - 49 -> 52 ; -48 [label="48: DeclStmt \n n$29=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 24]\n _fun___objc_retain(n$29:class NSString *) [line 24]\n *&__assert_file__:class NSString *=n$29 [line 24]\n REMOVE_TEMPS(n$29); [line 24]\n " shape="box"] + 49 -> 48 ; +48 [label="48: Exit test1 \n " color=yellow style=filled] - 48 -> 43 ; - 48 -> 44 ; -47 [label="47: BinaryOperatorStmt: Assign \n n$27=*&SIL_temp_conditional___42:class NSString * [line 24]\n NULLIFY(&SIL_temp_conditional___42,true); [line 24]\n _fun___objc_retain(n$27:class NSString *) [line 24]\n n$28=*&__assert_file__:class NSString * [line 24]\n *&__assert_file__:class NSString *=n$27 [line 24]\n _fun___objc_release(n$28:class NSString *) [line 24]\n REMOVE_TEMPS(n$27,n$28); [line 24]\n NULLIFY(&__assert_file__,false); [line 24]\n " shape="box"] +47 [label="47: Start test1\nFormals: target:class A *\nLocals: __assert_file__:class NSString * __assert_fn__:class NSString * \n DECLARE_LOCALS(&return,&__assert_file__,&__assert_fn__); [line 30]\n NULLIFY(&__assert_file__,false); [line 30]\n NULLIFY(&__assert_fn__,false); [line 30]\n " color=yellow style=filled] - 47 -> 41 ; -46 [label="46: ConditinalStmt Branch \n n$26=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 24]\n DECLARE_LOCALS(&SIL_temp_conditional___42); [line 24]\n *&SIL_temp_conditional___42:class NSString *=n$26 [line 24]\n REMOVE_TEMPS(n$26); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] + 47 -> 50 ; +46 [label="46: DeclStmt \n n$29=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 24]\n _fun___objc_retain(n$29:class NSString *) [line 24]\n *&__assert_file__:class NSString *=n$29 [line 24]\n REMOVE_TEMPS(n$29); [line 24]\n " shape="box"] + 46 -> 41 ; 46 -> 42 ; -45 [label="45: ConditinalStmt Branch \n n$25=*&__assert_file__:class NSString * [line 24]\n DECLARE_LOCALS(&SIL_temp_conditional___42); [line 24]\n *&SIL_temp_conditional___42:class NSString *=n$25 [line 24]\n REMOVE_TEMPS(n$25); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +45 [label="45: BinaryOperatorStmt: Assign \n n$27=*&SIL_temp_conditional___40:class NSString * [line 24]\n NULLIFY(&SIL_temp_conditional___40,true); [line 24]\n _fun___objc_retain(n$27:class NSString *) [line 24]\n n$28=*&__assert_file__:class NSString * [line 24]\n *&__assert_file__:class NSString *=n$27 [line 24]\n _fun___objc_release(n$28:class NSString *) [line 24]\n REMOVE_TEMPS(n$27,n$28); [line 24]\n NULLIFY(&__assert_file__,false); [line 24]\n " shape="box"] - 45 -> 42 ; -44 [label="44: Prune (false branch) \n n$24=*&__assert_file__:class NSString * [line 24]\n PRUNE((n$24 == 0), false); [line 24]\n REMOVE_TEMPS(n$24); [line 24]\n " shape="invhouse"] + 45 -> 39 ; +44 [label="44: ConditinalStmt Branch \n n$26=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 24]\n DECLARE_LOCALS(&SIL_temp_conditional___40); [line 24]\n *&SIL_temp_conditional___40:class NSString *=n$26 [line 24]\n REMOVE_TEMPS(n$26); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 44 -> 46 ; -43 [label="43: Prune (true branch) \n n$24=*&__assert_file__:class NSString * [line 24]\n PRUNE((n$24 != 0), true); [line 24]\n REMOVE_TEMPS(n$24); [line 24]\n " shape="invhouse"] + 44 -> 40 ; +43 [label="43: ConditinalStmt Branch \n n$25=*&__assert_file__:class NSString * [line 24]\n DECLARE_LOCALS(&SIL_temp_conditional___40); [line 24]\n *&SIL_temp_conditional___40:class NSString *=n$25 [line 24]\n REMOVE_TEMPS(n$25); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 43 -> 45 ; -42 [label="42: + \n " ] + 43 -> 40 ; +42 [label="42: Prune (false branch) \n n$24=*&__assert_file__:class NSString * [line 24]\n PRUNE((n$24 == 0), false); [line 24]\n REMOVE_TEMPS(n$24); [line 24]\n " shape="invhouse"] - 42 -> 47 ; -41 [label="41: Assertion failure \n _fun___infer_fail(\"ASSERTION_FAILURE\":void ) [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] + 42 -> 44 ; +41 [label="41: Prune (true branch) \n n$24=*&__assert_file__:class NSString * [line 24]\n PRUNE((n$24 != 0), true); [line 24]\n REMOVE_TEMPS(n$24); [line 24]\n " shape="invhouse"] - 41 -> 27 ; -40 [label="40: Prune (false branch) \n n$18=*&SIL_temp_conditional___33:int [line 24]\n NULLIFY(&SIL_temp_conditional___33,true); [line 24]\n PRUNE((n$18 == 0), false); [line 24]\n REMOVE_TEMPS(n$18); [line 24]\n " shape="invhouse"] + 41 -> 43 ; +40 [label="40: + \n " ] - 40 -> 32 ; -39 [label="39: Prune (true branch) \n n$18=*&SIL_temp_conditional___33:int [line 24]\n NULLIFY(&SIL_temp_conditional___33,true); [line 24]\n PRUNE((n$18 != 0), true); [line 24]\n REMOVE_TEMPS(n$18); [line 24]\n NULLIFY(&a,false); [line 24]\n " shape="invhouse"] + 40 -> 45 ; +39 [label="39: Assertion failure \n _fun___infer_fail(\"ASSERTION_FAILURE\":void ) [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 39 -> 48 ; -38 [label="38: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___33); [line 24]\n *&SIL_temp_conditional___33:int =1 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] + 39 -> 25 ; +38 [label="38: Prune (false branch) \n n$18=*&SIL_temp_conditional___31:int [line 24]\n NULLIFY(&SIL_temp_conditional___31,true); [line 24]\n PRUNE((n$18 == 0), false); [line 24]\n REMOVE_TEMPS(n$18); [line 24]\n " shape="invhouse"] - 38 -> 33 ; -37 [label="37: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___33); [line 24]\n *&SIL_temp_conditional___33:int =0 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] + 38 -> 30 ; +37 [label="37: Prune (true branch) \n n$18=*&SIL_temp_conditional___31:int [line 24]\n NULLIFY(&SIL_temp_conditional___31,true); [line 24]\n PRUNE((n$18 != 0), true); [line 24]\n REMOVE_TEMPS(n$18); [line 24]\n NULLIFY(&a,false); [line 24]\n " shape="invhouse"] - 37 -> 33 ; -36 [label="36: Prune (false branch) \n PRUNE(((n$17 != (void *)0) == 0), false); [line 24]\n REMOVE_TEMPS(n$17); [line 24]\n " shape="invhouse"] + 37 -> 46 ; +36 [label="36: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___31); [line 24]\n *&SIL_temp_conditional___31:int =1 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 36 -> 38 ; -35 [label="35: Prune (true branch) \n PRUNE(((n$17 != (void *)0) != 0), true); [line 24]\n REMOVE_TEMPS(n$17); [line 24]\n " shape="invhouse"] + 36 -> 31 ; +35 [label="35: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___31); [line 24]\n *&SIL_temp_conditional___31:int =0 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 35 -> 37 ; -34 [label="34: BinaryOperatorStmt: NE \n n$17=*&a:class A * [line 24]\n " shape="box"] + 35 -> 31 ; +34 [label="34: Prune (false branch) \n PRUNE(((n$17 != (void *)0) == 0), false); [line 24]\n REMOVE_TEMPS(n$17); [line 24]\n " shape="invhouse"] - 34 -> 35 ; 34 -> 36 ; -33 [label="33: + \n " ] +33 [label="33: Prune (true branch) \n PRUNE(((n$17 != (void *)0) != 0), true); [line 24]\n REMOVE_TEMPS(n$17); [line 24]\n " shape="invhouse"] - 33 -> 39 ; - 33 -> 40 ; -32 [label="32: + \n " ] + 33 -> 35 ; +32 [label="32: BinaryOperatorStmt: NE \n n$17=*&a:class A * [line 24]\n " shape="box"] - 32 -> 30 ; - 32 -> 31 ; -31 [label="31: Prune (false branch) \n PRUNE((0 == 0), false); [line 24]\n " shape="invhouse"] + 32 -> 33 ; + 32 -> 34 ; +31 [label="31: + \n " ] - 31 -> 28 ; -30 [label="30: Prune (true branch) \n PRUNE((0 != 0), true); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="invhouse"] + 31 -> 37 ; + 31 -> 38 ; +30 [label="30: + \n " ] + 30 -> 28 ; 30 -> 29 ; -29 [label="29: + \n " ] +29 [label="29: Prune (false branch) \n PRUNE((0 == 0), false); [line 24]\n " shape="invhouse"] - 29 -> 34 ; -28 [label="28: Return Stmt \n n$15=*&a:class A * [line 25]\n n$16=_fun_A_x(n$15:class A *) [line 25]\n *&return:int =n$16 [line 25]\n REMOVE_TEMPS(n$15,n$16); [line 25]\n NULLIFY(&a,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] + 29 -> 26 ; +28 [label="28: Prune (true branch) \n PRUNE((0 != 0), true); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="invhouse"] 28 -> 27 ; -27 [label="27: Exit A_initWithRequest: \n " color=yellow style=filled] +27 [label="27: + \n " ] -26 [label="26: Start A_initWithRequest:\nFormals: self:class A * a:class A *\nLocals: __assert_file__:class NSString * \n DECLARE_LOCALS(&return,&__assert_file__); [line 23]\n NULLIFY(&__assert_file__,false); [line 23]\n NULLIFY(&self,false); [line 23]\n " color=yellow style=filled] + 27 -> 32 ; +26 [label="26: Return Stmt \n n$15=*&a:class A * [line 25]\n n$16=_fun_A_x(n$15:class A *) [line 25]\n *&return:int =n$16 [line 25]\n REMOVE_TEMPS(n$15,n$16); [line 25]\n NULLIFY(&a,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] - 26 -> 29 ; -25 [label="25: DeclStmt \n n$14=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 19]\n _fun___objc_retain(n$14:class NSString *) [line 19]\n *&__assert_file__:class NSString *=n$14 [line 19]\n REMOVE_TEMPS(n$14); [line 19]\n " shape="box"] + 26 -> 25 ; +25 [label="25: Exit A_initWithRequest: \n " color=yellow style=filled] - 25 -> 20 ; - 25 -> 21 ; -24 [label="24: BinaryOperatorStmt: Assign \n n$12=*&SIL_temp_conditional___19:class NSString * [line 19]\n NULLIFY(&SIL_temp_conditional___19,true); [line 19]\n _fun___objc_retain(n$12:class NSString *) [line 19]\n n$13=*&__assert_file__:class NSString * [line 19]\n *&__assert_file__:class NSString *=n$12 [line 19]\n _fun___objc_release(n$13:class NSString *) [line 19]\n REMOVE_TEMPS(n$12,n$13); [line 19]\n NULLIFY(&__assert_file__,false); [line 19]\n " shape="box"] +24 [label="24: Start A_initWithRequest:\nFormals: self:class A * a:class A *\nLocals: __assert_file__:class NSString * \n DECLARE_LOCALS(&return,&__assert_file__); [line 23]\n NULLIFY(&__assert_file__,false); [line 23]\n NULLIFY(&self,false); [line 23]\n " color=yellow style=filled] - 24 -> 18 ; -23 [label="23: ConditinalStmt Branch \n n$11=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 19]\n DECLARE_LOCALS(&SIL_temp_conditional___19); [line 19]\n *&SIL_temp_conditional___19:class NSString *=n$11 [line 19]\n REMOVE_TEMPS(n$11); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] + 24 -> 27 ; +23 [label="23: DeclStmt \n n$14=_fun_NSString_stringWithUTF8String:(\"infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m\":char *) [line 19]\n _fun___objc_retain(n$14:class NSString *) [line 19]\n *&__assert_file__:class NSString *=n$14 [line 19]\n REMOVE_TEMPS(n$14); [line 19]\n " shape="box"] + 23 -> 18 ; 23 -> 19 ; -22 [label="22: ConditinalStmt Branch \n n$10=*&__assert_file__:class NSString * [line 19]\n DECLARE_LOCALS(&SIL_temp_conditional___19); [line 19]\n *&SIL_temp_conditional___19:class NSString *=n$10 [line 19]\n REMOVE_TEMPS(n$10); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +22 [label="22: BinaryOperatorStmt: Assign \n n$12=*&SIL_temp_conditional___17:class NSString * [line 19]\n NULLIFY(&SIL_temp_conditional___17,true); [line 19]\n _fun___objc_retain(n$12:class NSString *) [line 19]\n n$13=*&__assert_file__:class NSString * [line 19]\n *&__assert_file__:class NSString *=n$12 [line 19]\n _fun___objc_release(n$13:class NSString *) [line 19]\n REMOVE_TEMPS(n$12,n$13); [line 19]\n NULLIFY(&__assert_file__,false); [line 19]\n " shape="box"] - 22 -> 19 ; -21 [label="21: Prune (false branch) \n n$9=*&__assert_file__:class NSString * [line 19]\n PRUNE((n$9 == 0), false); [line 19]\n REMOVE_TEMPS(n$9); [line 19]\n " shape="invhouse"] + 22 -> 16 ; +21 [label="21: ConditinalStmt Branch \n n$11=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 19]\n DECLARE_LOCALS(&SIL_temp_conditional___17); [line 19]\n *&SIL_temp_conditional___17:class NSString *=n$11 [line 19]\n REMOVE_TEMPS(n$11); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 21 -> 23 ; -20 [label="20: Prune (true branch) \n n$9=*&__assert_file__:class NSString * [line 19]\n PRUNE((n$9 != 0), true); [line 19]\n REMOVE_TEMPS(n$9); [line 19]\n " shape="invhouse"] + 21 -> 17 ; +20 [label="20: ConditinalStmt Branch \n n$10=*&__assert_file__:class NSString * [line 19]\n DECLARE_LOCALS(&SIL_temp_conditional___17); [line 19]\n *&SIL_temp_conditional___17:class NSString *=n$10 [line 19]\n REMOVE_TEMPS(n$10); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 20 -> 22 ; -19 [label="19: + \n " ] + 20 -> 17 ; +19 [label="19: Prune (false branch) \n n$9=*&__assert_file__:class NSString * [line 19]\n PRUNE((n$9 == 0), false); [line 19]\n REMOVE_TEMPS(n$9); [line 19]\n " shape="invhouse"] - 19 -> 24 ; -18 [label="18: Assertion failure \n _fun___infer_fail(\"ASSERTION_FAILURE\":void ) [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] + 19 -> 21 ; +18 [label="18: Prune (true branch) \n n$9=*&__assert_file__:class NSString * [line 19]\n PRUNE((n$9 != 0), true); [line 19]\n REMOVE_TEMPS(n$9); [line 19]\n " shape="invhouse"] - 18 -> 4 ; -17 [label="17: Prune (false branch) \n n$3=*&SIL_temp_conditional___10:int [line 19]\n NULLIFY(&SIL_temp_conditional___10,true); [line 19]\n PRUNE((n$3 == 0), false); [line 19]\n REMOVE_TEMPS(n$3); [line 19]\n " shape="invhouse"] + 18 -> 20 ; +17 [label="17: + \n " ] - 17 -> 9 ; -16 [label="16: Prune (true branch) \n n$3=*&SIL_temp_conditional___10:int [line 19]\n NULLIFY(&SIL_temp_conditional___10,true); [line 19]\n PRUNE((n$3 != 0), true); [line 19]\n REMOVE_TEMPS(n$3); [line 19]\n NULLIFY(&target,false); [line 19]\n " shape="invhouse"] + 17 -> 22 ; +16 [label="16: Assertion failure \n _fun___infer_fail(\"ASSERTION_FAILURE\":void ) [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 16 -> 25 ; -15 [label="15: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___10); [line 19]\n *&SIL_temp_conditional___10:int =1 [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] + 16 -> 2 ; +15 [label="15: Prune (false branch) \n n$3=*&SIL_temp_conditional___8:int [line 19]\n NULLIFY(&SIL_temp_conditional___8,true); [line 19]\n PRUNE((n$3 == 0), false); [line 19]\n REMOVE_TEMPS(n$3); [line 19]\n " shape="invhouse"] - 15 -> 10 ; -14 [label="14: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___10); [line 19]\n *&SIL_temp_conditional___10:int =0 [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] + 15 -> 7 ; +14 [label="14: Prune (true branch) \n n$3=*&SIL_temp_conditional___8:int [line 19]\n NULLIFY(&SIL_temp_conditional___8,true); [line 19]\n PRUNE((n$3 != 0), true); [line 19]\n REMOVE_TEMPS(n$3); [line 19]\n NULLIFY(&target,false); [line 19]\n " shape="invhouse"] - 14 -> 10 ; -13 [label="13: Prune (false branch) \n PRUNE(((n$2 != (void *)0) == 0), false); [line 19]\n REMOVE_TEMPS(n$2); [line 19]\n " shape="invhouse"] + 14 -> 23 ; +13 [label="13: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 19]\n *&SIL_temp_conditional___8:int =1 [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 13 -> 15 ; -12 [label="12: Prune (true branch) \n PRUNE(((n$2 != (void *)0) != 0), true); [line 19]\n REMOVE_TEMPS(n$2); [line 19]\n " shape="invhouse"] + 13 -> 8 ; +12 [label="12: ConditinalStmt Branch \n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 19]\n *&SIL_temp_conditional___8:int =0 [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 12 -> 14 ; -11 [label="11: BinaryOperatorStmt: NE \n n$2=*&target:class A * [line 19]\n " shape="box"] + 12 -> 8 ; +11 [label="11: Prune (false branch) \n PRUNE(((n$2 != (void *)0) == 0), false); [line 19]\n REMOVE_TEMPS(n$2); [line 19]\n " shape="invhouse"] - 11 -> 12 ; 11 -> 13 ; -10 [label="10: + \n " ] +10 [label="10: Prune (true branch) \n PRUNE(((n$2 != (void *)0) != 0), true); [line 19]\n REMOVE_TEMPS(n$2); [line 19]\n " shape="invhouse"] - 10 -> 16 ; - 10 -> 17 ; -9 [label="9: + \n " ] + 10 -> 12 ; +9 [label="9: BinaryOperatorStmt: NE \n n$2=*&target:class A * [line 19]\n " shape="box"] - 9 -> 7 ; - 9 -> 8 ; -8 [label="8: Prune (false branch) \n PRUNE((0 == 0), false); [line 19]\n " shape="invhouse"] + 9 -> 10 ; + 9 -> 11 ; +8 [label="8: + \n " ] - 8 -> 5 ; -7 [label="7: Prune (true branch) \n PRUNE((0 != 0), true); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="invhouse"] + 8 -> 14 ; + 8 -> 15 ; +7 [label="7: + \n " ] + 7 -> 5 ; 7 -> 6 ; -6 [label="6: + \n " ] +6 [label="6: Prune (false branch) \n PRUNE((0 == 0), false); [line 19]\n " shape="invhouse"] - 6 -> 11 ; -5 [label="5: Return Stmt \n n$0=*&target:class A * [line 20]\n n$1=_fun_A_x(n$0:class A *) [line 20]\n *&return:int =n$1 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&target,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] + 6 -> 3 ; +5 [label="5: Prune (true branch) \n PRUNE((0 != 0), true); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="invhouse"] 5 -> 4 ; -4 [label="4: Exit A_addTarget: \n " color=yellow style=filled] +4 [label="4: + \n " ] -3 [label="3: Start A_addTarget:\nFormals: self:class A * target:class A *\nLocals: __assert_file__:class NSString * \n DECLARE_LOCALS(&return,&__assert_file__); [line 18]\n NULLIFY(&__assert_file__,false); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] + 4 -> 9 ; +3 [label="3: Return Stmt \n n$0=*&target:class A * [line 20]\n n$1=_fun_A_x(n$0:class A *) [line 20]\n *&return:int =n$1 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&target,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] - 3 -> 6 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_addTarget: \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start A_addTarget:\nFormals: self:class A * target:class A *\nLocals: __assert_file__:class NSString * \n DECLARE_LOCALS(&return,&__assert_file__); [line 18]\n NULLIFY(&__assert_file__,false); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 4 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot b/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot index 584b17ad8..4ca3a4dec 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot @@ -1,211 +1,204 @@ digraph iCFG { -55 [label="55: DeclStmt \n *&i:int =5 [line 57]\n " shape="box"] +53 [label="53: DeclStmt \n *&i:int =5 [line 57]\n " shape="box"] - 55 -> 54 ; -54 [label="54: DeclStmt \n *&x:int *=&i [line 58]\n " shape="box"] - - - 54 -> 53 ; -53 [label="53: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5); [line 59]\n n$37=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 ):unsigned long ) [line 59]\n *&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5:class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 =n$37 [line 59]\n n$38=*&x:int * [line 59]\n *n$37.x:int *=n$38 [line 59]\n n$34=*&x:int * [line 59]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNoNullDeref______5,n$34) [line 59]\n REMOVE_TEMPS(n$37,n$38,n$34); [line 59]\n NULLIFY(&x,false); [line 59]\n " shape="box"] - - - 53 -> 49 ; -52 [label="52: Return Stmt \n n$35=*&x:int * [line 60]\n n$36=*n$35:int [line 60]\n *&return:int =n$36 [line 60]\n REMOVE_TEMPS(n$35,n$36); [line 60]\n NULLIFY(&x,false); [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] + 53 -> 52 ; +52 [label="52: DeclStmt \n *&x:int *=&i [line 58]\n " shape="box"] 52 -> 51 ; -51 [label="51: Exit __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 \n " color=yellow style=filled] +51 [label="51: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5); [line 59]\n n$37=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 ):unsigned long ) [line 59]\n *&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5:class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 =n$37 [line 59]\n n$38=*&x:int * [line 59]\n *n$37.x:int *=n$38 [line 59]\n n$34=*&x:int * [line 59]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNoNullDeref______5,n$34) [line 59]\n REMOVE_TEMPS(n$37,n$38,n$34); [line 59]\n NULLIFY(&x,false); [line 59]\n " shape="box"] -50 [label="50: Start __objc_anonymous_block_BlockVar_capturedNoNullDeref______5\nFormals: x:int *\nLocals: \nCaptured: x:int * \n DECLARE_LOCALS(&return); [line 59]\n " color=yellow style=filled] + 51 -> 47 ; +50 [label="50: Return Stmt \n n$35=*&x:int * [line 60]\n n$36=*n$35:int [line 60]\n *&return:int =n$36 [line 60]\n REMOVE_TEMPS(n$35,n$36); [line 60]\n NULLIFY(&x,false); [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] - 50 -> 52 ; -49 [label="49: BinaryOperatorStmt: Assign \n *&x:int *=0 [line 62]\n NULLIFY(&x,false); [line 62]\n " shape="box"] + 50 -> 49 ; +49 [label="49: Exit __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 \n " color=yellow style=filled] - 49 -> 48 ; -48 [label="48: Return Stmt \n n$32=*&my_block:_fn_ (*) [line 63]\n n$33=n$32() [line 63]\n *&return:int =n$33 [line 63]\n REMOVE_TEMPS(n$32,n$33); [line 63]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5,true); [line 63]\n NULLIFY(&my_block,false); [line 63]\n NULLIFY(&i,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] +48 [label="48: Start __objc_anonymous_block_BlockVar_capturedNoNullDeref______5\nFormals: x:int *\nLocals: \nCaptured: x:int * \n DECLARE_LOCALS(&return); [line 59]\n " color=yellow style=filled] - 48 -> 47 ; -47 [label="47: Exit BlockVar_capturedNoNullDeref \n " color=yellow style=filled] + 48 -> 50 ; +47 [label="47: BinaryOperatorStmt: Assign \n *&x:int *=0 [line 62]\n NULLIFY(&x,false); [line 62]\n " shape="box"] -46 [label="46: Start BlockVar_capturedNoNullDeref\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * i:int \n DECLARE_LOCALS(&return,&my_block,&x,&i); [line 56]\n NULLIFY(&my_block,false); [line 56]\n NULLIFY(&self,false); [line 56]\n NULLIFY(&x,false); [line 56]\n " color=yellow style=filled] + 47 -> 46 ; +46 [label="46: Return Stmt \n n$32=*&my_block:_fn_ (*) [line 63]\n n$33=n$32() [line 63]\n *&return:int =n$33 [line 63]\n REMOVE_TEMPS(n$32,n$33); [line 63]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5,true); [line 63]\n NULLIFY(&my_block,false); [line 63]\n NULLIFY(&i,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] - 46 -> 55 ; -45 [label="45: DeclStmt \n *&x:int *=0 [line 49]\n " shape="box"] + 46 -> 45 ; +45 [label="45: Exit BlockVar_capturedNoNullDeref \n " color=yellow style=filled] - 45 -> 44 ; -44 [label="44: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNullDeref______4); [line 50]\n n$30=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNullDeref______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_BlockVar_capturedNullDeref______4:class __objc_anonymous_block_BlockVar_capturedNullDeref______4 =n$30 [line 50]\n n$31=*&x:int * [line 50]\n *n$30.x:int *=n$31 [line 50]\n n$27=*&x:int * [line 50]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNullDeref______4,n$27) [line 50]\n REMOVE_TEMPS(n$30,n$31,n$27); [line 50]\n NULLIFY(&x,false); [line 50]\n " shape="box"] +44 [label="44: Start BlockVar_capturedNoNullDeref\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * i:int \n DECLARE_LOCALS(&return,&my_block,&x,&i); [line 56]\n NULLIFY(&my_block,false); [line 56]\n NULLIFY(&self,false); [line 56]\n NULLIFY(&x,false); [line 56]\n " color=yellow style=filled] - 44 -> 40 ; -43 [label="43: Return Stmt \n n$28=*&x:int * [line 51]\n n$29=*n$28:int [line 51]\n *&return:int =n$29 [line 51]\n REMOVE_TEMPS(n$28,n$29); [line 51]\n NULLIFY(&x,false); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] + 44 -> 53 ; +43 [label="43: DeclStmt \n *&x:int *=0 [line 49]\n " shape="box"] 43 -> 42 ; -42 [label="42: Exit __objc_anonymous_block_BlockVar_capturedNullDeref______4 \n " color=yellow style=filled] +42 [label="42: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNullDeref______4); [line 50]\n n$30=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNullDeref______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_BlockVar_capturedNullDeref______4:class __objc_anonymous_block_BlockVar_capturedNullDeref______4 =n$30 [line 50]\n n$31=*&x:int * [line 50]\n *n$30.x:int *=n$31 [line 50]\n n$27=*&x:int * [line 50]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNullDeref______4,n$27) [line 50]\n REMOVE_TEMPS(n$30,n$31,n$27); [line 50]\n NULLIFY(&x,false); [line 50]\n " shape="box"] -41 [label="41: Start __objc_anonymous_block_BlockVar_capturedNullDeref______4\nFormals: x:int *\nLocals: \nCaptured: x:int * \n DECLARE_LOCALS(&return); [line 50]\n " color=yellow style=filled] + 42 -> 38 ; +41 [label="41: Return Stmt \n n$28=*&x:int * [line 51]\n n$29=*n$28:int [line 51]\n *&return:int =n$29 [line 51]\n REMOVE_TEMPS(n$28,n$29); [line 51]\n NULLIFY(&x,false); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] - 41 -> 43 ; -40 [label="40: Return Stmt \n n$25=*&my_block:_fn_ (*) [line 53]\n n$26=n$25() [line 53]\n *&return:int =n$26 [line 53]\n REMOVE_TEMPS(n$25,n$26); [line 53]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNullDeref______4,true); [line 53]\n NULLIFY(&my_block,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] + 41 -> 40 ; +40 [label="40: Exit __objc_anonymous_block_BlockVar_capturedNullDeref______4 \n " color=yellow style=filled] - 40 -> 39 ; -39 [label="39: Exit BlockVar_capturedNullDeref \n " color=yellow style=filled] +39 [label="39: Start __objc_anonymous_block_BlockVar_capturedNullDeref______4\nFormals: x:int *\nLocals: \nCaptured: x:int * \n DECLARE_LOCALS(&return); [line 50]\n " color=yellow style=filled] -38 [label="38: Start BlockVar_capturedNullDeref\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * \n DECLARE_LOCALS(&return,&my_block,&x); [line 48]\n NULLIFY(&my_block,false); [line 48]\n NULLIFY(&self,false); [line 48]\n NULLIFY(&x,false); [line 48]\n " color=yellow style=filled] + 39 -> 41 ; +38 [label="38: Return Stmt \n n$25=*&my_block:_fn_ (*) [line 53]\n n$26=n$25() [line 53]\n *&return:int =n$26 [line 53]\n REMOVE_TEMPS(n$25,n$26); [line 53]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNullDeref______4,true); [line 53]\n NULLIFY(&my_block,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] - 38 -> 45 ; -37 [label="37: DeclStmt \n *&i:int =7 [line 40]\n " shape="box"] + 38 -> 37 ; +37 [label="37: Exit BlockVar_capturedNullDeref \n " color=yellow style=filled] - 37 -> 36 ; -36 [label="36: DeclStmt \n *&x:int *=&i [line 41]\n " shape="box"] +36 [label="36: Start BlockVar_capturedNullDeref\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * \n DECLARE_LOCALS(&return,&my_block,&x); [line 48]\n NULLIFY(&my_block,false); [line 48]\n NULLIFY(&self,false); [line 48]\n NULLIFY(&x,false); [line 48]\n " color=yellow style=filled] - 36 -> 35 ; -35 [label="35: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostOk______3); [line 42]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostOk______3 ):unsigned long ) [line 42]\n *&__objc_anonymous_block_BlockVar_blockPostOk______3:class __objc_anonymous_block_BlockVar_blockPostOk______3 =n$23 [line 42]\n n$24=*&x:int * [line 42]\n *n$23.x:int *=n$24 [line 42]\n n$21=*&x:int * [line 42]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostOk______3,n$21) [line 42]\n REMOVE_TEMPS(n$23,n$24,n$21); [line 42]\n NULLIFY(&x,false); [line 42]\n " shape="box"] + 36 -> 43 ; +35 [label="35: DeclStmt \n *&i:int =7 [line 40]\n " shape="box"] - 35 -> 31 ; -34 [label="34: Return Stmt \n n$22=*&x:int * [line 43]\n *&return:int *=n$22 [line 43]\n REMOVE_TEMPS(n$22); [line 43]\n NULLIFY(&x,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] + 35 -> 34 ; +34 [label="34: DeclStmt \n *&x:int *=&i [line 41]\n " shape="box"] 34 -> 33 ; -33 [label="33: Exit __objc_anonymous_block_BlockVar_blockPostOk______3 \n " color=yellow style=filled] +33 [label="33: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostOk______3); [line 42]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostOk______3 ):unsigned long ) [line 42]\n *&__objc_anonymous_block_BlockVar_blockPostOk______3:class __objc_anonymous_block_BlockVar_blockPostOk______3 =n$23 [line 42]\n n$24=*&x:int * [line 42]\n *n$23.x:int *=n$24 [line 42]\n n$21=*&x:int * [line 42]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostOk______3,n$21) [line 42]\n REMOVE_TEMPS(n$23,n$24,n$21); [line 42]\n NULLIFY(&x,false); [line 42]\n " shape="box"] -32 [label="32: Start __objc_anonymous_block_BlockVar_blockPostOk______3\nFormals: x:int *\nLocals: \nCaptured: x:int * \n DECLARE_LOCALS(&return); [line 42]\n " color=yellow style=filled] + 33 -> 29 ; +32 [label="32: Return Stmt \n n$22=*&x:int * [line 43]\n *&return:int *=n$22 [line 43]\n REMOVE_TEMPS(n$22); [line 43]\n NULLIFY(&x,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] - 32 -> 34 ; -31 [label="31: Return Stmt \n n$18=*&my_block:_fn_ (*) [line 45]\n n$19=n$18() [line 45]\n n$20=*n$19:int [line 45]\n *&return:int =n$20 [line 45]\n REMOVE_TEMPS(n$18,n$19,n$20); [line 45]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostOk______3,true); [line 45]\n NULLIFY(&my_block,false); [line 45]\n NULLIFY(&i,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] + 32 -> 31 ; +31 [label="31: Exit __objc_anonymous_block_BlockVar_blockPostOk______3 \n " color=yellow style=filled] - 31 -> 30 ; -30 [label="30: Exit BlockVar_blockPostOk \n " color=yellow style=filled] +30 [label="30: Start __objc_anonymous_block_BlockVar_blockPostOk______3\nFormals: x:int *\nLocals: \nCaptured: x:int * \n DECLARE_LOCALS(&return); [line 42]\n " color=yellow style=filled] -29 [label="29: Start BlockVar_blockPostOk\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * i:int \n DECLARE_LOCALS(&return,&my_block,&x,&i); [line 39]\n NULLIFY(&my_block,false); [line 39]\n NULLIFY(&self,false); [line 39]\n NULLIFY(&x,false); [line 39]\n " color=yellow style=filled] + 30 -> 32 ; +29 [label="29: Return Stmt \n n$18=*&my_block:_fn_ (*) [line 45]\n n$19=n$18() [line 45]\n n$20=*n$19:int [line 45]\n *&return:int =n$20 [line 45]\n REMOVE_TEMPS(n$18,n$19,n$20); [line 45]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostOk______3,true); [line 45]\n NULLIFY(&my_block,false); [line 45]\n NULLIFY(&i,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] - 29 -> 37 ; -28 [label="28: DeclStmt \n *&x:int *=0 [line 32]\n " shape="box"] + 29 -> 28 ; +28 [label="28: Exit BlockVar_blockPostOk \n " color=yellow style=filled] - 28 -> 27 ; -27 [label="27: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostBad______2); [line 33]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostBad______2 ):unsigned long ) [line 33]\n *&__objc_anonymous_block_BlockVar_blockPostBad______2:class __objc_anonymous_block_BlockVar_blockPostBad______2 =n$16 [line 33]\n n$17=*&x:int * [line 33]\n *n$16.x:int *=n$17 [line 33]\n n$14=*&x:int * [line 33]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostBad______2,n$14) [line 33]\n REMOVE_TEMPS(n$16,n$17,n$14); [line 33]\n NULLIFY(&x,false); [line 33]\n " shape="box"] +27 [label="27: Start BlockVar_blockPostOk\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * i:int \n DECLARE_LOCALS(&return,&my_block,&x,&i); [line 39]\n NULLIFY(&my_block,false); [line 39]\n NULLIFY(&self,false); [line 39]\n NULLIFY(&x,false); [line 39]\n " color=yellow style=filled] - 27 -> 23 ; -26 [label="26: Return Stmt \n n$15=*&x:int * [line 34]\n *&return:int *=n$15 [line 34]\n REMOVE_TEMPS(n$15); [line 34]\n NULLIFY(&x,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] + 27 -> 35 ; +26 [label="26: DeclStmt \n *&x:int *=0 [line 32]\n " shape="box"] 26 -> 25 ; -25 [label="25: Exit __objc_anonymous_block_BlockVar_blockPostBad______2 \n " color=yellow style=filled] +25 [label="25: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostBad______2); [line 33]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostBad______2 ):unsigned long ) [line 33]\n *&__objc_anonymous_block_BlockVar_blockPostBad______2:class __objc_anonymous_block_BlockVar_blockPostBad______2 =n$16 [line 33]\n n$17=*&x:int * [line 33]\n *n$16.x:int *=n$17 [line 33]\n n$14=*&x:int * [line 33]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostBad______2,n$14) [line 33]\n REMOVE_TEMPS(n$16,n$17,n$14); [line 33]\n NULLIFY(&x,false); [line 33]\n " shape="box"] -24 [label="24: Start __objc_anonymous_block_BlockVar_blockPostBad______2\nFormals: x:int *\nLocals: \nCaptured: x:int * \n DECLARE_LOCALS(&return); [line 33]\n " color=yellow style=filled] + 25 -> 21 ; +24 [label="24: Return Stmt \n n$15=*&x:int * [line 34]\n *&return:int *=n$15 [line 34]\n REMOVE_TEMPS(n$15); [line 34]\n NULLIFY(&x,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] - 24 -> 26 ; -23 [label="23: Return Stmt \n n$11=*&my_block:_fn_ (*) [line 36]\n n$12=n$11() [line 36]\n n$13=*n$12:int [line 36]\n *&return:int =n$13 [line 36]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 36]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostBad______2,true); [line 36]\n NULLIFY(&my_block,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] + 24 -> 23 ; +23 [label="23: Exit __objc_anonymous_block_BlockVar_blockPostBad______2 \n " color=yellow style=filled] - 23 -> 22 ; -22 [label="22: Exit BlockVar_blockPostBad \n " color=yellow style=filled] +22 [label="22: Start __objc_anonymous_block_BlockVar_blockPostBad______2\nFormals: x:int *\nLocals: \nCaptured: x:int * \n DECLARE_LOCALS(&return); [line 33]\n " color=yellow style=filled] -21 [label="21: Start BlockVar_blockPostBad\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * \n DECLARE_LOCALS(&return,&my_block,&x); [line 31]\n NULLIFY(&my_block,false); [line 31]\n NULLIFY(&self,false); [line 31]\n NULLIFY(&x,false); [line 31]\n " color=yellow style=filled] + 22 -> 24 ; +21 [label="21: Return Stmt \n n$11=*&my_block:_fn_ (*) [line 36]\n n$12=n$11() [line 36]\n n$13=*n$12:int [line 36]\n *&return:int =n$13 [line 36]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 36]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostBad______2,true); [line 36]\n NULLIFY(&my_block,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] - 21 -> 28 ; -20 [label="20: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1); [line 19]\n n$10=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 ):unsigned long ) [line 19]\n *&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1:class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 =n$10 [line 19]\n *&addBlock:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_navigateToURLInBackground______1) [line 19]\n REMOVE_TEMPS(n$10); [line 19]\n " shape="box"] + 21 -> 20 ; +20 [label="20: Exit BlockVar_blockPostBad \n " color=yellow style=filled] - 20 -> 15 ; -19 [label="19: DeclStmt \n n$9=_fun_BlockVar_test() [line 20]\n *&res:int =n$9 [line 20]\n REMOVE_TEMPS(n$9); [line 20]\n " shape="box"] +19 [label="19: Start BlockVar_blockPostBad\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * \n DECLARE_LOCALS(&return,&my_block,&x); [line 31]\n NULLIFY(&my_block,false); [line 31]\n NULLIFY(&self,false); [line 31]\n NULLIFY(&x,false); [line 31]\n " color=yellow style=filled] - 19 -> 18 ; -18 [label="18: Return Stmt \n n$6=*&a:int [line 21]\n n$7=*&b:int [line 21]\n n$8=*&res:int [line 21]\n *&return:int =((n$6 + n$7) + n$8) [line 21]\n REMOVE_TEMPS(n$6,n$7,n$8); [line 21]\n NULLIFY(&a,false); [line 21]\n NULLIFY(&b,false); [line 21]\n NULLIFY(&res,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] + 19 -> 26 ; +18 [label="18: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1); [line 19]\n n$10=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 ):unsigned long ) [line 19]\n *&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1:class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 =n$10 [line 19]\n *&addBlock:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_navigateToURLInBackground______1) [line 19]\n REMOVE_TEMPS(n$10); [line 19]\n " shape="box"] - 18 -> 17 ; -17 [label="17: Exit __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 \n " color=yellow style=filled] + 18 -> 13 ; +17 [label="17: DeclStmt \n n$9=_fun_BlockVar_test() [line 20]\n *&res:int =n$9 [line 20]\n REMOVE_TEMPS(n$9); [line 20]\n " shape="box"] -16 [label="16: Start __objc_anonymous_block_BlockVar_navigateToURLInBackground______1\nFormals: a:int b:int \nLocals: res:int \n DECLARE_LOCALS(&return,&res); [line 19]\n NULLIFY(&res,false); [line 19]\n " color=yellow style=filled] + 17 -> 16 ; +16 [label="16: Return Stmt \n n$6=*&a:int [line 21]\n n$7=*&b:int [line 21]\n n$8=*&res:int [line 21]\n *&return:int =((n$6 + n$7) + n$8) [line 21]\n REMOVE_TEMPS(n$6,n$7,n$8); [line 21]\n NULLIFY(&a,false); [line 21]\n NULLIFY(&b,false); [line 21]\n NULLIFY(&res,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] - 16 -> 19 ; -15 [label="15: DeclStmt \n n$4=*&addBlock:_fn_ (*) [line 23]\n n$5=n$4(1:int ,2:int ) [line 23]\n *&x:int =n$5 [line 23]\n REMOVE_TEMPS(n$4,n$5); [line 23]\n NULLIFY(&addBlock,false); [line 23]\n " shape="box"] + 16 -> 15 ; +15 [label="15: Exit __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 \n " color=yellow style=filled] - 15 -> 14 ; -14 [label="14: DeclStmt \n *&p:int *=0 [line 24]\n " shape="box"] +14 [label="14: Start __objc_anonymous_block_BlockVar_navigateToURLInBackground______1\nFormals: a:int b:int \nLocals: res:int \n DECLARE_LOCALS(&return,&res); [line 19]\n NULLIFY(&res,false); [line 19]\n " color=yellow style=filled] - 14 -> 9 ; -13 [label="13: Return Stmt \n NULLIFY(&p,false); [line 28]\n n$3=*&x:int [line 28]\n *&return:int =n$3 [line 28]\n REMOVE_TEMPS(n$3); [line 28]\n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,true); [line 28]\n NULLIFY(&x,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] + 14 -> 17 ; +13 [label="13: DeclStmt \n n$4=*&addBlock:_fn_ (*) [line 23]\n n$5=n$4(1:int ,2:int ) [line 23]\n *&x:int =n$5 [line 23]\n REMOVE_TEMPS(n$4,n$5); [line 23]\n NULLIFY(&addBlock,false); [line 23]\n " shape="box"] - 13 -> 7 ; -12 [label="12: Return Stmt \n NULLIFY(&x,false); [line 26]\n n$1=*&p:int * [line 26]\n n$2=*n$1:int [line 26]\n *&return:int =n$2 [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,true); [line 26]\n NULLIFY(&p,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] + 13 -> 12 ; +12 [label="12: DeclStmt \n *&p:int *=0 [line 24]\n " shape="box"] 12 -> 7 ; -11 [label="11: Prune (false branch) \n PRUNE(((n$0 == 8) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"] +11 [label="11: Return Stmt \n NULLIFY(&p,false); [line 28]\n n$3=*&x:int [line 28]\n *&return:int =n$3 [line 28]\n REMOVE_TEMPS(n$3); [line 28]\n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,true); [line 28]\n NULLIFY(&x,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] - 11 -> 13 ; -10 [label="10: Prune (true branch) \n PRUNE(((n$0 == 8) != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"] + 11 -> 5 ; +10 [label="10: Return Stmt \n NULLIFY(&x,false); [line 26]\n n$1=*&p:int * [line 26]\n n$2=*n$1:int [line 26]\n *&return:int =n$2 [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,true); [line 26]\n NULLIFY(&p,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] - 10 -> 12 ; -9 [label="9: BinaryOperatorStmt: EQ \n n$0=*&x:int [line 25]\n " shape="box"] + 10 -> 5 ; +9 [label="9: Prune (false branch) \n PRUNE(((n$0 == 8) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"] - 9 -> 10 ; 9 -> 11 ; -8 [label="8: + \n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,true); [line 25]\n NULLIFY(&addBlock,false); [line 25]\n NULLIFY(&p,false); [line 25]\n NULLIFY(&x,false); [line 25]\n " ] +8 [label="8: Prune (true branch) \n PRUNE(((n$0 == 8) != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"] - 8 -> 7 ; -7 [label="7: Exit BlockVar_navigateToURLInBackground \n " color=yellow style=filled] + 8 -> 10 ; +7 [label="7: BinaryOperatorStmt: EQ \n n$0=*&x:int [line 25]\n " shape="box"] -6 [label="6: Start BlockVar_navigateToURLInBackground\nFormals: \nLocals: p:int * x:int addBlock:_fn_ (*) \n DECLARE_LOCALS(&return,&p,&x,&addBlock); [line 18]\n NULLIFY(&addBlock,false); [line 18]\n NULLIFY(&p,false); [line 18]\n NULLIFY(&x,false); [line 18]\n " color=yellow style=filled] + 7 -> 8 ; + 7 -> 9 ; +6 [label="6: + \n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,true); [line 25]\n NULLIFY(&addBlock,false); [line 25]\n NULLIFY(&p,false); [line 25]\n NULLIFY(&x,false); [line 25]\n " ] - 6 -> 20 ; -5 [label="5: Return Stmt \n *&return:int =5 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] + 6 -> 5 ; +5 [label="5: Exit BlockVar_navigateToURLInBackground \n " color=yellow style=filled] - 5 -> 4 ; -4 [label="4: Exit BlockVar_test \n " color=yellow style=filled] +4 [label="4: Start BlockVar_navigateToURLInBackground\nFormals: \nLocals: p:int * x:int addBlock:_fn_ (*) \n DECLARE_LOCALS(&return,&p,&x,&addBlock); [line 18]\n NULLIFY(&addBlock,false); [line 18]\n NULLIFY(&p,false); [line 18]\n NULLIFY(&x,false); [line 18]\n " color=yellow style=filled] -3 [label="3: Start BlockVar_test\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] + 4 -> 18 ; +3 [label="3: Return Stmt \n *&return:int =5 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] - 3 -> 5 ; -2 [label="2: Exit BlockVar_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit BlockVar_test \n " color=yellow style=filled] -1 [label="1: Start BlockVar_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start BlockVar_test\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot b/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot index 3cf03b893..323c1e751 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot @@ -1,219 +1,212 @@ digraph iCFG { -54 [label="54: DeclStmt \n n$44=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 34]\n n$45=_fun_NSArray_init(n$44:class NSArray *) virtual [line 34]\n *&a:class NSArray *=n$45 [line 34]\n REMOVE_TEMPS(n$44,n$45); [line 34]\n " shape="box"] +52 [label="52: DeclStmt \n n$44=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 34]\n n$45=_fun_NSArray_init(n$44:class NSArray *) virtual [line 34]\n *&a:class NSArray *=n$45 [line 34]\n REMOVE_TEMPS(n$44,n$45); [line 34]\n " shape="box"] - 54 -> 53 ; -53 [label="53: DeclStmt \n n$43=*&a:class NSArray * [line 36]\n *&objects:class NSArray *=n$43 [line 36]\n REMOVE_TEMPS(n$43); [line 36]\n NULLIFY(&a,false); [line 36]\n " shape="box"] + 52 -> 51 ; +51 [label="51: DeclStmt \n n$43=*&a:class NSArray * [line 36]\n *&objects:class NSArray *=n$43 [line 36]\n REMOVE_TEMPS(n$43); [line 36]\n NULLIFY(&a,false); [line 36]\n " shape="box"] - 53 -> 52 ; -52 [label="52: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array_trans______2); [line 40]\n n$42=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array_trans______2 ):unsigned long ) [line 40]\n *&__objc_anonymous_block_MyBlock_array_trans______2:class __objc_anonymous_block_MyBlock_array_trans______2 =n$42 [line 40]\n *&enumerateObjectsUsingBlock:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array_trans______2) [line 39]\n REMOVE_TEMPS(n$42); [line 39]\n " shape="box"] + 51 -> 50 ; +50 [label="50: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array_trans______2); [line 40]\n n$42=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array_trans______2 ):unsigned long ) [line 40]\n *&__objc_anonymous_block_MyBlock_array_trans______2:class __objc_anonymous_block_MyBlock_array_trans______2 =n$42 [line 40]\n *&enumerateObjectsUsingBlock:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array_trans______2) [line 39]\n REMOVE_TEMPS(n$42); [line 39]\n " shape="box"] - 52 -> 45 ; -51 [label="51: BinaryOperatorStmt: Assign \n NULLIFY(&ShouldStop,false); [line 45]\n n$41=*&stop:_Bool * [line 45]\n *n$41:_Bool =1 [line 45]\n REMOVE_TEMPS(n$41); [line 45]\n NULLIFY(&stop,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] + 50 -> 43 ; +49 [label="49: BinaryOperatorStmt: Assign \n NULLIFY(&ShouldStop,false); [line 45]\n n$41=*&stop:_Bool * [line 45]\n *n$41:_Bool =1 [line 45]\n REMOVE_TEMPS(n$41); [line 45]\n NULLIFY(&stop,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] - 51 -> 48 ; -50 [label="50: Prune (false branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 == 0), false); [line 44]\n REMOVE_TEMPS(n$40); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="invhouse"] + 49 -> 46 ; +48 [label="48: Prune (false branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 == 0), false); [line 44]\n REMOVE_TEMPS(n$40); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="invhouse"] - 50 -> 48 ; -49 [label="49: Prune (true branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 != 0), true); [line 44]\n REMOVE_TEMPS(n$40); [line 44]\n " shape="invhouse"] + 48 -> 46 ; +47 [label="47: Prune (true branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 != 0), true); [line 44]\n REMOVE_TEMPS(n$40); [line 44]\n " shape="invhouse"] - 49 -> 51 ; -48 [label="48: + \n NULLIFY(&ShouldStop,false); [line 44]\n NULLIFY(&stop,false); [line 44]\n " ] + 47 -> 49 ; +46 [label="46: + \n NULLIFY(&ShouldStop,false); [line 44]\n NULLIFY(&stop,false); [line 44]\n " ] - 48 -> 47 ; -47 [label="47: Exit __objc_anonymous_block_MyBlock_array_trans______2 \n " color=yellow style=filled] + 46 -> 45 ; +45 [label="45: Exit __objc_anonymous_block_MyBlock_array_trans______2 \n " color=yellow style=filled] -46 [label="46: Start __objc_anonymous_block_MyBlock_array_trans______2\nFormals: object:struct objc_object * idx:unsigned long stop:_Bool *\nLocals: ShouldStop:int \n DECLARE_LOCALS(&return,&ShouldStop); [line 40]\n NULLIFY(&idx,false); [line 40]\n NULLIFY(&object,false); [line 40]\n " color=yellow style=filled] +44 [label="44: Start __objc_anonymous_block_MyBlock_array_trans______2\nFormals: object:struct objc_object * idx:unsigned long stop:_Bool *\nLocals: ShouldStop:int \n DECLARE_LOCALS(&return,&ShouldStop); [line 40]\n NULLIFY(&idx,false); [line 40]\n NULLIFY(&object,false); [line 40]\n " color=yellow style=filled] - 46 -> 49 ; - 46 -> 50 ; -45 [label="45: DeclStmt \n n$39=_fun_malloc_no_fail(sizeof(_Bool ):_Bool ) [line 48]\n *&stop:_Bool *=n$39 [line 48]\n REMOVE_TEMPS(n$39); [line 48]\n " shape="box"] - - - 45 -> 44 ; -44 [label="44: BinaryOperatorStmt: Assign \n n$38=*&stop:_Bool * [line 49]\n *n$38:_Bool =0 [line 49]\n REMOVE_TEMPS(n$38); [line 49]\n " shape="box"] - - - 44 -> 33 ; -43 [label="43: DeclStmt \n n$35=*&objects:class NSArray * [line 53]\n n$36=*&idx:unsigned long [line 53]\n n$37=_fun_NSArray_objectAtIndexedSubscript:(n$35:class NSArray *,n$36:unsigned long ) virtual [line 53]\n *&object:struct objc_object *=n$37 [line 53]\n REMOVE_TEMPS(n$35,n$36,n$37); [line 53]\n " shape="box"] + 44 -> 47 ; + 44 -> 48 ; +43 [label="43: DeclStmt \n n$39=_fun_malloc_no_fail(sizeof(_Bool ):_Bool ) [line 48]\n *&stop:_Bool *=n$39 [line 48]\n REMOVE_TEMPS(n$39); [line 48]\n " shape="box"] 43 -> 42 ; -42 [label="42: Call n$31 \n n$31=*&enumerateObjectsUsingBlock:_fn_ (*) [line 54]\n n$32=*&object:struct objc_object * [line 54]\n n$33=*&idx:unsigned long [line 54]\n n$34=*&stop:_Bool * [line 54]\n n$31(n$32:struct objc_object *,n$33:unsigned long ,n$34:_Bool *) [line 54]\n REMOVE_TEMPS(n$31,n$32,n$33,n$34); [line 54]\n NULLIFY(&object,false); [line 54]\n " shape="box"] +42 [label="42: BinaryOperatorStmt: Assign \n n$38=*&stop:_Bool * [line 49]\n *n$38:_Bool =0 [line 49]\n REMOVE_TEMPS(n$38); [line 49]\n " shape="box"] - 42 -> 39 ; -41 [label="41: Prune (false branch) \n PRUNE(((n$30 == 1) == 0), false); [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n " shape="invhouse"] + 42 -> 31 ; +41 [label="41: DeclStmt \n n$35=*&objects:class NSArray * [line 53]\n n$36=*&idx:unsigned long [line 53]\n n$37=_fun_NSArray_objectAtIndexedSubscript:(n$35:class NSArray *,n$36:unsigned long ) virtual [line 53]\n *&object:struct objc_object *=n$37 [line 53]\n REMOVE_TEMPS(n$35,n$36,n$37); [line 53]\n " shape="box"] - 41 -> 38 ; -40 [label="40: Prune (true branch) \n PRUNE(((n$30 == 1) != 0), true); [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="invhouse"] + 41 -> 40 ; +40 [label="40: Call n$31 \n n$31=*&enumerateObjectsUsingBlock:_fn_ (*) [line 54]\n n$32=*&object:struct objc_object * [line 54]\n n$33=*&idx:unsigned long [line 54]\n n$34=*&stop:_Bool * [line 54]\n n$31(n$32:struct objc_object *,n$33:unsigned long ,n$34:_Bool *) [line 54]\n REMOVE_TEMPS(n$31,n$32,n$33,n$34); [line 54]\n NULLIFY(&object,false); [line 54]\n " shape="box"] - 40 -> 31 ; -39 [label="39: BinaryOperatorStmt: EQ \n n$29=*&stop:_Bool * [line 55]\n n$30=*n$29:_Bool [line 55]\n " shape="box"] + 40 -> 37 ; +39 [label="39: Prune (false branch) \n PRUNE(((n$30 == 1) == 0), false); [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n " shape="invhouse"] - 39 -> 40 ; - 39 -> 41 ; -38 [label="38: + \n " ] + 39 -> 36 ; +38 [label="38: Prune (true branch) \n PRUNE(((n$30 == 1) != 0), true); [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="invhouse"] - 38 -> 34 ; -37 [label="37: Prune (false branch) \n PRUNE(((n$26 < n$28) == 0), false); [line 51]\n REMOVE_TEMPS(n$26,n$27,n$28); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="invhouse"] + 38 -> 29 ; +37 [label="37: BinaryOperatorStmt: EQ \n n$29=*&stop:_Bool * [line 55]\n n$30=*n$29:_Bool [line 55]\n " shape="box"] - 37 -> 31 ; -36 [label="36: Prune (true branch) \n PRUNE(((n$26 < n$28) != 0), true); [line 51]\n REMOVE_TEMPS(n$26,n$27,n$28); [line 51]\n " shape="invhouse"] + 37 -> 38 ; + 37 -> 39 ; +36 [label="36: + \n " ] - 36 -> 43 ; -35 [label="35: BinaryOperatorStmt: LT \n n$26=*&idx:unsigned long [line 51]\n n$27=*&objects:class NSArray * [line 51]\n n$28=_fun_NSArray_count(n$27:class NSArray *) [line 51]\n " shape="box"] + 36 -> 32 ; +35 [label="35: Prune (false branch) \n PRUNE(((n$26 < n$28) == 0), false); [line 51]\n REMOVE_TEMPS(n$26,n$27,n$28); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="invhouse"] - 35 -> 36 ; - 35 -> 37 ; -34 [label="34: UnaryOperator \n n$25=*&idx:unsigned long [line 51]\n *&idx:unsigned long =(n$25 + 1) [line 51]\n REMOVE_TEMPS(n$25); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] + 35 -> 29 ; +34 [label="34: Prune (true branch) \n PRUNE(((n$26 < n$28) != 0), true); [line 51]\n REMOVE_TEMPS(n$26,n$27,n$28); [line 51]\n " shape="invhouse"] - 34 -> 32 ; -33 [label="33: DeclStmt \n *&idx:unsigned long =0 [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] + 34 -> 41 ; +33 [label="33: BinaryOperatorStmt: LT \n n$26=*&idx:unsigned long [line 51]\n n$27=*&objects:class NSArray * [line 51]\n n$28=_fun_NSArray_count(n$27:class NSArray *) [line 51]\n " shape="box"] - 33 -> 32 ; -32 [label="32: + \n " ] + 33 -> 34 ; + 33 -> 35 ; +32 [label="32: UnaryOperator \n n$25=*&idx:unsigned long [line 51]\n *&idx:unsigned long =(n$25 + 1) [line 51]\n REMOVE_TEMPS(n$25); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] - 32 -> 35 ; -31 [label="31: Call _fun_free \n NULLIFY(&enumerateObjectsUsingBlock,false); [line 58]\n NULLIFY(&idx,false); [line 58]\n NULLIFY(&objects,false); [line 58]\n n$24=*&stop:_Bool * [line 58]\n _fun_free(n$24:void *) [line 58]\n REMOVE_TEMPS(n$24); [line 58]\n NULLIFY(&__objc_anonymous_block_MyBlock_array_trans______2,true); [line 58]\n NULLIFY(&stop,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] + 32 -> 30 ; +31 [label="31: DeclStmt \n *&idx:unsigned long =0 [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] 31 -> 30 ; -30 [label="30: Exit MyBlock_array_trans \n " color=yellow style=filled] +30 [label="30: + \n " ] -29 [label="29: Start MyBlock_array_trans\nFormals: self:class MyBlock *\nLocals: idx:unsigned long object:struct objc_object * stop:_Bool * enumerateObjectsUsingBlock:_fn_ (*) objects:class NSArray * a:class NSArray * \n DECLARE_LOCALS(&return,&idx,&object,&stop,&enumerateObjectsUsingBlock,&objects,&a); [line 32]\n NULLIFY(&a,false); [line 32]\n NULLIFY(&enumerateObjectsUsingBlock,false); [line 32]\n NULLIFY(&idx,false); [line 32]\n NULLIFY(&object,false); [line 32]\n NULLIFY(&objects,false); [line 32]\n NULLIFY(&self,false); [line 32]\n NULLIFY(&stop,false); [line 32]\n " color=yellow style=filled] + 30 -> 33 ; +29 [label="29: Call _fun_free \n NULLIFY(&enumerateObjectsUsingBlock,false); [line 58]\n NULLIFY(&idx,false); [line 58]\n NULLIFY(&objects,false); [line 58]\n n$24=*&stop:_Bool * [line 58]\n _fun_free(n$24:void *) [line 58]\n REMOVE_TEMPS(n$24); [line 58]\n NULLIFY(&__objc_anonymous_block_MyBlock_array_trans______2,true); [line 58]\n NULLIFY(&stop,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] - 29 -> 54 ; -28 [label="28: DeclStmt \n n$22=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 20]\n n$23=_fun_NSArray_init(n$22:class NSArray *) virtual [line 20]\n *&a:class NSArray *=n$23 [line 20]\n REMOVE_TEMPS(n$22,n$23); [line 20]\n " shape="box"] + 29 -> 28 ; +28 [label="28: Exit MyBlock_array_trans \n " color=yellow style=filled] - 28 -> 27 ; -27 [label="27: DeclStmt \n n$21=*&a:class NSArray * [line 21]\n *&objects:class NSArray *=n$21 [line 21]\n REMOVE_TEMPS(n$21); [line 21]\n NULLIFY(&a,false); [line 21]\n " shape="box"] +27 [label="27: Start MyBlock_array_trans\nFormals: self:class MyBlock *\nLocals: idx:unsigned long object:struct objc_object * stop:_Bool * enumerateObjectsUsingBlock:_fn_ (*) objects:class NSArray * a:class NSArray * \n DECLARE_LOCALS(&return,&idx,&object,&stop,&enumerateObjectsUsingBlock,&objects,&a); [line 32]\n NULLIFY(&a,false); [line 32]\n NULLIFY(&enumerateObjectsUsingBlock,false); [line 32]\n NULLIFY(&idx,false); [line 32]\n NULLIFY(&object,false); [line 32]\n NULLIFY(&objects,false); [line 32]\n NULLIFY(&self,false); [line 32]\n NULLIFY(&stop,false); [line 32]\n " color=yellow style=filled] - 27 -> 26 ; -26 [label="26: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array______1); [line 21]\n n$20=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array______1 ):unsigned long ) [line 21]\n *&__objc_anonymous_block_MyBlock_array______1:class __objc_anonymous_block_MyBlock_array______1 =n$20 [line 21]\n *&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array______1) [line 21]\n REMOVE_TEMPS(n$20); [line 21]\n " shape="box"] + 27 -> 52 ; +26 [label="26: DeclStmt \n n$22=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 20]\n n$23=_fun_NSArray_init(n$22:class NSArray *) virtual [line 20]\n *&a:class NSArray *=n$23 [line 20]\n REMOVE_TEMPS(n$22,n$23); [line 20]\n " shape="box"] - 26 -> 19 ; -25 [label="25: BinaryOperatorStmt: Assign \n NULLIFY(&ShouldStop,false); [line 27]\n n$19=*&stop:_Bool * [line 27]\n *n$19:_Bool =1 [line 27]\n REMOVE_TEMPS(n$19); [line 27]\n NULLIFY(&stop,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] + 26 -> 25 ; +25 [label="25: DeclStmt \n n$21=*&a:class NSArray * [line 21]\n *&objects:class NSArray *=n$21 [line 21]\n REMOVE_TEMPS(n$21); [line 21]\n NULLIFY(&a,false); [line 21]\n " shape="box"] - 25 -> 22 ; -24 [label="24: Prune (false branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 == 0), false); [line 26]\n REMOVE_TEMPS(n$18); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] + 25 -> 24 ; +24 [label="24: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array______1); [line 21]\n n$20=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array______1 ):unsigned long ) [line 21]\n *&__objc_anonymous_block_MyBlock_array______1:class __objc_anonymous_block_MyBlock_array______1 =n$20 [line 21]\n *&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array______1) [line 21]\n REMOVE_TEMPS(n$20); [line 21]\n " shape="box"] - 24 -> 22 ; -23 [label="23: Prune (true branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 != 0), true); [line 26]\n REMOVE_TEMPS(n$18); [line 26]\n " shape="invhouse"] + 24 -> 17 ; +23 [label="23: BinaryOperatorStmt: Assign \n NULLIFY(&ShouldStop,false); [line 27]\n n$19=*&stop:_Bool * [line 27]\n *n$19:_Bool =1 [line 27]\n REMOVE_TEMPS(n$19); [line 27]\n NULLIFY(&stop,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] - 23 -> 25 ; -22 [label="22: + \n NULLIFY(&ShouldStop,false); [line 26]\n NULLIFY(&stop,false); [line 26]\n " ] + 23 -> 20 ; +22 [label="22: Prune (false branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 == 0), false); [line 26]\n REMOVE_TEMPS(n$18); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] - 22 -> 21 ; -21 [label="21: Exit __objc_anonymous_block_MyBlock_array______1 \n " color=yellow style=filled] + 22 -> 20 ; +21 [label="21: Prune (true branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 != 0), true); [line 26]\n REMOVE_TEMPS(n$18); [line 26]\n " shape="invhouse"] -20 [label="20: Start __objc_anonymous_block_MyBlock_array______1\nFormals: object:struct objc_object * idx:unsigned long stop:_Bool *\nLocals: ShouldStop:int \n DECLARE_LOCALS(&return,&ShouldStop); [line 21]\n NULLIFY(&idx,false); [line 21]\n NULLIFY(&object,false); [line 21]\n " color=yellow style=filled] + 21 -> 23 ; +20 [label="20: + \n NULLIFY(&ShouldStop,false); [line 26]\n NULLIFY(&stop,false); [line 26]\n " ] - 20 -> 23 ; - 20 -> 24 ; -19 [label="19: DeclStmt \n n$17=_fun_malloc_no_fail(sizeof(signed char ):signed char ) [line 21]\n *&stop:_Bool *=n$17 [line 21]\n REMOVE_TEMPS(n$17); [line 21]\n " shape="box"] + 20 -> 19 ; +19 [label="19: Exit __objc_anonymous_block_MyBlock_array______1 \n " color=yellow style=filled] - 19 -> 18 ; -18 [label="18: BinaryOperatorStmt: Assign \n n$16=*&stop:_Bool * [line 21]\n *n$16:void =0 [line 21]\n REMOVE_TEMPS(n$16); [line 21]\n " shape="box"] +18 [label="18: Start __objc_anonymous_block_MyBlock_array______1\nFormals: object:struct objc_object * idx:unsigned long stop:_Bool *\nLocals: ShouldStop:int \n DECLARE_LOCALS(&return,&ShouldStop); [line 21]\n NULLIFY(&idx,false); [line 21]\n NULLIFY(&object,false); [line 21]\n " color=yellow style=filled] - 18 -> 7 ; -17 [label="17: DeclStmt \n n$13=*&objects:class NSArray * [line 21]\n n$14=*&idx:unsigned long [line 21]\n n$15=_fun_NSArray_objectAtIndexedSubscript:(n$13:class NSArray *,n$14:unsigned long ) virtual [line 21]\n *&object:struct objc_object *=n$15 [line 21]\n REMOVE_TEMPS(n$13,n$14,n$15); [line 21]\n NULLIFY(&object,false); [line 21]\n " shape="box"] + 18 -> 21 ; + 18 -> 22 ; +17 [label="17: DeclStmt \n n$17=_fun_malloc_no_fail(sizeof(signed char ):signed char ) [line 21]\n *&stop:_Bool *=n$17 [line 21]\n REMOVE_TEMPS(n$17); [line 21]\n " shape="box"] 17 -> 16 ; -16 [label="16: Call n$8 \n n$8=*&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*) [line 21]\n n$9=*&object:struct objc_object * [line 21]\n n$10=*&idx:unsigned long [line 21]\n n$11=*&stop:_Bool * [line 21]\n n$12=n$8(n$9:struct objc_object *,n$10:unsigned long ,n$11:_Bool *) [line 21]\n REMOVE_TEMPS(n$8,n$9,n$10,n$11,n$12); [line 21]\n " shape="box"] +16 [label="16: BinaryOperatorStmt: Assign \n n$16=*&stop:_Bool * [line 21]\n *n$16:void =0 [line 21]\n REMOVE_TEMPS(n$16); [line 21]\n " shape="box"] - 16 -> 13 ; -15 [label="15: Prune (false branch) \n n$7=*n$6:signed char [line 21]\n PRUNE((n$7 == 0), false); [line 21]\n REMOVE_TEMPS(n$6,n$7); [line 21]\n " shape="invhouse"] + 16 -> 5 ; +15 [label="15: DeclStmt \n n$13=*&objects:class NSArray * [line 21]\n n$14=*&idx:unsigned long [line 21]\n n$15=_fun_NSArray_objectAtIndexedSubscript:(n$13:class NSArray *,n$14:unsigned long ) virtual [line 21]\n *&object:struct objc_object *=n$15 [line 21]\n REMOVE_TEMPS(n$13,n$14,n$15); [line 21]\n NULLIFY(&object,false); [line 21]\n " shape="box"] - 15 -> 12 ; -14 [label="14: Prune (true branch) \n n$7=*n$6:signed char [line 21]\n PRUNE((n$7 != 0), true); [line 21]\n REMOVE_TEMPS(n$6,n$7); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] + 15 -> 14 ; +14 [label="14: Call n$8 \n n$8=*&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*) [line 21]\n n$9=*&object:struct objc_object * [line 21]\n n$10=*&idx:unsigned long [line 21]\n n$11=*&stop:_Bool * [line 21]\n n$12=n$8(n$9:struct objc_object *,n$10:unsigned long ,n$11:_Bool *) [line 21]\n REMOVE_TEMPS(n$8,n$9,n$10,n$11,n$12); [line 21]\n " shape="box"] - 14 -> 5 ; -13 [label="13: UnaryOperator \n n$6=*&stop:_Bool * [line 21]\n " shape="box"] + 14 -> 11 ; +13 [label="13: Prune (false branch) \n n$7=*n$6:signed char [line 21]\n PRUNE((n$7 == 0), false); [line 21]\n REMOVE_TEMPS(n$6,n$7); [line 21]\n " shape="invhouse"] - 13 -> 14 ; - 13 -> 15 ; -12 [label="12: + \n " ] + 13 -> 10 ; +12 [label="12: Prune (true branch) \n n$7=*n$6:signed char [line 21]\n PRUNE((n$7 != 0), true); [line 21]\n REMOVE_TEMPS(n$6,n$7); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] - 12 -> 8 ; -11 [label="11: Prune (false branch) \n PRUNE(((n$3 < n$5) == 0), false); [line 21]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] + 12 -> 3 ; +11 [label="11: UnaryOperator \n n$6=*&stop:_Bool * [line 21]\n " shape="box"] - 11 -> 5 ; -10 [label="10: Prune (true branch) \n PRUNE(((n$3 < n$5) != 0), true); [line 21]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 21]\n " shape="invhouse"] + 11 -> 12 ; + 11 -> 13 ; +10 [label="10: + \n " ] - 10 -> 17 ; -9 [label="9: BinaryOperatorStmt: LT \n n$3=*&idx:unsigned long [line 21]\n n$4=*&objects:class NSArray * [line 21]\n n$5=_fun_NSArray_count(n$4:class NSArray *) virtual [line 21]\n " shape="box"] + 10 -> 6 ; +9 [label="9: Prune (false branch) \n PRUNE(((n$3 < n$5) == 0), false); [line 21]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] - 9 -> 10 ; - 9 -> 11 ; -8 [label="8: UnaryOperator \n n$2=*&idx:unsigned long [line 21]\n *&idx:unsigned long =(n$2 + 1) [line 21]\n REMOVE_TEMPS(n$2); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] + 9 -> 3 ; +8 [label="8: Prune (true branch) \n PRUNE(((n$3 < n$5) != 0), true); [line 21]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 21]\n " shape="invhouse"] - 8 -> 6 ; -7 [label="7: DeclStmt \n *&idx:unsigned long =0 [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] + 8 -> 15 ; +7 [label="7: BinaryOperatorStmt: LT \n n$3=*&idx:unsigned long [line 21]\n n$4=*&objects:class NSArray * [line 21]\n n$5=_fun_NSArray_count(n$4:class NSArray *) virtual [line 21]\n " shape="box"] - 7 -> 6 ; -6 [label="6: + \n " ] + 7 -> 8 ; + 7 -> 9 ; +6 [label="6: UnaryOperator \n n$2=*&idx:unsigned long [line 21]\n *&idx:unsigned long =(n$2 + 1) [line 21]\n REMOVE_TEMPS(n$2); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] - 6 -> 9 ; -5 [label="5: Call _fun_free \n NULLIFY(&idx,false); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 21]\n NULLIFY(&objects,false); [line 21]\n n$0=*&stop:_Bool * [line 21]\n n$1=_fun_free(n$0:void *) [line 21]\n NULLIFY(&object,true); [line 21]\n NULLIFY(&idx,true); [line 21]\n NULLIFY(&stop,true); [line 21]\n NULLIFY(&objects,true); [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&__objc_anonymous_block_MyBlock_array______1,true); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,true); [line 21]\n NULLIFY(&idx,false); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 21]\n NULLIFY(&objects,false); [line 21]\n NULLIFY(&stop,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] + 6 -> 4 ; +5 [label="5: DeclStmt \n *&idx:unsigned long =0 [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 5 -> 4 ; -4 [label="4: Exit MyBlock_array \n " color=yellow style=filled] +4 [label="4: + \n " ] -3 [label="3: Start MyBlock_array\nFormals: self:class MyBlock *\nLocals: idx:unsigned long object:struct objc_object * stop:_Bool * infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*) objects:class NSArray * a:class NSArray * \n DECLARE_LOCALS(&return,&idx,&object,&stop,&infer___objc_anonymous_block_MyBlock_array______1,&objects,&a); [line 18]\n NULLIFY(&a,false); [line 18]\n NULLIFY(&idx,false); [line 18]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 18]\n NULLIFY(&object,false); [line 18]\n NULLIFY(&objects,false); [line 18]\n NULLIFY(&self,false); [line 18]\n NULLIFY(&stop,false); [line 18]\n " color=yellow style=filled] + 4 -> 7 ; +3 [label="3: Call _fun_free \n NULLIFY(&idx,false); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 21]\n NULLIFY(&objects,false); [line 21]\n n$0=*&stop:_Bool * [line 21]\n n$1=_fun_free(n$0:void *) [line 21]\n NULLIFY(&object,true); [line 21]\n NULLIFY(&idx,true); [line 21]\n NULLIFY(&stop,true); [line 21]\n NULLIFY(&objects,true); [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&__objc_anonymous_block_MyBlock_array______1,true); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,true); [line 21]\n NULLIFY(&idx,false); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 21]\n NULLIFY(&objects,false); [line 21]\n NULLIFY(&stop,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] - 3 -> 28 ; -2 [label="2: Exit MyBlock_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit MyBlock_array \n " color=yellow style=filled] -1 [label="1: Start MyBlock_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start MyBlock_array\nFormals: self:class MyBlock *\nLocals: idx:unsigned long object:struct objc_object * stop:_Bool * infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*) objects:class NSArray * a:class NSArray * \n DECLARE_LOCALS(&return,&idx,&object,&stop,&infer___objc_anonymous_block_MyBlock_array______1,&objects,&a); [line 18]\n NULLIFY(&a,false); [line 18]\n NULLIFY(&idx,false); [line 18]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 18]\n NULLIFY(&object,false); [line 18]\n NULLIFY(&objects,false); [line 18]\n NULLIFY(&self,false); [line 18]\n NULLIFY(&stop,false); [line 18]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 26 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot b/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot index d4265d1ca..ed5118b4e 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot @@ -1,72 +1,65 @@ digraph iCFG { -18 [label="18: BinaryOperatorStmt: Assign \n *&#GB$g:int =7 [line 22]\n " shape="box"] +16 [label="16: BinaryOperatorStmt: Assign \n *&#GB$g:int =7 [line 22]\n " shape="box"] - 18 -> 17 ; -17 [label="17: DeclStmt \n *&z:int =3 [line 24]\n " shape="box"] - - - 17 -> 16 ; -16 [label="16: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_m______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_m______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_m______1:class __objc_anonymous_block_My_manager_m______1 =n$7 [line 25]\n n$8=*&z:int [line 25]\n n$9=*&#GB$g:int [line 25]\n *n$7.z:int =n$8 [line 25]\n *n$7.g:int =n$9 [line 25]\n n$5=*&z:int [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_m______1,n$5) [line 25]\n REMOVE_TEMPS(n$7,n$8,n$9,n$5); [line 25]\n " shape="box"] - - - 16 -> 12 ; -15 [label="15: BinaryOperatorStmt: Assign \n n$6=*&z:int [line 26]\n *&#GB$g:int =(n$6 + 3) [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n NULLIFY(&z,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] + 16 -> 15 ; +15 [label="15: DeclStmt \n *&z:int =3 [line 24]\n " shape="box"] 15 -> 14 ; -14 [label="14: Exit __objc_anonymous_block_My_manager_m______1 \n " color=yellow style=filled] +14 [label="14: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_m______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_m______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_m______1:class __objc_anonymous_block_My_manager_m______1 =n$7 [line 25]\n n$8=*&z:int [line 25]\n n$9=*&#GB$g:int [line 25]\n *n$7.z:int =n$8 [line 25]\n *n$7.g:int =n$9 [line 25]\n n$5=*&z:int [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_m______1,n$5) [line 25]\n REMOVE_TEMPS(n$7,n$8,n$9,n$5); [line 25]\n " shape="box"] -13 [label="13: Start __objc_anonymous_block_My_manager_m______1\nFormals: z:int \nLocals: \nCaptured: z:int \n DECLARE_LOCALS(&return); [line 25]\n " color=yellow style=filled] + 14 -> 10 ; +13 [label="13: BinaryOperatorStmt: Assign \n n$6=*&z:int [line 26]\n *&#GB$g:int =(n$6 + 3) [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n NULLIFY(&z,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] - 13 -> 15 ; -12 [label="12: Call n$4 \n n$4=*&b:_fn_ (*) [line 28]\n n$4() [line 28]\n REMOVE_TEMPS(n$4); [line 28]\n NULLIFY(&b,false); [line 28]\n " shape="box"] + 13 -> 12 ; +12 [label="12: Exit __objc_anonymous_block_My_manager_m______1 \n " color=yellow style=filled] - 12 -> 11 ; -11 [label="11: DeclStmt \n *&p:int *=0 [line 29]\n " shape="box"] +11 [label="11: Start __objc_anonymous_block_My_manager_m______1\nFormals: z:int \nLocals: \nCaptured: z:int \n DECLARE_LOCALS(&return); [line 25]\n " color=yellow style=filled] - 11 -> 6 ; -10 [label="10: Return Stmt \n NULLIFY(&p,false); [line 33]\n n$3=*&z:int [line 33]\n *&return:int =n$3 [line 33]\n REMOVE_TEMPS(n$3); [line 33]\n NULLIFY(&__objc_anonymous_block_My_manager_m______1,true); [line 33]\n NULLIFY(&z,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] + 11 -> 13 ; +10 [label="10: Call n$4 \n n$4=*&b:_fn_ (*) [line 28]\n n$4() [line 28]\n REMOVE_TEMPS(n$4); [line 28]\n NULLIFY(&b,false); [line 28]\n " shape="box"] - 10 -> 4 ; -9 [label="9: Return Stmt \n NULLIFY(&z,false); [line 31]\n n$1=*&p:int * [line 31]\n n$2=*n$1:int [line 31]\n *&return:int =n$2 [line 31]\n REMOVE_TEMPS(n$1,n$2); [line 31]\n NULLIFY(&__objc_anonymous_block_My_manager_m______1,true); [line 31]\n NULLIFY(&p,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] + 10 -> 9 ; +9 [label="9: DeclStmt \n *&p:int *=0 [line 29]\n " shape="box"] 9 -> 4 ; -8 [label="8: Prune (false branch) \n PRUNE(((n$0 == 6) == 0), false); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n " shape="invhouse"] +8 [label="8: Return Stmt \n NULLIFY(&p,false); [line 33]\n n$3=*&z:int [line 33]\n *&return:int =n$3 [line 33]\n REMOVE_TEMPS(n$3); [line 33]\n NULLIFY(&__objc_anonymous_block_My_manager_m______1,true); [line 33]\n NULLIFY(&z,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] - 8 -> 10 ; -7 [label="7: Prune (true branch) \n PRUNE(((n$0 == 6) != 0), true); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n " shape="invhouse"] + 8 -> 2 ; +7 [label="7: Return Stmt \n NULLIFY(&z,false); [line 31]\n n$1=*&p:int * [line 31]\n n$2=*n$1:int [line 31]\n *&return:int =n$2 [line 31]\n REMOVE_TEMPS(n$1,n$2); [line 31]\n NULLIFY(&__objc_anonymous_block_My_manager_m______1,true); [line 31]\n NULLIFY(&p,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 7 -> 9 ; -6 [label="6: BinaryOperatorStmt: EQ \n n$0=*&#GB$g:int [line 30]\n " shape="box"] + 7 -> 2 ; +6 [label="6: Prune (false branch) \n PRUNE(((n$0 == 6) == 0), false); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n " shape="invhouse"] - 6 -> 7 ; 6 -> 8 ; -5 [label="5: + \n NULLIFY(&__objc_anonymous_block_My_manager_m______1,true); [line 30]\n NULLIFY(&b,false); [line 30]\n NULLIFY(&p,false); [line 30]\n NULLIFY(&self,false); [line 30]\n NULLIFY(&z,false); [line 30]\n " ] +5 [label="5: Prune (true branch) \n PRUNE(((n$0 == 6) != 0), true); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n " shape="invhouse"] - 5 -> 4 ; -4 [label="4: Exit My_manager_m \n " color=yellow style=filled] + 5 -> 7 ; +4 [label="4: BinaryOperatorStmt: EQ \n n$0=*&#GB$g:int [line 30]\n " shape="box"] -3 [label="3: Start My_manager_m\nFormals: self:class My_manager *\nLocals: p:int * z:int b:_fn_ (*) \n DECLARE_LOCALS(&return,&p,&z,&b); [line 21]\n NULLIFY(&b,false); [line 21]\n NULLIFY(&p,false); [line 21]\n NULLIFY(&self,false); [line 21]\n NULLIFY(&z,false); [line 21]\n " color=yellow style=filled] + 4 -> 5 ; + 4 -> 6 ; +3 [label="3: + \n NULLIFY(&__objc_anonymous_block_My_manager_m______1,true); [line 30]\n NULLIFY(&b,false); [line 30]\n NULLIFY(&p,false); [line 30]\n NULLIFY(&self,false); [line 30]\n NULLIFY(&z,false); [line 30]\n " ] - 3 -> 18 ; -2 [label="2: Exit My_manager_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit My_manager_m \n " color=yellow style=filled] -1 [label="1: Start My_manager_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start My_manager_m\nFormals: self:class My_manager *\nLocals: p:int * z:int b:_fn_ (*) \n DECLARE_LOCALS(&return,&p,&z,&b); [line 21]\n NULLIFY(&b,false); [line 21]\n NULLIFY(&p,false); [line 21]\n NULLIFY(&self,false); [line 21]\n NULLIFY(&z,false); [line 21]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 16 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot b/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot index 425f7144d..33bcc199e 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot @@ -1,81 +1,74 @@ digraph iCFG { -20 [label="20: DeclStmt \n *&z:int =3 [line 22]\n " shape="box"] - - - 20 -> 19 ; -19 [label="19: DeclStmt \n n$12=_fun_CGBitmapContextCreate(0:void *,0:unsigned long ,0:unsigned long ,8:unsigned long ,0:unsigned long ,0:struct CGColorSpace *,0:unsigned int ) [line 23]\n *&context:struct CGContext *=n$12 [line 23]\n REMOVE_TEMPS(n$12); [line 23]\n " shape="box"] - - - 19 -> 18 ; -18 [label="18: DeclStmt \n n$10=*&context:struct CGContext * [line 24]\n n$11=_fun_CGBitmapContextCreateImage(n$10:struct CGContext *) [line 24]\n *&newImage:struct CGImage *=n$11 [line 24]\n REMOVE_TEMPS(n$10,n$11); [line 24]\n " shape="box"] +18 [label="18: DeclStmt \n *&z:int =3 [line 22]\n " shape="box"] 18 -> 17 ; -17 [label="17: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_blockReleaseTODO______1); [line 25]\n n$8=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_blockReleaseTODO______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_blockReleaseTODO______1:class __objc_anonymous_block_My_manager_blockReleaseTODO______1 =n$8 [line 25]\n n$9=*&newImage:struct CGImage * [line 25]\n *n$8.newImage:struct CGImage *=n$9 [line 25]\n n$5=*&newImage:struct CGImage * [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_blockReleaseTODO______1,n$5) [line 25]\n REMOVE_TEMPS(n$8,n$9,n$5); [line 25]\n NULLIFY(&newImage,false); [line 25]\n " shape="box"] +17 [label="17: DeclStmt \n n$12=_fun_CGBitmapContextCreate(0:void *,0:unsigned long ,0:unsigned long ,8:unsigned long ,0:unsigned long ,0:struct CGColorSpace *,0:unsigned int ) [line 23]\n *&context:struct CGContext *=n$12 [line 23]\n REMOVE_TEMPS(n$12); [line 23]\n " shape="box"] - 17 -> 10 ; -16 [label="16: Call _fun_CGImageRelease \n n$7=*&newImage:struct CGImage * [line 27]\n _fun_CGImageRelease(n$7:struct CGImage *) [line 27]\n REMOVE_TEMPS(n$7); [line 27]\n NULLIFY(&newImage,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] + 17 -> 16 ; +16 [label="16: DeclStmt \n n$10=*&context:struct CGContext * [line 24]\n n$11=_fun_CGBitmapContextCreateImage(n$10:struct CGContext *) [line 24]\n *&newImage:struct CGImage *=n$11 [line 24]\n REMOVE_TEMPS(n$10,n$11); [line 24]\n " shape="box"] - 16 -> 13 ; -15 [label="15: Prune (false branch) \n n$6=*&newImage:struct CGImage * [line 26]\n PRUNE((n$6 == 0), false); [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] + 16 -> 15 ; +15 [label="15: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_blockReleaseTODO______1); [line 25]\n n$8=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_blockReleaseTODO______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_blockReleaseTODO______1:class __objc_anonymous_block_My_manager_blockReleaseTODO______1 =n$8 [line 25]\n n$9=*&newImage:struct CGImage * [line 25]\n *n$8.newImage:struct CGImage *=n$9 [line 25]\n n$5=*&newImage:struct CGImage * [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_blockReleaseTODO______1,n$5) [line 25]\n REMOVE_TEMPS(n$8,n$9,n$5); [line 25]\n NULLIFY(&newImage,false); [line 25]\n " shape="box"] - 15 -> 13 ; -14 [label="14: Prune (true branch) \n n$6=*&newImage:struct CGImage * [line 26]\n PRUNE((n$6 != 0), true); [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n " shape="invhouse"] + 15 -> 8 ; +14 [label="14: Call _fun_CGImageRelease \n n$7=*&newImage:struct CGImage * [line 27]\n _fun_CGImageRelease(n$7:struct CGImage *) [line 27]\n REMOVE_TEMPS(n$7); [line 27]\n NULLIFY(&newImage,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] - 14 -> 16 ; -13 [label="13: + \n NULLIFY(&newImage,false); [line 26]\n " ] + 14 -> 11 ; +13 [label="13: Prune (false branch) \n n$6=*&newImage:struct CGImage * [line 26]\n PRUNE((n$6 == 0), false); [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] - 13 -> 12 ; -12 [label="12: Exit __objc_anonymous_block_My_manager_blockReleaseTODO______1 \n " color=yellow style=filled] + 13 -> 11 ; +12 [label="12: Prune (true branch) \n n$6=*&newImage:struct CGImage * [line 26]\n PRUNE((n$6 != 0), true); [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n " shape="invhouse"] -11 [label="11: Start __objc_anonymous_block_My_manager_blockReleaseTODO______1\nFormals: newImage:struct CGImage * a:int \nLocals: \nCaptured: newImage:struct CGImage * \n DECLARE_LOCALS(&return); [line 25]\n NULLIFY(&a,false); [line 25]\n " color=yellow style=filled] + 12 -> 14 ; +11 [label="11: + \n NULLIFY(&newImage,false); [line 26]\n " ] - 11 -> 14 ; - 11 -> 15 ; -10 [label="10: Call n$3 \n n$3=*&b:_fn_ (*) [line 29]\n n$4=*&z:int [line 29]\n n$3(n$4:int ) [line 29]\n REMOVE_TEMPS(n$3,n$4); [line 29]\n NULLIFY(&b,false); [line 29]\n " shape="box"] + 11 -> 10 ; +10 [label="10: Exit __objc_anonymous_block_My_manager_blockReleaseTODO______1 \n " color=yellow style=filled] - 10 -> 7 ; - 10 -> 8 ; -9 [label="9: Call _fun_CGContextRelease \n n$2=*&context:struct CGContext * [line 31]\n _fun_CGContextRelease(n$2:struct CGContext *) [line 31]\n REMOVE_TEMPS(n$2); [line 31]\n NULLIFY(&context,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +9 [label="9: Start __objc_anonymous_block_My_manager_blockReleaseTODO______1\nFormals: newImage:struct CGImage * a:int \nLocals: \nCaptured: newImage:struct CGImage * \n DECLARE_LOCALS(&return); [line 25]\n NULLIFY(&a,false); [line 25]\n " color=yellow style=filled] - 9 -> 6 ; -8 [label="8: Prune (false branch) \n n$1=*&context:struct CGContext * [line 30]\n PRUNE((n$1 == 0), false); [line 30]\n REMOVE_TEMPS(n$1); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="invhouse"] + 9 -> 12 ; + 9 -> 13 ; +8 [label="8: Call n$3 \n n$3=*&b:_fn_ (*) [line 29]\n n$4=*&z:int [line 29]\n n$3(n$4:int ) [line 29]\n REMOVE_TEMPS(n$3,n$4); [line 29]\n NULLIFY(&b,false); [line 29]\n " shape="box"] + 8 -> 5 ; 8 -> 6 ; -7 [label="7: Prune (true branch) \n n$1=*&context:struct CGContext * [line 30]\n PRUNE((n$1 != 0), true); [line 30]\n REMOVE_TEMPS(n$1); [line 30]\n " shape="invhouse"] +7 [label="7: Call _fun_CGContextRelease \n n$2=*&context:struct CGContext * [line 31]\n _fun_CGContextRelease(n$2:struct CGContext *) [line 31]\n REMOVE_TEMPS(n$2); [line 31]\n NULLIFY(&context,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 7 -> 9 ; -6 [label="6: + \n " ] + 7 -> 4 ; +6 [label="6: Prune (false branch) \n n$1=*&context:struct CGContext * [line 30]\n PRUNE((n$1 == 0), false); [line 30]\n REMOVE_TEMPS(n$1); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="invhouse"] - 6 -> 5 ; -5 [label="5: Return Stmt \n NULLIFY(&context,false); [line 32]\n n$0=*&z:int [line 32]\n *&return:int =n$0 [line 32]\n REMOVE_TEMPS(n$0); [line 32]\n NULLIFY(&__objc_anonymous_block_My_manager_blockReleaseTODO______1,true); [line 32]\n NULLIFY(&z,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] + 6 -> 4 ; +5 [label="5: Prune (true branch) \n n$1=*&context:struct CGContext * [line 30]\n PRUNE((n$1 != 0), true); [line 30]\n REMOVE_TEMPS(n$1); [line 30]\n " shape="invhouse"] - 5 -> 4 ; -4 [label="4: Exit My_manager_blockReleaseTODO \n " color=yellow style=filled] + 5 -> 7 ; +4 [label="4: + \n " ] -3 [label="3: Start My_manager_blockReleaseTODO\nFormals: self:class My_manager *\nLocals: newImage:struct CGImage * context:struct CGContext * z:int b:_fn_ (*) \n DECLARE_LOCALS(&return,&newImage,&context,&z,&b); [line 20]\n NULLIFY(&b,false); [line 20]\n NULLIFY(&context,false); [line 20]\n NULLIFY(&newImage,false); [line 20]\n NULLIFY(&self,false); [line 20]\n NULLIFY(&z,false); [line 20]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Return Stmt \n NULLIFY(&context,false); [line 32]\n n$0=*&z:int [line 32]\n *&return:int =n$0 [line 32]\n REMOVE_TEMPS(n$0); [line 32]\n NULLIFY(&__objc_anonymous_block_My_manager_blockReleaseTODO______1,true); [line 32]\n NULLIFY(&z,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] - 3 -> 20 ; -2 [label="2: Exit My_manager_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit My_manager_blockReleaseTODO \n " color=yellow style=filled] -1 [label="1: Start My_manager_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start My_manager_blockReleaseTODO\nFormals: self:class My_manager *\nLocals: newImage:struct CGImage * context:struct CGContext * z:int b:_fn_ (*) \n DECLARE_LOCALS(&return,&newImage,&context,&z,&b); [line 20]\n NULLIFY(&b,false); [line 20]\n NULLIFY(&context,false); [line 20]\n NULLIFY(&newImage,false); [line 20]\n NULLIFY(&self,false); [line 20]\n NULLIFY(&z,false); [line 20]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 18 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot b/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot index c50a98120..5535ea56a 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot @@ -1,109 +1,102 @@ digraph iCFG { -28 [label="28: DeclStmt \n n$3=_fun_A_sharedInstance() [line 43]\n *&b:class A *=n$3 [line 43]\n REMOVE_TEMPS(n$3); [line 43]\n " shape="box"] +26 [label="26: DeclStmt \n n$3=_fun_A_sharedInstance() [line 43]\n *&b:class A *=n$3 [line 43]\n REMOVE_TEMPS(n$3); [line 43]\n " shape="box"] - 28 -> 27 ; -27 [label="27: DeclStmt \n *&p:int *=0 [line 44]\n " shape="box"] - - - 27 -> 22 ; -26 [label="26: Return Stmt \n NULLIFY(&p,false); [line 48]\n *&return:int =0 [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] - - - 26 -> 20 ; -25 [label="25: Return Stmt \n n$1=*&p:int * [line 46]\n n$2=*n$1:int [line 46]\n *&return:int =n$2 [line 46]\n REMOVE_TEMPS(n$1,n$2); [line 46]\n NULLIFY(&p,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] + 26 -> 25 ; +25 [label="25: DeclStmt \n *&p:int *=0 [line 44]\n " shape="box"] 25 -> 20 ; -24 [label="24: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n " shape="invhouse"] +24 [label="24: Return Stmt \n NULLIFY(&p,false); [line 48]\n *&return:int =0 [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] - 24 -> 26 ; -23 [label="23: Prune (true branch) \n PRUNE(((n$0 == 0) != 0), true); [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n " shape="invhouse"] + 24 -> 18 ; +23 [label="23: Return Stmt \n n$1=*&p:int * [line 46]\n n$2=*n$1:int [line 46]\n *&return:int =n$2 [line 46]\n REMOVE_TEMPS(n$1,n$2); [line 46]\n NULLIFY(&p,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] - 23 -> 25 ; -22 [label="22: BinaryOperatorStmt: EQ \n n$0=*&b:class A * [line 45]\n NULLIFY(&b,false); [line 45]\n " shape="box"] + 23 -> 18 ; +22 [label="22: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n " shape="invhouse"] - 22 -> 23 ; 22 -> 24 ; -21 [label="21: + \n NULLIFY(&b,false); [line 45]\n NULLIFY(&p,false); [line 45]\n " ] +21 [label="21: Prune (true branch) \n PRUNE(((n$0 == 0) != 0), true); [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n " shape="invhouse"] - 21 -> 20 ; -20 [label="20: Exit main \n " color=yellow style=filled] + 21 -> 23 ; +20 [label="20: BinaryOperatorStmt: EQ \n n$0=*&b:class A * [line 45]\n NULLIFY(&b,false); [line 45]\n " shape="box"] -19 [label="19: Start main\nFormals: \nLocals: p:int * b:class A * \n DECLARE_LOCALS(&return,&p,&b); [line 42]\n NULLIFY(&b,false); [line 42]\n NULLIFY(&p,false); [line 42]\n " color=yellow style=filled] + 20 -> 21 ; + 20 -> 22 ; +19 [label="19: + \n NULLIFY(&b,false); [line 45]\n NULLIFY(&p,false); [line 45]\n " ] - 19 -> 28 ; -18 [label="18: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_trans______2); [line 34]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_trans______2 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_A_trans______2:class __objc_anonymous_block_A_trans______2 =n$11 [line 34]\n n$12=*&#GB$A_trans_sharedInstance:struct objc_object * [line 34]\n *n$11.A_trans_sharedInstance:struct objc_object *=n$12 [line 34]\n *&dummy_block:_fn_ (*)=(_fun___objc_anonymous_block_A_trans______2) [line 34]\n REMOVE_TEMPS(n$11,n$12); [line 34]\n " shape="box"] + 19 -> 18 ; +18 [label="18: Exit main \n " color=yellow style=filled] - 18 -> 14 ; -17 [label="17: BinaryOperatorStmt: Assign \n n$9=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 35]\n n$10=_fun_A_init(n$9:class A *) virtual [line 35]\n *&#GB$A_trans_sharedInstance:struct objc_object *=n$10 [line 35]\n REMOVE_TEMPS(n$9,n$10); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] +17 [label="17: Start main\nFormals: \nLocals: p:int * b:class A * \n DECLARE_LOCALS(&return,&p,&b); [line 42]\n NULLIFY(&b,false); [line 42]\n NULLIFY(&p,false); [line 42]\n " color=yellow style=filled] - 17 -> 16 ; -16 [label="16: Exit __objc_anonymous_block_A_trans______2 \n " color=yellow style=filled] + 17 -> 26 ; +16 [label="16: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_trans______2); [line 34]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_trans______2 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_A_trans______2:class __objc_anonymous_block_A_trans______2 =n$11 [line 34]\n n$12=*&#GB$A_trans_sharedInstance:struct objc_object * [line 34]\n *n$11.A_trans_sharedInstance:struct objc_object *=n$12 [line 34]\n *&dummy_block:_fn_ (*)=(_fun___objc_anonymous_block_A_trans______2) [line 34]\n REMOVE_TEMPS(n$11,n$12); [line 34]\n " shape="box"] -15 [label="15: Start __objc_anonymous_block_A_trans______2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 34]\n " color=yellow style=filled] + 16 -> 12 ; +15 [label="15: BinaryOperatorStmt: Assign \n n$9=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 35]\n n$10=_fun_A_init(n$9:class A *) virtual [line 35]\n *&#GB$A_trans_sharedInstance:struct objc_object *=n$10 [line 35]\n REMOVE_TEMPS(n$9,n$10); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] - 15 -> 17 ; -14 [label="14: Call n$8 \n n$8=*&dummy_block:_fn_ (*) [line 37]\n n$8() [line 37]\n REMOVE_TEMPS(n$8); [line 37]\n NULLIFY(&dummy_block,false); [line 37]\n " shape="box"] + 15 -> 14 ; +14 [label="14: Exit __objc_anonymous_block_A_trans______2 \n " color=yellow style=filled] - 14 -> 13 ; -13 [label="13: Return Stmt \n n$7=*&#GB$A_trans_sharedInstance:struct objc_object * [line 38]\n *&return:struct objc_object *=n$7 [line 38]\n REMOVE_TEMPS(n$7); [line 38]\n NULLIFY(&__objc_anonymous_block_A_trans______2,true); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] +13 [label="13: Start __objc_anonymous_block_A_trans______2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 34]\n " color=yellow style=filled] - 13 -> 12 ; -12 [label="12: Exit A_trans \n " color=yellow style=filled] + 13 -> 15 ; +12 [label="12: Call n$8 \n n$8=*&dummy_block:_fn_ (*) [line 37]\n n$8() [line 37]\n REMOVE_TEMPS(n$8); [line 37]\n NULLIFY(&dummy_block,false); [line 37]\n " shape="box"] -11 [label="11: Start A_trans\nFormals: \nLocals: dummy_block:_fn_ (*) \n DECLARE_LOCALS(&return,&dummy_block); [line 32]\n NULLIFY(&dummy_block,false); [line 32]\n " color=yellow style=filled] + 12 -> 11 ; +11 [label="11: Return Stmt \n n$7=*&#GB$A_trans_sharedInstance:struct objc_object * [line 38]\n *&return:struct objc_object *=n$7 [line 38]\n REMOVE_TEMPS(n$7); [line 38]\n NULLIFY(&__objc_anonymous_block_A_trans______2,true); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] - 11 -> 18 ; -10 [label="10: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_sharedInstance______1); [line 26]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_sharedInstance______1 ):unsigned long ) [line 26]\n *&__objc_anonymous_block_A_sharedInstance______1:class __objc_anonymous_block_A_sharedInstance______1 =n$5 [line 26]\n n$6=*&#GB$A_sharedInstance_sharedInstance:struct objc_object * [line 26]\n *n$5.A_sharedInstance_sharedInstance:struct objc_object *=n$6 [line 26]\n *&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*)=(_fun___objc_anonymous_block_A_sharedInstance______1) [line 26]\n REMOVE_TEMPS(n$5,n$6); [line 26]\n " shape="box"] + 11 -> 10 ; +10 [label="10: Exit A_trans \n " color=yellow style=filled] - 10 -> 6 ; -9 [label="9: BinaryOperatorStmt: Assign \n n$3=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 27]\n n$4=_fun_A_init(n$3:class A *) virtual [line 27]\n *&#GB$A_sharedInstance_sharedInstance:struct objc_object *=n$4 [line 27]\n REMOVE_TEMPS(n$3,n$4); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +9 [label="9: Start A_trans\nFormals: \nLocals: dummy_block:_fn_ (*) \n DECLARE_LOCALS(&return,&dummy_block); [line 32]\n NULLIFY(&dummy_block,false); [line 32]\n " color=yellow style=filled] - 9 -> 8 ; -8 [label="8: Exit __objc_anonymous_block_A_sharedInstance______1 \n " color=yellow style=filled] + 9 -> 16 ; +8 [label="8: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_sharedInstance______1); [line 26]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_sharedInstance______1 ):unsigned long ) [line 26]\n *&__objc_anonymous_block_A_sharedInstance______1:class __objc_anonymous_block_A_sharedInstance______1 =n$5 [line 26]\n n$6=*&#GB$A_sharedInstance_sharedInstance:struct objc_object * [line 26]\n *n$5.A_sharedInstance_sharedInstance:struct objc_object *=n$6 [line 26]\n *&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*)=(_fun___objc_anonymous_block_A_sharedInstance______1) [line 26]\n REMOVE_TEMPS(n$5,n$6); [line 26]\n " shape="box"] -7 [label="7: Start __objc_anonymous_block_A_sharedInstance______1\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] + 8 -> 4 ; +7 [label="7: BinaryOperatorStmt: Assign \n n$3=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 27]\n n$4=_fun_A_init(n$3:class A *) virtual [line 27]\n *&#GB$A_sharedInstance_sharedInstance:struct objc_object *=n$4 [line 27]\n REMOVE_TEMPS(n$3,n$4); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] - 7 -> 9 ; -6 [label="6: Call n$1 \n n$1=*&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*) [line 26]\n n$2=n$1() [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&infer___objc_anonymous_block_A_sharedInstance______1,false); [line 26]\n " shape="box"] + 7 -> 6 ; +6 [label="6: Exit __objc_anonymous_block_A_sharedInstance______1 \n " color=yellow style=filled] - 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&#GB$A_sharedInstance_sharedInstance:struct objc_object * [line 29]\n *&return:struct objc_object *=n$0 [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&__objc_anonymous_block_A_sharedInstance______1,true); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +5 [label="5: Start __objc_anonymous_block_A_sharedInstance______1\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] - 5 -> 4 ; -4 [label="4: Exit A_sharedInstance \n " color=yellow style=filled] + 5 -> 7 ; +4 [label="4: Call n$1 \n n$1=*&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*) [line 26]\n n$2=n$1() [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&infer___objc_anonymous_block_A_sharedInstance______1,false); [line 26]\n " shape="box"] -3 [label="3: Start A_sharedInstance\nFormals: \nLocals: infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_sharedInstance______1); [line 23]\n NULLIFY(&infer___objc_anonymous_block_A_sharedInstance______1,false); [line 23]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Return Stmt \n n$0=*&#GB$A_sharedInstance_sharedInstance:struct objc_object * [line 29]\n *&return:struct objc_object *=n$0 [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&__objc_anonymous_block_A_sharedInstance______1,true); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] - 3 -> 10 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_sharedInstance \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start A_sharedInstance\nFormals: \nLocals: infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_sharedInstance______1); [line 23]\n NULLIFY(&infer___objc_anonymous_block_A_sharedInstance______1,false); [line 23]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 8 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot b/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot index 8520d4057..5f638b1e5 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot @@ -1,237 +1,230 @@ digraph iCFG { -62 [label="62: DeclStmt \n *&#GB$A_dispatch_barrier_example_a:class A *=0 [line 72]\n " shape="box"] - - - 62 -> 61 ; -61 [label="61: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_barrier_example______6); [line 73]\n n$52=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_barrier_example______6 ):unsigned long ) [line 73]\n *&__objc_anonymous_block_A_dispatch_barrier_example______6:class __objc_anonymous_block_A_dispatch_barrier_example______6 =n$52 [line 73]\n n$53=*&#GB$A_dispatch_barrier_example_a:class A * [line 73]\n *n$52.A_dispatch_barrier_example_a:class A *=n$53 [line 73]\n *&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_barrier_example______6) [line 73]\n REMOVE_TEMPS(n$52,n$53); [line 73]\n " shape="box"] - - - 61 -> 56 ; -60 [label="60: BinaryOperatorStmt: Assign \n n$50=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 74]\n n$51=_fun_NSObject_init(n$50:class A *) virtual [line 74]\n *&#GB$A_dispatch_barrier_example_a:class A *=n$51 [line 74]\n REMOVE_TEMPS(n$50,n$51); [line 74]\n " shape="box"] +60 [label="60: DeclStmt \n *&#GB$A_dispatch_barrier_example_a:class A *=0 [line 72]\n " shape="box"] 60 -> 59 ; -59 [label="59: BinaryOperatorStmt: Assign \n n$49=*&#GB$A_dispatch_barrier_example_a:class A * [line 75]\n *n$49.x:int =10 [line 75]\n REMOVE_TEMPS(n$49); [line 75]\n APPLY_ABSTRACTION; [line 75]\n " shape="box"] +59 [label="59: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_barrier_example______6); [line 73]\n n$52=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_barrier_example______6 ):unsigned long ) [line 73]\n *&__objc_anonymous_block_A_dispatch_barrier_example______6:class __objc_anonymous_block_A_dispatch_barrier_example______6 =n$52 [line 73]\n n$53=*&#GB$A_dispatch_barrier_example_a:class A * [line 73]\n *n$52.A_dispatch_barrier_example_a:class A *=n$53 [line 73]\n *&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_barrier_example______6) [line 73]\n REMOVE_TEMPS(n$52,n$53); [line 73]\n " shape="box"] - 59 -> 58 ; -58 [label="58: Exit __objc_anonymous_block_A_dispatch_barrier_example______6 \n " color=yellow style=filled] + 59 -> 54 ; +58 [label="58: BinaryOperatorStmt: Assign \n n$50=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 74]\n n$51=_fun_NSObject_init(n$50:class A *) virtual [line 74]\n *&#GB$A_dispatch_barrier_example_a:class A *=n$51 [line 74]\n REMOVE_TEMPS(n$50,n$51); [line 74]\n " shape="box"] -57 [label="57: Start __objc_anonymous_block_A_dispatch_barrier_example______6\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 73]\n " color=yellow style=filled] + 58 -> 57 ; +57 [label="57: BinaryOperatorStmt: Assign \n n$49=*&#GB$A_dispatch_barrier_example_a:class A * [line 75]\n *n$49.x:int =10 [line 75]\n REMOVE_TEMPS(n$49); [line 75]\n APPLY_ABSTRACTION; [line 75]\n " shape="box"] - 57 -> 60 ; -56 [label="56: Call n$47 \n n$47=*&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*) [line 73]\n n$48=n$47() [line 73]\n REMOVE_TEMPS(n$47,n$48); [line 73]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_barrier_example______6,false); [line 73]\n " shape="box"] + 57 -> 56 ; +56 [label="56: Exit __objc_anonymous_block_A_dispatch_barrier_example______6 \n " color=yellow style=filled] - 56 -> 55 ; -55 [label="55: Return Stmt \n n$45=*&#GB$A_dispatch_barrier_example_a:class A * [line 77]\n n$46=*n$45.x:int [line 77]\n *&return:int =n$46 [line 77]\n REMOVE_TEMPS(n$45,n$46); [line 77]\n NULLIFY(&__objc_anonymous_block_A_dispatch_barrier_example______6,true); [line 77]\n APPLY_ABSTRACTION; [line 77]\n " shape="box"] +55 [label="55: Start __objc_anonymous_block_A_dispatch_barrier_example______6\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 73]\n " color=yellow style=filled] - 55 -> 54 ; -54 [label="54: Exit A_dispatch_barrier_example \n " color=yellow style=filled] + 55 -> 58 ; +54 [label="54: Call n$47 \n n$47=*&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*) [line 73]\n n$48=n$47() [line 73]\n REMOVE_TEMPS(n$47,n$48); [line 73]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_barrier_example______6,false); [line 73]\n " shape="box"] -53 [label="53: Start A_dispatch_barrier_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_barrier_example______6); [line 71]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_barrier_example______6,false); [line 71]\n " color=yellow style=filled] + 54 -> 53 ; +53 [label="53: Return Stmt \n n$45=*&#GB$A_dispatch_barrier_example_a:class A * [line 77]\n n$46=*n$45.x:int [line 77]\n *&return:int =n$46 [line 77]\n REMOVE_TEMPS(n$45,n$46); [line 77]\n NULLIFY(&__objc_anonymous_block_A_dispatch_barrier_example______6,true); [line 77]\n APPLY_ABSTRACTION; [line 77]\n " shape="box"] - 53 -> 62 ; -52 [label="52: DeclStmt \n *&#GB$A_dispatch_group_notify_example_a:class A *=0 [line 63]\n " shape="box"] + 53 -> 52 ; +52 [label="52: Exit A_dispatch_barrier_example \n " color=yellow style=filled] - 52 -> 51 ; -51 [label="51: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_notify_example______5); [line 64]\n n$43=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_notify_example______5 ):unsigned long ) [line 64]\n *&__objc_anonymous_block_A_dispatch_group_notify_example______5:class __objc_anonymous_block_A_dispatch_group_notify_example______5 =n$43 [line 64]\n n$44=*&#GB$A_dispatch_group_notify_example_a:class A * [line 64]\n *n$43.A_dispatch_group_notify_example_a:class A *=n$44 [line 64]\n *&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_notify_example______5) [line 64]\n REMOVE_TEMPS(n$43,n$44); [line 64]\n " shape="box"] +51 [label="51: Start A_dispatch_barrier_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_barrier_example______6); [line 71]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_barrier_example______6,false); [line 71]\n " color=yellow style=filled] - 51 -> 46 ; -50 [label="50: BinaryOperatorStmt: Assign \n n$41=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 65]\n n$42=_fun_NSObject_init(n$41:class A *) virtual [line 65]\n *&#GB$A_dispatch_group_notify_example_a:class A *=n$42 [line 65]\n REMOVE_TEMPS(n$41,n$42); [line 65]\n " shape="box"] + 51 -> 60 ; +50 [label="50: DeclStmt \n *&#GB$A_dispatch_group_notify_example_a:class A *=0 [line 63]\n " shape="box"] 50 -> 49 ; -49 [label="49: BinaryOperatorStmt: Assign \n n$40=*&#GB$A_dispatch_group_notify_example_a:class A * [line 66]\n *n$40.x:int =10 [line 66]\n REMOVE_TEMPS(n$40); [line 66]\n APPLY_ABSTRACTION; [line 66]\n " shape="box"] +49 [label="49: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_notify_example______5); [line 64]\n n$43=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_notify_example______5 ):unsigned long ) [line 64]\n *&__objc_anonymous_block_A_dispatch_group_notify_example______5:class __objc_anonymous_block_A_dispatch_group_notify_example______5 =n$43 [line 64]\n n$44=*&#GB$A_dispatch_group_notify_example_a:class A * [line 64]\n *n$43.A_dispatch_group_notify_example_a:class A *=n$44 [line 64]\n *&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_notify_example______5) [line 64]\n REMOVE_TEMPS(n$43,n$44); [line 64]\n " shape="box"] - 49 -> 48 ; -48 [label="48: Exit __objc_anonymous_block_A_dispatch_group_notify_example______5 \n " color=yellow style=filled] + 49 -> 44 ; +48 [label="48: BinaryOperatorStmt: Assign \n n$41=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 65]\n n$42=_fun_NSObject_init(n$41:class A *) virtual [line 65]\n *&#GB$A_dispatch_group_notify_example_a:class A *=n$42 [line 65]\n REMOVE_TEMPS(n$41,n$42); [line 65]\n " shape="box"] -47 [label="47: Start __objc_anonymous_block_A_dispatch_group_notify_example______5\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 64]\n " color=yellow style=filled] + 48 -> 47 ; +47 [label="47: BinaryOperatorStmt: Assign \n n$40=*&#GB$A_dispatch_group_notify_example_a:class A * [line 66]\n *n$40.x:int =10 [line 66]\n REMOVE_TEMPS(n$40); [line 66]\n APPLY_ABSTRACTION; [line 66]\n " shape="box"] - 47 -> 50 ; -46 [label="46: Call n$38 \n n$38=*&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*) [line 64]\n n$39=n$38() [line 64]\n REMOVE_TEMPS(n$38,n$39); [line 64]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5,false); [line 64]\n " shape="box"] + 47 -> 46 ; +46 [label="46: Exit __objc_anonymous_block_A_dispatch_group_notify_example______5 \n " color=yellow style=filled] - 46 -> 45 ; -45 [label="45: Return Stmt \n n$36=*&#GB$A_dispatch_group_notify_example_a:class A * [line 68]\n n$37=*n$36.x:int [line 68]\n *&return:int =n$37 [line 68]\n REMOVE_TEMPS(n$36,n$37); [line 68]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_notify_example______5,true); [line 68]\n APPLY_ABSTRACTION; [line 68]\n " shape="box"] +45 [label="45: Start __objc_anonymous_block_A_dispatch_group_notify_example______5\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 64]\n " color=yellow style=filled] - 45 -> 44 ; -44 [label="44: Exit A_dispatch_group_notify_example \n " color=yellow style=filled] + 45 -> 48 ; +44 [label="44: Call n$38 \n n$38=*&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*) [line 64]\n n$39=n$38() [line 64]\n REMOVE_TEMPS(n$38,n$39); [line 64]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5,false); [line 64]\n " shape="box"] -43 [label="43: Start A_dispatch_group_notify_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_group_notify_example______5); [line 62]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5,false); [line 62]\n " color=yellow style=filled] + 44 -> 43 ; +43 [label="43: Return Stmt \n n$36=*&#GB$A_dispatch_group_notify_example_a:class A * [line 68]\n n$37=*n$36.x:int [line 68]\n *&return:int =n$37 [line 68]\n REMOVE_TEMPS(n$36,n$37); [line 68]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_notify_example______5,true); [line 68]\n APPLY_ABSTRACTION; [line 68]\n " shape="box"] - 43 -> 52 ; -42 [label="42: DeclStmt \n *&#GB$A_dispatch_group_example_a:class A *=0 [line 54]\n " shape="box"] + 43 -> 42 ; +42 [label="42: Exit A_dispatch_group_notify_example \n " color=yellow style=filled] - 42 -> 41 ; -41 [label="41: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_example______4); [line 55]\n n$34=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_example______4 ):unsigned long ) [line 55]\n *&__objc_anonymous_block_A_dispatch_group_example______4:class __objc_anonymous_block_A_dispatch_group_example______4 =n$34 [line 55]\n n$35=*&#GB$A_dispatch_group_example_a:class A * [line 55]\n *n$34.A_dispatch_group_example_a:class A *=n$35 [line 55]\n *&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_example______4) [line 55]\n REMOVE_TEMPS(n$34,n$35); [line 55]\n " shape="box"] +41 [label="41: Start A_dispatch_group_notify_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_group_notify_example______5); [line 62]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5,false); [line 62]\n " color=yellow style=filled] - 41 -> 36 ; -40 [label="40: BinaryOperatorStmt: Assign \n n$32=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 56]\n n$33=_fun_NSObject_init(n$32:class A *) virtual [line 56]\n *&#GB$A_dispatch_group_example_a:class A *=n$33 [line 56]\n REMOVE_TEMPS(n$32,n$33); [line 56]\n " shape="box"] + 41 -> 50 ; +40 [label="40: DeclStmt \n *&#GB$A_dispatch_group_example_a:class A *=0 [line 54]\n " shape="box"] 40 -> 39 ; -39 [label="39: BinaryOperatorStmt: Assign \n n$31=*&#GB$A_dispatch_group_example_a:class A * [line 57]\n *n$31.x:int =10 [line 57]\n REMOVE_TEMPS(n$31); [line 57]\n APPLY_ABSTRACTION; [line 57]\n " shape="box"] +39 [label="39: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_example______4); [line 55]\n n$34=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_example______4 ):unsigned long ) [line 55]\n *&__objc_anonymous_block_A_dispatch_group_example______4:class __objc_anonymous_block_A_dispatch_group_example______4 =n$34 [line 55]\n n$35=*&#GB$A_dispatch_group_example_a:class A * [line 55]\n *n$34.A_dispatch_group_example_a:class A *=n$35 [line 55]\n *&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_example______4) [line 55]\n REMOVE_TEMPS(n$34,n$35); [line 55]\n " shape="box"] - 39 -> 38 ; -38 [label="38: Exit __objc_anonymous_block_A_dispatch_group_example______4 \n " color=yellow style=filled] + 39 -> 34 ; +38 [label="38: BinaryOperatorStmt: Assign \n n$32=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 56]\n n$33=_fun_NSObject_init(n$32:class A *) virtual [line 56]\n *&#GB$A_dispatch_group_example_a:class A *=n$33 [line 56]\n REMOVE_TEMPS(n$32,n$33); [line 56]\n " shape="box"] -37 [label="37: Start __objc_anonymous_block_A_dispatch_group_example______4\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 55]\n " color=yellow style=filled] + 38 -> 37 ; +37 [label="37: BinaryOperatorStmt: Assign \n n$31=*&#GB$A_dispatch_group_example_a:class A * [line 57]\n *n$31.x:int =10 [line 57]\n REMOVE_TEMPS(n$31); [line 57]\n APPLY_ABSTRACTION; [line 57]\n " shape="box"] - 37 -> 40 ; -36 [label="36: Call n$29 \n n$29=*&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*) [line 55]\n n$30=n$29() [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_example______4,false); [line 55]\n " shape="box"] + 37 -> 36 ; +36 [label="36: Exit __objc_anonymous_block_A_dispatch_group_example______4 \n " color=yellow style=filled] - 36 -> 35 ; -35 [label="35: Return Stmt \n n$27=*&#GB$A_dispatch_group_example_a:class A * [line 59]\n n$28=*n$27.x:int [line 59]\n *&return:int =n$28 [line 59]\n REMOVE_TEMPS(n$27,n$28); [line 59]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_example______4,true); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] +35 [label="35: Start __objc_anonymous_block_A_dispatch_group_example______4\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 55]\n " color=yellow style=filled] - 35 -> 34 ; -34 [label="34: Exit A_dispatch_group_example \n " color=yellow style=filled] + 35 -> 38 ; +34 [label="34: Call n$29 \n n$29=*&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*) [line 55]\n n$30=n$29() [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_example______4,false); [line 55]\n " shape="box"] -33 [label="33: Start A_dispatch_group_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_group_example______4); [line 53]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_example______4,false); [line 53]\n " color=yellow style=filled] + 34 -> 33 ; +33 [label="33: Return Stmt \n n$27=*&#GB$A_dispatch_group_example_a:class A * [line 59]\n n$28=*n$27.x:int [line 59]\n *&return:int =n$28 [line 59]\n REMOVE_TEMPS(n$27,n$28); [line 59]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_example______4,true); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] - 33 -> 42 ; -32 [label="32: DeclStmt \n *&#GB$A_dispatch_after_example_a:class A *=0 [line 43]\n " shape="box"] + 33 -> 32 ; +32 [label="32: Exit A_dispatch_group_example \n " color=yellow style=filled] - 32 -> 31 ; -31 [label="31: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 46]\n n$25=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):unsigned long ) [line 46]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$25 [line 46]\n n$26=*&#GB$A_dispatch_after_example_a:class A * [line 46]\n *n$25.A_dispatch_after_example_a:class A *=n$26 [line 46]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 44]\n REMOVE_TEMPS(n$25,n$26); [line 44]\n " shape="box"] +31 [label="31: Start A_dispatch_group_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_group_example______4); [line 53]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_example______4,false); [line 53]\n " color=yellow style=filled] - 31 -> 26 ; -30 [label="30: BinaryOperatorStmt: Assign \n n$23=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 47]\n n$24=_fun_NSObject_init(n$23:class A *) virtual [line 47]\n *&#GB$A_dispatch_after_example_a:class A *=n$24 [line 47]\n REMOVE_TEMPS(n$23,n$24); [line 47]\n " shape="box"] + 31 -> 40 ; +30 [label="30: DeclStmt \n *&#GB$A_dispatch_after_example_a:class A *=0 [line 43]\n " shape="box"] 30 -> 29 ; -29 [label="29: BinaryOperatorStmt: Assign \n n$22=*&#GB$A_dispatch_after_example_a:class A * [line 48]\n *n$22.x:int =10 [line 48]\n REMOVE_TEMPS(n$22); [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] +29 [label="29: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 46]\n n$25=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):unsigned long ) [line 46]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$25 [line 46]\n n$26=*&#GB$A_dispatch_after_example_a:class A * [line 46]\n *n$25.A_dispatch_after_example_a:class A *=n$26 [line 46]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 44]\n REMOVE_TEMPS(n$25,n$26); [line 44]\n " shape="box"] - 29 -> 28 ; -28 [label="28: Exit __objc_anonymous_block_A_dispatch_after_example______3 \n " color=yellow style=filled] + 29 -> 24 ; +28 [label="28: BinaryOperatorStmt: Assign \n n$23=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 47]\n n$24=_fun_NSObject_init(n$23:class A *) virtual [line 47]\n *&#GB$A_dispatch_after_example_a:class A *=n$24 [line 47]\n REMOVE_TEMPS(n$23,n$24); [line 47]\n " shape="box"] -27 [label="27: Start __objc_anonymous_block_A_dispatch_after_example______3\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 46]\n " color=yellow style=filled] + 28 -> 27 ; +27 [label="27: BinaryOperatorStmt: Assign \n n$22=*&#GB$A_dispatch_after_example_a:class A * [line 48]\n *n$22.x:int =10 [line 48]\n REMOVE_TEMPS(n$22); [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] - 27 -> 30 ; -26 [label="26: Call n$20 \n n$20=*&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*) [line 44]\n n$21=n$20() [line 44]\n REMOVE_TEMPS(n$20,n$21); [line 44]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_after_example______3,false); [line 44]\n " shape="box"] + 27 -> 26 ; +26 [label="26: Exit __objc_anonymous_block_A_dispatch_after_example______3 \n " color=yellow style=filled] - 26 -> 25 ; -25 [label="25: Return Stmt \n n$18=*&#GB$A_dispatch_after_example_a:class A * [line 50]\n n$19=*n$18.x:int [line 50]\n *&return:int =n$19 [line 50]\n REMOVE_TEMPS(n$18,n$19); [line 50]\n NULLIFY(&__objc_anonymous_block_A_dispatch_after_example______3,true); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +25 [label="25: Start __objc_anonymous_block_A_dispatch_after_example______3\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 46]\n " color=yellow style=filled] - 25 -> 24 ; -24 [label="24: Exit A_dispatch_after_example \n " color=yellow style=filled] + 25 -> 28 ; +24 [label="24: Call n$20 \n n$20=*&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*) [line 44]\n n$21=n$20() [line 44]\n REMOVE_TEMPS(n$20,n$21); [line 44]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_after_example______3,false); [line 44]\n " shape="box"] -23 [label="23: Start A_dispatch_after_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_after_example______3); [line 42]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_after_example______3,false); [line 42]\n " color=yellow style=filled] + 24 -> 23 ; +23 [label="23: Return Stmt \n n$18=*&#GB$A_dispatch_after_example_a:class A * [line 50]\n n$19=*n$18.x:int [line 50]\n *&return:int =n$19 [line 50]\n REMOVE_TEMPS(n$18,n$19); [line 50]\n NULLIFY(&__objc_anonymous_block_A_dispatch_after_example______3,true); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] - 23 -> 32 ; -22 [label="22: DeclStmt \n *&#GB$A_dispatch_async_example_a:class A *=0 [line 33]\n " shape="box"] + 23 -> 22 ; +22 [label="22: Exit A_dispatch_after_example \n " color=yellow style=filled] - 22 -> 21 ; -21 [label="21: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_async_example______2); [line 35]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_async_example______2 ):unsigned long ) [line 35]\n *&__objc_anonymous_block_A_dispatch_async_example______2:class __objc_anonymous_block_A_dispatch_async_example______2 =n$16 [line 35]\n n$17=*&#GB$A_dispatch_async_example_a:class A * [line 35]\n *n$16.A_dispatch_async_example_a:class A *=n$17 [line 35]\n *&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_async_example______2) [line 34]\n REMOVE_TEMPS(n$16,n$17); [line 34]\n " shape="box"] +21 [label="21: Start A_dispatch_after_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_after_example______3); [line 42]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_after_example______3,false); [line 42]\n " color=yellow style=filled] - 21 -> 16 ; -20 [label="20: BinaryOperatorStmt: Assign \n n$14=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 36]\n n$15=_fun_NSObject_init(n$14:class A *) virtual [line 36]\n *&#GB$A_dispatch_async_example_a:class A *=n$15 [line 36]\n REMOVE_TEMPS(n$14,n$15); [line 36]\n " shape="box"] + 21 -> 30 ; +20 [label="20: DeclStmt \n *&#GB$A_dispatch_async_example_a:class A *=0 [line 33]\n " shape="box"] 20 -> 19 ; -19 [label="19: BinaryOperatorStmt: Assign \n n$13=*&#GB$A_dispatch_async_example_a:class A * [line 37]\n *n$13.x:int =10 [line 37]\n REMOVE_TEMPS(n$13); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +19 [label="19: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_async_example______2); [line 35]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_async_example______2 ):unsigned long ) [line 35]\n *&__objc_anonymous_block_A_dispatch_async_example______2:class __objc_anonymous_block_A_dispatch_async_example______2 =n$16 [line 35]\n n$17=*&#GB$A_dispatch_async_example_a:class A * [line 35]\n *n$16.A_dispatch_async_example_a:class A *=n$17 [line 35]\n *&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_async_example______2) [line 34]\n REMOVE_TEMPS(n$16,n$17); [line 34]\n " shape="box"] - 19 -> 18 ; -18 [label="18: Exit __objc_anonymous_block_A_dispatch_async_example______2 \n " color=yellow style=filled] + 19 -> 14 ; +18 [label="18: BinaryOperatorStmt: Assign \n n$14=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 36]\n n$15=_fun_NSObject_init(n$14:class A *) virtual [line 36]\n *&#GB$A_dispatch_async_example_a:class A *=n$15 [line 36]\n REMOVE_TEMPS(n$14,n$15); [line 36]\n " shape="box"] -17 [label="17: Start __objc_anonymous_block_A_dispatch_async_example______2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 35]\n " color=yellow style=filled] + 18 -> 17 ; +17 [label="17: BinaryOperatorStmt: Assign \n n$13=*&#GB$A_dispatch_async_example_a:class A * [line 37]\n *n$13.x:int =10 [line 37]\n REMOVE_TEMPS(n$13); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] - 17 -> 20 ; -16 [label="16: Call n$11 \n n$11=*&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*) [line 34]\n n$12=n$11() [line 34]\n REMOVE_TEMPS(n$11,n$12); [line 34]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_async_example______2,false); [line 34]\n " shape="box"] + 17 -> 16 ; +16 [label="16: Exit __objc_anonymous_block_A_dispatch_async_example______2 \n " color=yellow style=filled] - 16 -> 15 ; -15 [label="15: Return Stmt \n n$9=*&#GB$A_dispatch_async_example_a:class A * [line 39]\n n$10=*n$9.x:int [line 39]\n *&return:int =n$10 [line 39]\n REMOVE_TEMPS(n$9,n$10); [line 39]\n NULLIFY(&__objc_anonymous_block_A_dispatch_async_example______2,true); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] +15 [label="15: Start __objc_anonymous_block_A_dispatch_async_example______2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 35]\n " color=yellow style=filled] - 15 -> 14 ; -14 [label="14: Exit A_dispatch_async_example \n " color=yellow style=filled] + 15 -> 18 ; +14 [label="14: Call n$11 \n n$11=*&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*) [line 34]\n n$12=n$11() [line 34]\n REMOVE_TEMPS(n$11,n$12); [line 34]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_async_example______2,false); [line 34]\n " shape="box"] -13 [label="13: Start A_dispatch_async_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_async_example______2); [line 32]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_async_example______2,false); [line 32]\n " color=yellow style=filled] + 14 -> 13 ; +13 [label="13: Return Stmt \n n$9=*&#GB$A_dispatch_async_example_a:class A * [line 39]\n n$10=*n$9.x:int [line 39]\n *&return:int =n$10 [line 39]\n REMOVE_TEMPS(n$9,n$10); [line 39]\n NULLIFY(&__objc_anonymous_block_A_dispatch_async_example______2,true); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] - 13 -> 22 ; -12 [label="12: DeclStmt \n *&#GB$A_dispatch_once_example_a:class A *=0 [line 21]\n " shape="box"] + 13 -> 12 ; +12 [label="12: Exit A_dispatch_async_example \n " color=yellow style=filled] - 12 -> 11 ; -11 [label="11: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$7 [line 25]\n n$8=*&#GB$A_dispatch_once_example_a:class A * [line 25]\n *n$7.A_dispatch_once_example_a:class A *=n$8 [line 25]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 25]\n REMOVE_TEMPS(n$7,n$8); [line 25]\n " shape="box"] +11 [label="11: Start A_dispatch_async_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_async_example______2); [line 32]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_async_example______2,false); [line 32]\n " color=yellow style=filled] - 11 -> 6 ; -10 [label="10: BinaryOperatorStmt: Assign \n n$5=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 26]\n n$6=_fun_NSObject_init(n$5:class A *) virtual [line 26]\n *&#GB$A_dispatch_once_example_a:class A *=n$6 [line 26]\n REMOVE_TEMPS(n$5,n$6); [line 26]\n " shape="box"] + 11 -> 20 ; +10 [label="10: DeclStmt \n *&#GB$A_dispatch_once_example_a:class A *=0 [line 21]\n " shape="box"] 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n n$4=*&#GB$A_dispatch_once_example_a:class A * [line 27]\n *n$4.x:int =10 [line 27]\n REMOVE_TEMPS(n$4); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +9 [label="9: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$7 [line 25]\n n$8=*&#GB$A_dispatch_once_example_a:class A * [line 25]\n *n$7.A_dispatch_once_example_a:class A *=n$8 [line 25]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 25]\n REMOVE_TEMPS(n$7,n$8); [line 25]\n " shape="box"] - 9 -> 8 ; -8 [label="8: Exit __objc_anonymous_block_A_dispatch_once_example______1 \n " color=yellow style=filled] + 9 -> 4 ; +8 [label="8: BinaryOperatorStmt: Assign \n n$5=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 26]\n n$6=_fun_NSObject_init(n$5:class A *) virtual [line 26]\n *&#GB$A_dispatch_once_example_a:class A *=n$6 [line 26]\n REMOVE_TEMPS(n$5,n$6); [line 26]\n " shape="box"] -7 [label="7: Start __objc_anonymous_block_A_dispatch_once_example______1\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 25]\n " color=yellow style=filled] + 8 -> 7 ; +7 [label="7: BinaryOperatorStmt: Assign \n n$4=*&#GB$A_dispatch_once_example_a:class A * [line 27]\n *n$4.x:int =10 [line 27]\n REMOVE_TEMPS(n$4); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] - 7 -> 10 ; -6 [label="6: Call n$2 \n n$2=*&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) [line 25]\n n$3=n$2() [line 25]\n REMOVE_TEMPS(n$2,n$3); [line 25]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,false); [line 25]\n " shape="box"] + 7 -> 6 ; +6 [label="6: Exit __objc_anonymous_block_A_dispatch_once_example______1 \n " color=yellow style=filled] - 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&#GB$A_dispatch_once_example_a:class A * [line 29]\n n$1=*n$0.x:int [line 29]\n *&return:int =n$1 [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&__objc_anonymous_block_A_dispatch_once_example______1,true); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +5 [label="5: Start __objc_anonymous_block_A_dispatch_once_example______1\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 25]\n " color=yellow style=filled] - 5 -> 4 ; -4 [label="4: Exit A_dispatch_once_example \n " color=yellow style=filled] + 5 -> 8 ; +4 [label="4: Call n$2 \n n$2=*&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) [line 25]\n n$3=n$2() [line 25]\n REMOVE_TEMPS(n$2,n$3); [line 25]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,false); [line 25]\n " shape="box"] -3 [label="3: Start A_dispatch_once_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_once_example______1); [line 20]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,false); [line 20]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Return Stmt \n n$0=*&#GB$A_dispatch_once_example_a:class A * [line 29]\n n$1=*n$0.x:int [line 29]\n *&return:int =n$1 [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&__objc_anonymous_block_A_dispatch_once_example______1,true); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] - 3 -> 12 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_dispatch_once_example \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start A_dispatch_once_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_once_example______1); [line 20]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,false); [line 20]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 10 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot b/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot index 2685ef349..9a79bbc1f 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot @@ -1,87 +1,73 @@ digraph iCFG { -23 [label="23: DeclStmt \n n$2=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 63]\n *&a:class A *=n$2 [line 63]\n REMOVE_TEMPS(n$2); [line 63]\n " shape="box"] +19 [label="19: DeclStmt \n n$2=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 63]\n *&a:class A *=n$2 [line 63]\n REMOVE_TEMPS(n$2); [line 63]\n " shape="box"] - 23 -> 22 ; -22 [label="22: BinaryOperatorStmt: Assign \n n$0=*&a:class A * [line 65]\n n$1=_fun_foo(n$0:class A *) [line 65]\n *&a:class A *=n$1 [line 65]\n REMOVE_TEMPS(n$0,n$1); [line 65]\n NULLIFY(&a,false); [line 65]\n " shape="box"] - - - 22 -> 21 ; -21 [label="21: Return Stmt \n *&return:int =0 [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] - - - 21 -> 20 ; -20 [label="20: Exit main \n " color=yellow style=filled] - - -19 [label="19: Start main\nFormals: argc:int argv:char **\nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 61]\n NULLIFY(&a,false); [line 61]\n NULLIFY(&argc,false); [line 61]\n NULLIFY(&argv,false); [line 61]\n " color=yellow style=filled] - - - 19 -> 23 ; -18 [label="18: Message Call: capture \n n$1=*&a:class A * [line 56]\n _fun_A_capture(n$1:class A *) virtual [line 56]\n REMOVE_TEMPS(n$1); [line 56]\n " shape="box"] + 19 -> 18 ; +18 [label="18: BinaryOperatorStmt: Assign \n n$0=*&a:class A * [line 65]\n n$1=_fun_foo(n$0:class A *) [line 65]\n *&a:class A *=n$1 [line 65]\n REMOVE_TEMPS(n$0,n$1); [line 65]\n NULLIFY(&a,false); [line 65]\n " shape="box"] 18 -> 17 ; -17 [label="17: Return Stmt \n n$0=*&a:class A * [line 58]\n *&return:class A *=n$0 [line 58]\n REMOVE_TEMPS(n$0); [line 58]\n NULLIFY(&a,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +17 [label="17: Return Stmt \n *&return:int =0 [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] 17 -> 16 ; -16 [label="16: Exit foo \n " color=yellow style=filled] +16 [label="16: Exit main \n " color=yellow style=filled] -15 [label="15: Start foo\nFormals: a:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 54]\n " color=yellow style=filled] +15 [label="15: Start main\nFormals: argc:int argv:char **\nLocals: a:class A * \n DECLARE_LOCALS(&return,&a); [line 61]\n NULLIFY(&a,false); [line 61]\n NULLIFY(&argc,false); [line 61]\n NULLIFY(&argv,false); [line 61]\n " color=yellow style=filled] - 15 -> 18 ; -14 [label="14: BinaryOperatorStmt: Assign \n n$8=*&self:class A * [line 46]\n n$9=_fun___objc_alloc_no_fail(sizeof(class B ):unsigned long ) [line 46]\n *n$8._b:class B *=n$9 [line 46]\n REMOVE_TEMPS(n$8,n$9); [line 46]\n " shape="box"] + 15 -> 19 ; +14 [label="14: Message Call: capture \n n$1=*&a:class A * [line 56]\n _fun_A_capture(n$1:class A *) virtual [line 56]\n REMOVE_TEMPS(n$1); [line 56]\n " shape="box"] 14 -> 13 ; -13 [label="13: Message Call: sHandler: \n n$0=*&self:class A * [line 47]\n n$1=*n$0._b:class B * [line 47]\n DECLARE_LOCALS(&__objc_anonymous_block_A_capture______1); [line 47]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_capture______1 ):unsigned long ) [line 47]\n *&__objc_anonymous_block_A_capture______1:class __objc_anonymous_block_A_capture______1 =n$5 [line 47]\n n$6=*&self:class A * [line 47]\n *n$5.self:class A *=n$6 [line 47]\n n$2=*&self:class A * [line 47]\n n$7=*&__objc_anonymous_block_A_capture______1:_fn_ (*) [line 47]\n _fun_B_sHandler:(n$1:class B *,n$7:_fn_ (*),n$2:_fn_ (*)) virtual [line 47]\n REMOVE_TEMPS(n$0,n$1,n$5,n$6,n$2,n$7); [line 47]\n NULLIFY(&__objc_anonymous_block_A_capture______1,true); [line 47]\n NULLIFY(&self,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] +13 [label="13: Return Stmt \n n$0=*&a:class A * [line 58]\n *&return:class A *=n$0 [line 58]\n REMOVE_TEMPS(n$0); [line 58]\n NULLIFY(&a,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] - 13 -> 9 ; -12 [label="12: BinaryOperatorStmt: Assign \n n$3=*&self:class A * [line 48]\n n$4=*&d:class D * [line 48]\n *n$3._data:class D *=n$4 [line 48]\n REMOVE_TEMPS(n$3,n$4); [line 48]\n NULLIFY(&d,false); [line 48]\n NULLIFY(&self,false); [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] + 13 -> 12 ; +12 [label="12: Exit foo \n " color=yellow style=filled] - 12 -> 11 ; -11 [label="11: Exit __objc_anonymous_block_A_capture______1 \n " color=yellow style=filled] +11 [label="11: Start foo\nFormals: a:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 54]\n " color=yellow style=filled] -10 [label="10: Start __objc_anonymous_block_A_capture______1\nFormals: self:class A * d:class D *\nLocals: \nCaptured: self:class A * \n DECLARE_LOCALS(&return); [line 47]\n " color=yellow style=filled] + 11 -> 14 ; +10 [label="10: BinaryOperatorStmt: Assign \n n$8=*&self:class A * [line 46]\n n$9=_fun___objc_alloc_no_fail(sizeof(class B ):unsigned long ) [line 46]\n *n$8._b:class B *=n$9 [line 46]\n REMOVE_TEMPS(n$8,n$9); [line 46]\n " shape="box"] - 10 -> 12 ; -9 [label="9: Exit A_capture \n " color=yellow style=filled] + 10 -> 9 ; +9 [label="9: Message Call: sHandler: \n n$0=*&self:class A * [line 47]\n n$1=*n$0._b:class B * [line 47]\n DECLARE_LOCALS(&__objc_anonymous_block_A_capture______1); [line 47]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_capture______1 ):unsigned long ) [line 47]\n *&__objc_anonymous_block_A_capture______1:class __objc_anonymous_block_A_capture______1 =n$5 [line 47]\n n$6=*&self:class A * [line 47]\n *n$5.self:class A *=n$6 [line 47]\n n$2=*&self:class A * [line 47]\n n$7=*&__objc_anonymous_block_A_capture______1:_fn_ (*) [line 47]\n _fun_B_sHandler:(n$1:class B *,n$7:_fn_ (*),n$2:_fn_ (*)) virtual [line 47]\n REMOVE_TEMPS(n$0,n$1,n$5,n$6,n$2,n$7); [line 47]\n NULLIFY(&__objc_anonymous_block_A_capture______1,true); [line 47]\n NULLIFY(&self,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] -8 [label="8: Start A_capture\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 45]\n " color=yellow style=filled] + 9 -> 5 ; +8 [label="8: BinaryOperatorStmt: Assign \n n$3=*&self:class A * [line 48]\n n$4=*&d:class D * [line 48]\n *n$3._data:class D *=n$4 [line 48]\n REMOVE_TEMPS(n$3,n$4); [line 48]\n NULLIFY(&d,false); [line 48]\n NULLIFY(&self,false); [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] - 8 -> 14 ; -7 [label="7: Exit A_frontendChecks \n " color=yellow style=filled] + 8 -> 7 ; +7 [label="7: Exit __objc_anonymous_block_A_capture______1 \n " color=yellow style=filled] -6 [label="6: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +6 [label="6: Start __objc_anonymous_block_A_capture______1\nFormals: self:class A * d:class D *\nLocals: \nCaptured: self:class A * \n DECLARE_LOCALS(&return); [line 47]\n " color=yellow style=filled] - 6 -> 7 ; -5 [label="5: BinaryOperatorStmt: Assign \n n$0=*&self:class B * [line 30]\n n$1=*&h:_fn_ (*) [line 30]\n *n$0._h:_fn_ (*)=n$1 [line 30]\n REMOVE_TEMPS(n$0,n$1); [line 30]\n NULLIFY(&h,false); [line 30]\n NULLIFY(&self,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] + 6 -> 8 ; +5 [label="5: Exit A_capture \n " color=yellow style=filled] - 5 -> 4 ; -4 [label="4: Exit B_sHandler: \n " color=yellow style=filled] +4 [label="4: Start A_capture\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 45]\n " color=yellow style=filled] -3 [label="3: Start B_sHandler:\nFormals: self:class B * h:_fn_ (*)\nLocals: \n DECLARE_LOCALS(&return); [line 28]\n " color=yellow style=filled] + 4 -> 10 ; +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:class B * [line 30]\n n$1=*&h:_fn_ (*) [line 30]\n *n$0._h:_fn_ (*)=n$1 [line 30]\n REMOVE_TEMPS(n$0,n$1); [line 30]\n NULLIFY(&h,false); [line 30]\n NULLIFY(&self,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] - 3 -> 5 ; -2 [label="2: Exit B_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit B_sHandler: \n " color=yellow style=filled] -1 [label="1: Start B_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start B_sHandler:\nFormals: self:class B * h:_fn_ (*)\nLocals: \n DECLARE_LOCALS(&return); [line 28]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/block/static.dot b/infer/tests/codetoanalyze/objc/frontend/block/static.dot index 83365bfa8..4dcaf712d 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/static.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/static.dot @@ -1,124 +1,117 @@ digraph iCFG { -33 [label="33: Return Stmt \n *&return:int =0 [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] +31 [label="31: Return Stmt \n *&return:int =0 [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] - 33 -> 32 ; -32 [label="32: Exit main \n " color=yellow style=filled] + 31 -> 30 ; +30 [label="30: Exit main \n " color=yellow style=filled] -31 [label="31: Start main\nFormals: argc:int argv:char **\nLocals: \n DECLARE_LOCALS(&return); [line 60]\n NULLIFY(&argc,false); [line 60]\n NULLIFY(&argv,false); [line 60]\n " color=yellow style=filled] +29 [label="29: Start main\nFormals: argc:int argv:char **\nLocals: \n DECLARE_LOCALS(&return); [line 60]\n NULLIFY(&argc,false); [line 60]\n NULLIFY(&argv,false); [line 60]\n " color=yellow style=filled] - 31 -> 33 ; -30 [label="30: Call (_fun___objc_anonymous_block_A_test3______4) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test3______4); [line 50]\n n$17=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test3______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_A_test3______4:class __objc_anonymous_block_A_test3______4 =n$17 [line 50]\n n$18=*&#GB$A_test3_i:int [line 50]\n *n$17.A_test3_i:int =n$18 [line 50]\n (_fun___objc_anonymous_block_A_test3______4)() [line 50]\n REMOVE_TEMPS(n$17,n$18); [line 50]\n " shape="box"] + 29 -> 31 ; +28 [label="28: Call (_fun___objc_anonymous_block_A_test3______4) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test3______4); [line 50]\n n$17=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test3______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_A_test3______4:class __objc_anonymous_block_A_test3______4 =n$17 [line 50]\n n$18=*&#GB$A_test3_i:int [line 50]\n *n$17.A_test3_i:int =n$18 [line 50]\n (_fun___objc_anonymous_block_A_test3______4)() [line 50]\n REMOVE_TEMPS(n$17,n$18); [line 50]\n " shape="box"] - 30 -> 26 ; -29 [label="29: UnaryOperator \n n$16=*&#GB$A_test3_i:int [line 52]\n *&#GB$A_test3_i:int =(n$16 + 1) [line 52]\n REMOVE_TEMPS(n$16); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] + 28 -> 24 ; +27 [label="27: UnaryOperator \n n$16=*&#GB$A_test3_i:int [line 52]\n *&#GB$A_test3_i:int =(n$16 + 1) [line 52]\n REMOVE_TEMPS(n$16); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] - 29 -> 28 ; -28 [label="28: Exit __objc_anonymous_block_A_test3______4 \n " color=yellow style=filled] + 27 -> 26 ; +26 [label="26: Exit __objc_anonymous_block_A_test3______4 \n " color=yellow style=filled] -27 [label="27: Start __objc_anonymous_block_A_test3______4\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 50]\n " color=yellow style=filled] +25 [label="25: Start __objc_anonymous_block_A_test3______4\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 50]\n " color=yellow style=filled] - 27 -> 29 ; -26 [label="26: Return Stmt \n n$15=*&#GB$A_test3_i:int [line 55]\n *&return:int =n$15 [line 55]\n REMOVE_TEMPS(n$15); [line 55]\n NULLIFY(&__objc_anonymous_block_A_test3______4,true); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"] + 25 -> 27 ; +24 [label="24: Return Stmt \n n$15=*&#GB$A_test3_i:int [line 55]\n *&return:int =n$15 [line 55]\n REMOVE_TEMPS(n$15); [line 55]\n NULLIFY(&__objc_anonymous_block_A_test3______4,true); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="box"] - 26 -> 25 ; -25 [label="25: Exit A_test3 \n " color=yellow style=filled] + 24 -> 23 ; +23 [label="23: Exit A_test3 \n " color=yellow style=filled] -24 [label="24: Start A_test3\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 47]\n " color=yellow style=filled] +22 [label="22: Start A_test3\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 47]\n " color=yellow style=filled] - 24 -> 30 ; -23 [label="23: BinaryOperatorStmt: Assign \n n$13=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 38]\n n$14=_fun_A_init(n$13:class A *) virtual [line 38]\n *&#GB$A_test2_sharedInstance:struct objc_object *=n$14 [line 38]\n REMOVE_TEMPS(n$13,n$14); [line 38]\n " shape="box"] - - - 23 -> 22 ; -22 [label="22: Call (_fun___objc_anonymous_block_A_test2______3) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test2______3); [line 39]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test2______3 ):unsigned long ) [line 39]\n *&__objc_anonymous_block_A_test2______3:class __objc_anonymous_block_A_test2______3 =n$11 [line 39]\n n$12=*&#GB$A_test2_sharedInstance:struct objc_object * [line 39]\n *n$11.A_test2_sharedInstance:struct objc_object *=n$12 [line 39]\n (_fun___objc_anonymous_block_A_test2______3)() [line 39]\n REMOVE_TEMPS(n$11,n$12); [line 39]\n " shape="box"] - - - 22 -> 18 ; -21 [label="21: DeclStmt \n n$10=*&#GB$A_test2_sharedInstance:struct objc_object * [line 41]\n *&p:struct objc_object *=n$10 [line 41]\n REMOVE_TEMPS(n$10); [line 41]\n NULLIFY(&p,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] + 22 -> 28 ; +21 [label="21: BinaryOperatorStmt: Assign \n n$13=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 38]\n n$14=_fun_A_init(n$13:class A *) virtual [line 38]\n *&#GB$A_test2_sharedInstance:struct objc_object *=n$14 [line 38]\n REMOVE_TEMPS(n$13,n$14); [line 38]\n " shape="box"] 21 -> 20 ; -20 [label="20: Exit __objc_anonymous_block_A_test2______3 \n " color=yellow style=filled] +20 [label="20: Call (_fun___objc_anonymous_block_A_test2______3) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test2______3); [line 39]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test2______3 ):unsigned long ) [line 39]\n *&__objc_anonymous_block_A_test2______3:class __objc_anonymous_block_A_test2______3 =n$11 [line 39]\n n$12=*&#GB$A_test2_sharedInstance:struct objc_object * [line 39]\n *n$11.A_test2_sharedInstance:struct objc_object *=n$12 [line 39]\n (_fun___objc_anonymous_block_A_test2______3)() [line 39]\n REMOVE_TEMPS(n$11,n$12); [line 39]\n " shape="box"] -19 [label="19: Start __objc_anonymous_block_A_test2______3\nFormals: \nLocals: p:struct objc_object * \n DECLARE_LOCALS(&return,&p); [line 39]\n NULLIFY(&p,false); [line 39]\n " color=yellow style=filled] + 20 -> 16 ; +19 [label="19: DeclStmt \n n$10=*&#GB$A_test2_sharedInstance:struct objc_object * [line 41]\n *&p:struct objc_object *=n$10 [line 41]\n REMOVE_TEMPS(n$10); [line 41]\n NULLIFY(&p,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] - 19 -> 21 ; -18 [label="18: Return Stmt \n n$9=*&#GB$A_test2_sharedInstance:struct objc_object * [line 44]\n *&return:struct objc_object *=n$9 [line 44]\n REMOVE_TEMPS(n$9); [line 44]\n NULLIFY(&__objc_anonymous_block_A_test2______3,true); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] + 19 -> 18 ; +18 [label="18: Exit __objc_anonymous_block_A_test2______3 \n " color=yellow style=filled] - 18 -> 17 ; -17 [label="17: Exit A_test2 \n " color=yellow style=filled] +17 [label="17: Start __objc_anonymous_block_A_test2______3\nFormals: \nLocals: p:struct objc_object * \n DECLARE_LOCALS(&return,&p); [line 39]\n NULLIFY(&p,false); [line 39]\n " color=yellow style=filled] -16 [label="16: Start A_test2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 36]\n " color=yellow style=filled] + 17 -> 19 ; +16 [label="16: Return Stmt \n n$9=*&#GB$A_test2_sharedInstance:struct objc_object * [line 44]\n *&return:struct objc_object *=n$9 [line 44]\n REMOVE_TEMPS(n$9); [line 44]\n NULLIFY(&__objc_anonymous_block_A_test2______3,true); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] - 16 -> 23 ; -15 [label="15: Call (_fun___objc_anonymous_block_A_test_leak______2) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test_leak______2); [line 30]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test_leak______2 ):unsigned long ) [line 30]\n *&__objc_anonymous_block_A_test_leak______2:class __objc_anonymous_block_A_test_leak______2 =n$7 [line 30]\n n$8=*&#GB$A_test_leak_sharedInstance:struct objc_object * [line 30]\n *n$7.A_test_leak_sharedInstance:struct objc_object *=n$8 [line 30]\n (_fun___objc_anonymous_block_A_test_leak______2)() [line 30]\n REMOVE_TEMPS(n$7,n$8); [line 30]\n NULLIFY(&__objc_anonymous_block_A_test_leak______2,true); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] + 16 -> 15 ; +15 [label="15: Exit A_test2 \n " color=yellow style=filled] - 15 -> 11 ; -14 [label="14: BinaryOperatorStmt: Assign \n n$5=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 31]\n n$6=_fun_A_init(n$5:class A *) virtual [line 31]\n *&#GB$A_test_leak_sharedInstance:struct objc_object *=n$6 [line 31]\n REMOVE_TEMPS(n$5,n$6); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +14 [label="14: Start A_test2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 36]\n " color=yellow style=filled] - 14 -> 13 ; -13 [label="13: Exit __objc_anonymous_block_A_test_leak______2 \n " color=yellow style=filled] + 14 -> 21 ; +13 [label="13: Call (_fun___objc_anonymous_block_A_test_leak______2) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test_leak______2); [line 30]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test_leak______2 ):unsigned long ) [line 30]\n *&__objc_anonymous_block_A_test_leak______2:class __objc_anonymous_block_A_test_leak______2 =n$7 [line 30]\n n$8=*&#GB$A_test_leak_sharedInstance:struct objc_object * [line 30]\n *n$7.A_test_leak_sharedInstance:struct objc_object *=n$8 [line 30]\n (_fun___objc_anonymous_block_A_test_leak______2)() [line 30]\n REMOVE_TEMPS(n$7,n$8); [line 30]\n NULLIFY(&__objc_anonymous_block_A_test_leak______2,true); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] -12 [label="12: Start __objc_anonymous_block_A_test_leak______2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 30]\n " color=yellow style=filled] + 13 -> 9 ; +12 [label="12: BinaryOperatorStmt: Assign \n n$5=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 31]\n n$6=_fun_A_init(n$5:class A *) virtual [line 31]\n *&#GB$A_test_leak_sharedInstance:struct objc_object *=n$6 [line 31]\n REMOVE_TEMPS(n$5,n$6); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 12 -> 14 ; -11 [label="11: Exit A_test_leak \n " color=yellow style=filled] + 12 -> 11 ; +11 [label="11: Exit __objc_anonymous_block_A_test_leak______2 \n " color=yellow style=filled] -10 [label="10: Start A_test_leak\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 28]\n " color=yellow style=filled] +10 [label="10: Start __objc_anonymous_block_A_test_leak______2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 30]\n " color=yellow style=filled] - 10 -> 15 ; -9 [label="9: Call (_fun___objc_anonymous_block_A_test______1) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test______1); [line 20]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test______1 ):unsigned long ) [line 20]\n *&__objc_anonymous_block_A_test______1:class __objc_anonymous_block_A_test______1 =n$3 [line 20]\n n$4=*&#GB$A_test_sharedInstance:struct objc_object * [line 20]\n *n$3.A_test_sharedInstance:struct objc_object *=n$4 [line 20]\n (_fun___objc_anonymous_block_A_test______1)() [line 20]\n REMOVE_TEMPS(n$3,n$4); [line 20]\n " shape="box"] + 10 -> 12 ; +9 [label="9: Exit A_test_leak \n " color=yellow style=filled] - 9 -> 5 ; -8 [label="8: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 21]\n n$2=_fun_A_init(n$1:class A *) virtual [line 21]\n *&#GB$A_test_sharedInstance:struct objc_object *=n$2 [line 21]\n REMOVE_TEMPS(n$1,n$2); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +8 [label="8: Start A_test_leak\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 28]\n " color=yellow style=filled] - 8 -> 7 ; -7 [label="7: Exit __objc_anonymous_block_A_test______1 \n " color=yellow style=filled] + 8 -> 13 ; +7 [label="7: Call (_fun___objc_anonymous_block_A_test______1) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test______1); [line 20]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test______1 ):unsigned long ) [line 20]\n *&__objc_anonymous_block_A_test______1:class __objc_anonymous_block_A_test______1 =n$3 [line 20]\n n$4=*&#GB$A_test_sharedInstance:struct objc_object * [line 20]\n *n$3.A_test_sharedInstance:struct objc_object *=n$4 [line 20]\n (_fun___objc_anonymous_block_A_test______1)() [line 20]\n REMOVE_TEMPS(n$3,n$4); [line 20]\n " shape="box"] -6 [label="6: Start __objc_anonymous_block_A_test______1\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] + 7 -> 3 ; +6 [label="6: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 21]\n n$2=_fun_A_init(n$1:class A *) virtual [line 21]\n *&#GB$A_test_sharedInstance:struct objc_object *=n$2 [line 21]\n REMOVE_TEMPS(n$1,n$2); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] - 6 -> 8 ; -5 [label="5: Return Stmt \n n$0=*&#GB$A_test_sharedInstance:struct objc_object * [line 25]\n *&return:struct objc_object *=n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&__objc_anonymous_block_A_test______1,true); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] + 6 -> 5 ; +5 [label="5: Exit __objc_anonymous_block_A_test______1 \n " color=yellow style=filled] - 5 -> 4 ; -4 [label="4: Exit A_test \n " color=yellow style=filled] +4 [label="4: Start __objc_anonymous_block_A_test______1\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] -3 [label="3: Start A_test\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 18]\n " color=yellow style=filled] + 4 -> 6 ; +3 [label="3: Return Stmt \n n$0=*&#GB$A_test_sharedInstance:struct objc_object * [line 25]\n *&return:struct objc_object *=n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&__objc_anonymous_block_A_test______1,true); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] - 3 -> 9 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_test \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start A_test\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 18]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 7 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/boxing/Boxing.dot b/infer/tests/codetoanalyze/objc/frontend/boxing/Boxing.dot index 41aa5231c..f68e9ff9b 100644 --- a/infer/tests/codetoanalyze/objc/frontend/boxing/Boxing.dot +++ b/infer/tests/codetoanalyze/objc/frontend/boxing/Boxing.dot @@ -1,107 +1,100 @@ digraph iCFG { -28 [label="28: DeclStmt \n n$15=_fun_strdup(\"hello world\":char *) [line 42]\n n$16=_fun_NSString_stringWithUTF8String:(n$15:char *) [line 42]\n *&s:class NSString *=n$16 [line 42]\n REMOVE_TEMPS(n$15,n$16); [line 42]\n NULLIFY(&s,false); [line 42]\n " shape="box"] +26 [label="26: DeclStmt \n n$15=_fun_strdup(\"hello world\":char *) [line 42]\n n$16=_fun_NSString_stringWithUTF8String:(n$15:char *) [line 42]\n *&s:class NSString *=n$16 [line 42]\n REMOVE_TEMPS(n$15,n$16); [line 42]\n NULLIFY(&s,false); [line 42]\n " shape="box"] - 28 -> 27 ; -27 [label="27: Return Stmt \n n$14=_fun_NSString_stringWithUTF8String:(\"hello world\":char *) [line 43]\n *&return:class NSString *=n$14 [line 43]\n REMOVE_TEMPS(n$14); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] + 26 -> 25 ; +25 [label="25: Return Stmt \n n$14=_fun_NSString_stringWithUTF8String:(\"hello world\":char *) [line 43]\n *&return:class NSString *=n$14 [line 43]\n REMOVE_TEMPS(n$14); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] - 27 -> 26 ; -26 [label="26: Exit Boxing_getS \n " color=yellow style=filled] + 25 -> 24 ; +24 [label="24: Exit Boxing_getS \n " color=yellow style=filled] -25 [label="25: Start Boxing_getS\nFormals: self:class Boxing *\nLocals: s:class NSString * \n DECLARE_LOCALS(&return,&s); [line 41]\n NULLIFY(&s,false); [line 41]\n NULLIFY(&self,false); [line 41]\n " color=yellow style=filled] +23 [label="23: Start Boxing_getS\nFormals: self:class Boxing *\nLocals: s:class NSString * \n DECLARE_LOCALS(&return,&s); [line 41]\n NULLIFY(&s,false); [line 41]\n NULLIFY(&self,false); [line 41]\n " color=yellow style=filled] - 25 -> 28 ; -24 [label="24: DeclStmt \n n$13=_fun_NSNumber_numberWithBool:(1:_Bool ) [line 37]\n *&n:class NSNumber *=n$13 [line 37]\n REMOVE_TEMPS(n$13); [line 37]\n NULLIFY(&n,false); [line 37]\n " shape="box"] + 23 -> 26 ; +22 [label="22: DeclStmt \n n$13=_fun_NSNumber_numberWithBool:(1:_Bool ) [line 37]\n *&n:class NSNumber *=n$13 [line 37]\n REMOVE_TEMPS(n$13); [line 37]\n NULLIFY(&n,false); [line 37]\n " shape="box"] - 24 -> 23 ; -23 [label="23: Return Stmt \n n$12=_fun_NSNumber_numberWithBool:(1:_Bool ) [line 38]\n *&return:class NSNumber *=n$12 [line 38]\n REMOVE_TEMPS(n$12); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] + 22 -> 21 ; +21 [label="21: Return Stmt \n n$12=_fun_NSNumber_numberWithBool:(1:_Bool ) [line 38]\n *&return:class NSNumber *=n$12 [line 38]\n REMOVE_TEMPS(n$12); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] - 23 -> 22 ; -22 [label="22: Exit Boxing_getBool \n " color=yellow style=filled] + 21 -> 20 ; +20 [label="20: Exit Boxing_getBool \n " color=yellow style=filled] -21 [label="21: Start Boxing_getBool\nFormals: self:class Boxing *\nLocals: n:class NSNumber * \n DECLARE_LOCALS(&return,&n); [line 36]\n NULLIFY(&n,false); [line 36]\n NULLIFY(&self,false); [line 36]\n " color=yellow style=filled] +19 [label="19: Start Boxing_getBool\nFormals: self:class Boxing *\nLocals: n:class NSNumber * \n DECLARE_LOCALS(&return,&n); [line 36]\n NULLIFY(&n,false); [line 36]\n NULLIFY(&self,false); [line 36]\n " color=yellow style=filled] - 21 -> 24 ; -20 [label="20: DeclStmt \n n$11=_fun_NSNumber_numberWithDouble:(1.500000:double ) [line 32]\n *&n:class NSNumber *=n$11 [line 32]\n REMOVE_TEMPS(n$11); [line 32]\n NULLIFY(&n,false); [line 32]\n " shape="box"] + 19 -> 22 ; +18 [label="18: DeclStmt \n n$11=_fun_NSNumber_numberWithDouble:(1.500000:double ) [line 32]\n *&n:class NSNumber *=n$11 [line 32]\n REMOVE_TEMPS(n$11); [line 32]\n NULLIFY(&n,false); [line 32]\n " shape="box"] - 20 -> 19 ; -19 [label="19: Return Stmt \n n$10=_fun_NSNumber_numberWithDouble:(1.500000:double ) [line 33]\n *&return:class NSNumber *=n$10 [line 33]\n REMOVE_TEMPS(n$10); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] + 18 -> 17 ; +17 [label="17: Return Stmt \n n$10=_fun_NSNumber_numberWithDouble:(1.500000:double ) [line 33]\n *&return:class NSNumber *=n$10 [line 33]\n REMOVE_TEMPS(n$10); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] - 19 -> 18 ; -18 [label="18: Exit Boxing_getDouble \n " color=yellow style=filled] + 17 -> 16 ; +16 [label="16: Exit Boxing_getDouble \n " color=yellow style=filled] -17 [label="17: Start Boxing_getDouble\nFormals: self:class Boxing *\nLocals: n:class NSNumber * \n DECLARE_LOCALS(&return,&n); [line 31]\n NULLIFY(&n,false); [line 31]\n NULLIFY(&self,false); [line 31]\n " color=yellow style=filled] +15 [label="15: Start Boxing_getDouble\nFormals: self:class Boxing *\nLocals: n:class NSNumber * \n DECLARE_LOCALS(&return,&n); [line 31]\n NULLIFY(&n,false); [line 31]\n NULLIFY(&self,false); [line 31]\n " color=yellow style=filled] - 17 -> 20 ; -16 [label="16: DeclStmt \n n$9=_fun_NSNumber_numberWithFloat:(1.500000:float ) [line 27]\n *&n:class NSNumber *=n$9 [line 27]\n REMOVE_TEMPS(n$9); [line 27]\n NULLIFY(&n,false); [line 27]\n " shape="box"] + 15 -> 18 ; +14 [label="14: DeclStmt \n n$9=_fun_NSNumber_numberWithFloat:(1.500000:float ) [line 27]\n *&n:class NSNumber *=n$9 [line 27]\n REMOVE_TEMPS(n$9); [line 27]\n NULLIFY(&n,false); [line 27]\n " shape="box"] - 16 -> 15 ; -15 [label="15: Return Stmt \n n$8=_fun_NSNumber_numberWithFloat:(1.500000:float ) [line 28]\n *&return:class NSNumber *=n$8 [line 28]\n REMOVE_TEMPS(n$8); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] + 14 -> 13 ; +13 [label="13: Return Stmt \n n$8=_fun_NSNumber_numberWithFloat:(1.500000:float ) [line 28]\n *&return:class NSNumber *=n$8 [line 28]\n REMOVE_TEMPS(n$8); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] - 15 -> 14 ; -14 [label="14: Exit Boxing_getFloat \n " color=yellow style=filled] + 13 -> 12 ; +12 [label="12: Exit Boxing_getFloat \n " color=yellow style=filled] -13 [label="13: Start Boxing_getFloat\nFormals: self:class Boxing *\nLocals: n:class NSNumber * \n DECLARE_LOCALS(&return,&n); [line 26]\n NULLIFY(&n,false); [line 26]\n NULLIFY(&self,false); [line 26]\n " color=yellow style=filled] +11 [label="11: Start Boxing_getFloat\nFormals: self:class Boxing *\nLocals: n:class NSNumber * \n DECLARE_LOCALS(&return,&n); [line 26]\n NULLIFY(&n,false); [line 26]\n NULLIFY(&self,false); [line 26]\n " color=yellow style=filled] - 13 -> 16 ; -12 [label="12: DeclStmt \n n$7=_fun_NSNumber_numberWithInt:(5:int ) [line 22]\n *&n:class NSNumber *=n$7 [line 22]\n REMOVE_TEMPS(n$7); [line 22]\n NULLIFY(&n,false); [line 22]\n " shape="box"] + 11 -> 14 ; +10 [label="10: DeclStmt \n n$7=_fun_NSNumber_numberWithInt:(5:int ) [line 22]\n *&n:class NSNumber *=n$7 [line 22]\n REMOVE_TEMPS(n$7); [line 22]\n NULLIFY(&n,false); [line 22]\n " shape="box"] - 12 -> 11 ; -11 [label="11: Return Stmt \n n$6=_fun_NSNumber_numberWithInt:(5:int ) [line 23]\n *&return:class NSNumber *=n$6 [line 23]\n REMOVE_TEMPS(n$6); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] + 10 -> 9 ; +9 [label="9: Return Stmt \n n$6=_fun_NSNumber_numberWithInt:(5:int ) [line 23]\n *&return:class NSNumber *=n$6 [line 23]\n REMOVE_TEMPS(n$6); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] - 11 -> 10 ; -10 [label="10: Exit Boxing_getInt \n " color=yellow style=filled] + 9 -> 8 ; +8 [label="8: Exit Boxing_getInt \n " color=yellow style=filled] -9 [label="9: Start Boxing_getInt\nFormals: self:class Boxing *\nLocals: n:class NSNumber * \n DECLARE_LOCALS(&return,&n); [line 21]\n NULLIFY(&n,false); [line 21]\n NULLIFY(&self,false); [line 21]\n " color=yellow style=filled] +7 [label="7: Start Boxing_getInt\nFormals: self:class Boxing *\nLocals: n:class NSNumber * \n DECLARE_LOCALS(&return,&n); [line 21]\n NULLIFY(&n,false); [line 21]\n NULLIFY(&self,false); [line 21]\n " color=yellow style=filled] - 9 -> 12 ; -8 [label="8: DeclStmt \n *&x:int =4 [line 15]\n " shape="box"] - - - 8 -> 7 ; -7 [label="7: DeclStmt \n *&y:int =5 [line 16]\n " shape="box"] - - - 7 -> 6 ; -6 [label="6: DeclStmt \n n$3=*&x:int [line 17]\n n$4=*&y:int [line 17]\n n$5=_fun_NSNumber_numberWithInt:((n$3 + n$4):int ) [line 17]\n *&n:class NSNumber *=n$5 [line 17]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 17]\n NULLIFY(&n,false); [line 17]\n " shape="box"] + 7 -> 10 ; +6 [label="6: DeclStmt \n *&x:int =4 [line 15]\n " shape="box"] 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&x:int [line 18]\n n$1=*&y:int [line 18]\n n$2=_fun_NSNumber_numberWithInt:((n$0 + n$1):int ) [line 18]\n *&return:class NSNumber *=n$2 [line 18]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 18]\n NULLIFY(&x,false); [line 18]\n NULLIFY(&y,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +5 [label="5: DeclStmt \n *&y:int =5 [line 16]\n " shape="box"] 5 -> 4 ; -4 [label="4: Exit Boxing_getIntExp \n " color=yellow style=filled] +4 [label="4: DeclStmt \n n$3=*&x:int [line 17]\n n$4=*&y:int [line 17]\n n$5=_fun_NSNumber_numberWithInt:((n$3 + n$4):int ) [line 17]\n *&n:class NSNumber *=n$5 [line 17]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 17]\n NULLIFY(&n,false); [line 17]\n " shape="box"] -3 [label="3: Start Boxing_getIntExp\nFormals: self:class Boxing *\nLocals: n:class NSNumber * y:int x:int \n DECLARE_LOCALS(&return,&n,&y,&x); [line 14]\n NULLIFY(&n,false); [line 14]\n NULLIFY(&self,false); [line 14]\n NULLIFY(&x,false); [line 14]\n NULLIFY(&y,false); [line 14]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Return Stmt \n n$0=*&x:int [line 18]\n n$1=*&y:int [line 18]\n n$2=_fun_NSNumber_numberWithInt:((n$0 + n$1):int ) [line 18]\n *&return:class NSNumber *=n$2 [line 18]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 18]\n NULLIFY(&x,false); [line 18]\n NULLIFY(&y,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] - 3 -> 8 ; -2 [label="2: Exit Boxing_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit Boxing_getIntExp \n " color=yellow style=filled] -1 [label="1: Start Boxing_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start Boxing_getIntExp\nFormals: self:class Boxing *\nLocals: n:class NSNumber * y:int x:int \n DECLARE_LOCALS(&return,&n,&y,&x); [line 14]\n NULLIFY(&n,false); [line 14]\n NULLIFY(&self,false); [line 14]\n NULLIFY(&x,false); [line 14]\n NULLIFY(&y,false); [line 14]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 6 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot b/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot index b8b11da83..0bc48d951 100644 --- a/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot +++ b/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot @@ -1,52 +1,45 @@ digraph iCFG { -13 [label="13: Return Stmt \n n$1=*&self:class A * [line 24]\n n$4=*&SIL_temp_conditional___8:int [line 24]\n NULLIFY(&SIL_temp_conditional___8,true); [line 24]\n n$5=_fun_A_test4:(n$1:class A *,n$4:int ) virtual [line 24]\n *&return:int =n$5 [line 24]\n REMOVE_TEMPS(n$1,n$4,n$5); [line 24]\n NULLIFY(&self,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +11 [label="11: Return Stmt \n n$1=*&self:class A * [line 24]\n n$4=*&SIL_temp_conditional___6:int [line 24]\n NULLIFY(&SIL_temp_conditional___6,true); [line 24]\n n$5=_fun_A_test4:(n$1:class A *,n$4:int ) virtual [line 24]\n *&return:int =n$5 [line 24]\n REMOVE_TEMPS(n$1,n$4,n$5); [line 24]\n NULLIFY(&self,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 13 -> 7 ; -12 [label="12: ConditinalStmt Branch \n NULLIFY(&b,false); [line 24]\n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 24]\n *&SIL_temp_conditional___8:int =1 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] + 11 -> 5 ; +10 [label="10: ConditinalStmt Branch \n NULLIFY(&b,false); [line 24]\n DECLARE_LOCALS(&SIL_temp_conditional___6); [line 24]\n *&SIL_temp_conditional___6:int =1 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 12 -> 8 ; -11 [label="11: ConditinalStmt Branch \n n$3=*&b:_Bool [line 24]\n DECLARE_LOCALS(&SIL_temp_conditional___8); [line 24]\n *&SIL_temp_conditional___8:int =n$3 [line 24]\n REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&b,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] + 10 -> 6 ; +9 [label="9: ConditinalStmt Branch \n n$3=*&b:_Bool [line 24]\n DECLARE_LOCALS(&SIL_temp_conditional___6); [line 24]\n *&SIL_temp_conditional___6:int =n$3 [line 24]\n REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&b,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 11 -> 8 ; -10 [label="10: Prune (false branch) \n n$2=*&b:_Bool [line 24]\n PRUNE((n$2 == 0), false); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n " shape="invhouse"] + 9 -> 6 ; +8 [label="8: Prune (false branch) \n n$2=*&b:_Bool [line 24]\n PRUNE((n$2 == 0), false); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n " shape="invhouse"] - 10 -> 12 ; -9 [label="9: Prune (true branch) \n n$2=*&b:_Bool [line 24]\n PRUNE((n$2 != 0), true); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n " shape="invhouse"] + 8 -> 10 ; +7 [label="7: Prune (true branch) \n n$2=*&b:_Bool [line 24]\n PRUNE((n$2 != 0), true); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n " shape="invhouse"] - 9 -> 11 ; -8 [label="8: + \n " ] + 7 -> 9 ; +6 [label="6: + \n " ] - 8 -> 13 ; -7 [label="7: Exit A_test5: \n " color=yellow style=filled] + 6 -> 11 ; +5 [label="5: Exit A_test5: \n " color=yellow style=filled] -6 [label="6: Start A_test5:\nFormals: self:class A * b:_Bool \nLocals: \n DECLARE_LOCALS(&return); [line 23]\n " color=yellow style=filled] +4 [label="4: Start A_test5:\nFormals: self:class A * b:_Bool \nLocals: \n DECLARE_LOCALS(&return); [line 23]\n " color=yellow style=filled] - 6 -> 9 ; - 6 -> 10 ; -5 [label="5: Return Stmt \n n$0=*&x:int [line 20]\n *&return:int =n$0 [line 20]\n REMOVE_TEMPS(n$0); [line 20]\n NULLIFY(&x,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] + 4 -> 7 ; + 4 -> 8 ; +3 [label="3: Return Stmt \n n$0=*&x:int [line 20]\n *&return:int =n$0 [line 20]\n REMOVE_TEMPS(n$0); [line 20]\n NULLIFY(&x,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit A_test4: \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_test4: \n " color=yellow style=filled] -3 [label="3: Start A_test4:\nFormals: self:class A * x:int \nLocals: \n DECLARE_LOCALS(&return); [line 19]\n NULLIFY(&self,false); [line 19]\n " color=yellow style=filled] +1 [label="1: Start A_test4:\nFormals: self:class A * x:int \nLocals: \n DECLARE_LOCALS(&return); [line 19]\n NULLIFY(&self,false); [line 19]\n " color=yellow style=filled] - 3 -> 5 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot b/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot index f8df74651..e15622739 100644 --- a/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot +++ b/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot @@ -1,52 +1,45 @@ digraph iCFG { -13 [label="13: DeclStmt \n n$7=_fun___objc_alloc_no_fail(sizeof(class NSString ):unsigned long ) [line 28]\n *&s:class NSString *=n$7 [line 28]\n REMOVE_TEMPS(n$7); [line 28]\n " shape="box"] - - - 13 -> 10 ; - 13 -> 11 ; -12 [label="12: Return Stmt \n NULLIFY(&s,false); [line 30]\n n$4=_fun_NSString_stringWithUTF8String:(\"Something is not right exception\":char *) [line 31]\n n$5=_fun_NSString_stringWithUTF8String:(\"Can't perform this operation because of this or that\":char *) [line 33]\n n$6=_fun_NSException_exceptionWithName:reason:userInfo:(n$4:class NSString *,n$5:class NSString *,0:class NSDictionary *) [line 30]\n *&return:void =n$6 [line 30]\n REMOVE_TEMPS(n$4,n$5,n$6); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] - - - 12 -> 8 ; -11 [label="11: Prune (false branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 == 0), false); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n " shape="invhouse"] +11 [label="11: DeclStmt \n n$7=_fun___objc_alloc_no_fail(sizeof(class NSString ):unsigned long ) [line 28]\n *&s:class NSString *=n$7 [line 28]\n REMOVE_TEMPS(n$7); [line 28]\n " shape="box"] + 11 -> 8 ; 11 -> 9 ; -10 [label="10: Prune (true branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 != 0), true); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n " shape="invhouse"] +10 [label="10: Return Stmt \n NULLIFY(&s,false); [line 30]\n n$4=_fun_NSString_stringWithUTF8String:(\"Something is not right exception\":char *) [line 31]\n n$5=_fun_NSString_stringWithUTF8String:(\"Can't perform this operation because of this or that\":char *) [line 33]\n n$6=_fun_NSException_exceptionWithName:reason:userInfo:(n$4:class NSString *,n$5:class NSString *,0:class NSDictionary *) [line 30]\n *&return:void =n$6 [line 30]\n REMOVE_TEMPS(n$4,n$5,n$6); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] - 10 -> 12 ; -9 [label="9: + \n NULLIFY(&s,false); [line 29]\n " ] + 10 -> 6 ; +9 [label="9: Prune (false branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 == 0), false); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n " shape="invhouse"] - 9 -> 8 ; -8 [label="8: Exit ExceptionExample_test1 \n " color=yellow style=filled] + 9 -> 7 ; +8 [label="8: Prune (true branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 != 0), true); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n " shape="invhouse"] -7 [label="7: Start ExceptionExample_test1\nFormals: self:class ExceptionExample *\nLocals: s:class NSString * \n DECLARE_LOCALS(&return,&s); [line 27]\n NULLIFY(&s,false); [line 27]\n NULLIFY(&self,false); [line 27]\n " color=yellow style=filled] + 8 -> 10 ; +7 [label="7: + \n NULLIFY(&s,false); [line 29]\n " ] - 7 -> 13 ; -6 [label="6: DeclStmt \n n$2=_fun___objc_alloc_no_fail(sizeof(class NSString ):unsigned long ) [line 20]\n *&s:class NSString *=n$2 [line 20]\n REMOVE_TEMPS(n$2); [line 20]\n NULLIFY(&s,false); [line 20]\n " shape="box"] + 7 -> 6 ; +6 [label="6: Exit ExceptionExample_test1 \n " color=yellow style=filled] - 6 -> 5 ; -5 [label="5: Message Call: description \n n$0=*&self:class ExceptionExample * [line 23]\n n$1=_fun_ExceptionExample_description(n$0:class ExceptionExample *) [line 23]\n REMOVE_TEMPS(n$0,n$1); [line 23]\n NULLIFY(&self,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +5 [label="5: Start ExceptionExample_test1\nFormals: self:class ExceptionExample *\nLocals: s:class NSString * \n DECLARE_LOCALS(&return,&s); [line 27]\n NULLIFY(&s,false); [line 27]\n NULLIFY(&self,false); [line 27]\n " color=yellow style=filled] - 5 -> 4 ; -4 [label="4: Exit ExceptionExample_test \n " color=yellow style=filled] + 5 -> 11 ; +4 [label="4: DeclStmt \n n$2=_fun___objc_alloc_no_fail(sizeof(class NSString ):unsigned long ) [line 20]\n *&s:class NSString *=n$2 [line 20]\n REMOVE_TEMPS(n$2); [line 20]\n NULLIFY(&s,false); [line 20]\n " shape="box"] -3 [label="3: Start ExceptionExample_test\nFormals: self:class ExceptionExample *\nLocals: s:class NSString * \n DECLARE_LOCALS(&return,&s); [line 18]\n NULLIFY(&s,false); [line 18]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Message Call: description \n n$0=*&self:class ExceptionExample * [line 23]\n n$1=_fun_ExceptionExample_description(n$0:class ExceptionExample *) [line 23]\n REMOVE_TEMPS(n$0,n$1); [line 23]\n NULLIFY(&self,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] - 3 -> 6 ; -2 [label="2: Exit ExceptionExample_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit ExceptionExample_test \n " color=yellow style=filled] -1 [label="1: Start ExceptionExample_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start ExceptionExample_test\nFormals: self:class ExceptionExample *\nLocals: s:class NSString * \n DECLARE_LOCALS(&return,&s); [line 18]\n NULLIFY(&s,false); [line 18]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 4 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot b/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot index aa115ce36..358652826 100644 --- a/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot +++ b/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot @@ -1,93 +1,86 @@ digraph iCFG { -23 [label="23: DeclStmt \n *&size:int =0 [line 26]\n " shape="box"] +21 [label="21: DeclStmt \n *&size:int =0 [line 26]\n " shape="box"] - 23 -> 22 ; -22 [label="22: DeclStmt \n *&item:class NSArray *=0 [line 27]\n NULLIFY(&item,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] + 21 -> 20 ; +20 [label="20: DeclStmt \n *&item:class NSArray *=0 [line 27]\n NULLIFY(&item,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] - 22 -> 17 ; -21 [label="21: BinaryOperatorStmt: AddAssign \n n$13=*&item:class NSArray * [line 29]\n n$14=_fun_NSArray_count(n$13:class NSArray *) [line 29]\n n$15=*&size:int [line 29]\n *&size:int =(n$15 + n$14) [line 29]\n REMOVE_TEMPS(n$13,n$14,n$15); [line 29]\n NULLIFY(&item,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] + 20 -> 15 ; +19 [label="19: BinaryOperatorStmt: AddAssign \n n$13=*&item:class NSArray * [line 29]\n n$14=_fun_NSArray_count(n$13:class NSArray *) [line 29]\n n$15=*&size:int [line 29]\n *&size:int =(n$15 + n$14) [line 29]\n REMOVE_TEMPS(n$13,n$14,n$15); [line 29]\n NULLIFY(&item,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] - 21 -> 17 ; -20 [label="20: Prune (false branch) \n PRUNE((n$12 == 0), false); [line 28]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 28]\n " shape="invhouse"] + 19 -> 15 ; +18 [label="18: Prune (false branch) \n PRUNE((n$12 == 0), false); [line 28]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 28]\n " shape="invhouse"] - 20 -> 16 ; -19 [label="19: Prune (true branch) \n PRUNE((n$12 != 0), true); [line 28]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 28]\n " shape="invhouse"] + 18 -> 14 ; +17 [label="17: Prune (true branch) \n PRUNE((n$12 != 0), true); [line 28]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 28]\n " shape="invhouse"] - 19 -> 21 ; -18 [label="18: BinaryOperatorStmt: Assign \n n$10=*&items:class NSArray * [line 28]\n n$11=_fun_NSArray_nextObject(n$10:class NSArray *) virtual [line 28]\n *&item:class NSArray *=n$11 [line 28]\n n$12=*&item:class NSArray * [line 28]\n " shape="box"] + 17 -> 19 ; +16 [label="16: BinaryOperatorStmt: Assign \n n$10=*&items:class NSArray * [line 28]\n n$11=_fun_NSArray_nextObject(n$10:class NSArray *) virtual [line 28]\n *&item:class NSArray *=n$11 [line 28]\n n$12=*&item:class NSArray * [line 28]\n " shape="box"] - 18 -> 19 ; - 18 -> 20 ; -17 [label="17: + \n " ] + 16 -> 17 ; + 16 -> 18 ; +15 [label="15: + \n " ] - 17 -> 18 ; -16 [label="16: Return Stmt \n NULLIFY(&item,false); [line 31]\n NULLIFY(&items,false); [line 31]\n n$9=*&size:int [line 31]\n *&return:int =n$9 [line 31]\n REMOVE_TEMPS(n$9); [line 31]\n NULLIFY(&size,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] + 15 -> 16 ; +14 [label="14: Return Stmt \n NULLIFY(&item,false); [line 31]\n NULLIFY(&items,false); [line 31]\n n$9=*&size:int [line 31]\n *&return:int =n$9 [line 31]\n REMOVE_TEMPS(n$9); [line 31]\n NULLIFY(&size,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 16 -> 15 ; -15 [label="15: Exit A_while_loop: \n " color=yellow style=filled] + 14 -> 13 ; +13 [label="13: Exit A_while_loop: \n " color=yellow style=filled] -14 [label="14: Start A_while_loop:\nFormals: self:class A * items:class NSArray *\nLocals: item:class NSArray * size:int \n DECLARE_LOCALS(&return,&item,&size); [line 25]\n NULLIFY(&item,false); [line 25]\n NULLIFY(&self,false); [line 25]\n NULLIFY(&size,false); [line 25]\n " color=yellow style=filled] +12 [label="12: Start A_while_loop:\nFormals: self:class A * items:class NSArray *\nLocals: item:class NSArray * size:int \n DECLARE_LOCALS(&return,&item,&size); [line 25]\n NULLIFY(&item,false); [line 25]\n NULLIFY(&self,false); [line 25]\n NULLIFY(&size,false); [line 25]\n " color=yellow style=filled] - 14 -> 23 ; -13 [label="13: DeclStmt \n *&size:int =0 [line 18]\n " shape="box"] - - - 13 -> 12 ; -12 [label="12: BinaryOperatorStmt: Assign \n n$7=*&items:class NSArray * [line 19]\n n$8=_fun_NSArray_nextObject(n$7:class NSArray *) virtual [line 19]\n *&item:class NSArray *=n$8 [line 19]\n REMOVE_TEMPS(n$7,n$8); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - - - 12 -> 6 ; -11 [label="11: BinaryOperatorStmt: AddAssign \n n$4=*&item:class NSArray * [line 20]\n n$5=_fun_NSArray_count(n$4:class NSArray *) [line 20]\n n$6=*&size:int [line 20]\n *&size:int =(n$6 + n$5) [line 20]\n REMOVE_TEMPS(n$4,n$5,n$6); [line 20]\n NULLIFY(&item,false); [line 20]\n " shape="box"] + 12 -> 21 ; +11 [label="11: DeclStmt \n *&size:int =0 [line 18]\n " shape="box"] 11 -> 10 ; -10 [label="10: BinaryOperatorStmt: Assign \n n$2=*&items:class NSArray * [line 19]\n n$3=_fun_NSArray_nextObject(n$2:class NSArray *) virtual [line 19]\n *&item:class NSArray *=n$3 [line 19]\n REMOVE_TEMPS(n$2,n$3); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +10 [label="10: BinaryOperatorStmt: Assign \n n$7=*&items:class NSArray * [line 19]\n n$8=_fun_NSArray_nextObject(n$7:class NSArray *) virtual [line 19]\n *&item:class NSArray *=n$8 [line 19]\n REMOVE_TEMPS(n$7,n$8); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 10 -> 6 ; -9 [label="9: Prune (false branch) \n PRUNE(((n$1 != 0) == 0), false); [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n " shape="invhouse"] + 10 -> 4 ; +9 [label="9: BinaryOperatorStmt: AddAssign \n n$4=*&item:class NSArray * [line 20]\n n$5=_fun_NSArray_count(n$4:class NSArray *) [line 20]\n n$6=*&size:int [line 20]\n *&size:int =(n$6 + n$5) [line 20]\n REMOVE_TEMPS(n$4,n$5,n$6); [line 20]\n NULLIFY(&item,false); [line 20]\n " shape="box"] - 9 -> 5 ; -8 [label="8: Prune (true branch) \n PRUNE(((n$1 != 0) != 0), true); [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n " shape="invhouse"] + 9 -> 8 ; +8 [label="8: BinaryOperatorStmt: Assign \n n$2=*&items:class NSArray * [line 19]\n n$3=_fun_NSArray_nextObject(n$2:class NSArray *) virtual [line 19]\n *&item:class NSArray *=n$3 [line 19]\n REMOVE_TEMPS(n$2,n$3); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 8 -> 11 ; -7 [label="7: BinaryOperatorStmt: NE \n n$1=*&item:class NSArray * [line 19]\n " shape="box"] + 8 -> 4 ; +7 [label="7: Prune (false branch) \n PRUNE(((n$1 != 0) == 0), false); [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n " shape="invhouse"] - 7 -> 8 ; - 7 -> 9 ; -6 [label="6: + \n " ] + 7 -> 3 ; +6 [label="6: Prune (true branch) \n PRUNE(((n$1 != 0) != 0), true); [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n " shape="invhouse"] - 6 -> 7 ; -5 [label="5: Return Stmt \n NULLIFY(&item,false); [line 22]\n NULLIFY(&items,false); [line 22]\n n$0=*&size:int [line 22]\n *&return:int =n$0 [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&size,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] + 6 -> 9 ; +5 [label="5: BinaryOperatorStmt: NE \n n$1=*&item:class NSArray * [line 19]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit A_fast_loop: \n " color=yellow style=filled] + 5 -> 6 ; + 5 -> 7 ; +4 [label="4: + \n " ] -3 [label="3: Start A_fast_loop:\nFormals: self:class A * items:class NSArray *\nLocals: item:class NSArray * size:int \n DECLARE_LOCALS(&return,&item,&size); [line 17]\n NULLIFY(&item,false); [line 17]\n NULLIFY(&self,false); [line 17]\n NULLIFY(&size,false); [line 17]\n " color=yellow style=filled] + 4 -> 5 ; +3 [label="3: Return Stmt \n NULLIFY(&item,false); [line 22]\n NULLIFY(&items,false); [line 22]\n n$0=*&size:int [line 22]\n *&return:int =n$0 [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&size,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] - 3 -> 13 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_fast_loop: \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start A_fast_loop:\nFormals: self:class A * items:class NSArray *\nLocals: item:class NSArray * size:int \n DECLARE_LOCALS(&return,&item,&size); [line 17]\n NULLIFY(&item,false); [line 17]\n NULLIFY(&self,false); [line 17]\n NULLIFY(&size,false); [line 17]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 11 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/predefined_expr/PredefinedExprExample.dot b/infer/tests/codetoanalyze/objc/frontend/predefined_expr/PredefinedExprExample.dot index 8f3870827..38d9c0290 100644 --- a/infer/tests/codetoanalyze/objc/frontend/predefined_expr/PredefinedExprExample.dot +++ b/infer/tests/codetoanalyze/objc/frontend/predefined_expr/PredefinedExprExample.dot @@ -1,42 +1,35 @@ digraph iCFG { -11 [label="11: Call _fun_NSLog \n n$2=_fun_NSString_stringWithUTF8String:(\"%s\":char *) [line 27]\n _fun_NSLog(n$2:struct objc_object *,\"\":char *) [line 27]\n REMOVE_TEMPS(n$2); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +9 [label="9: Call _fun_NSLog \n n$2=_fun_NSString_stringWithUTF8String:(\"%s\":char *) [line 27]\n _fun_NSLog(n$2:struct objc_object *,\"\":char *) [line 27]\n REMOVE_TEMPS(n$2); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] - 11 -> 10 ; -10 [label="10: Exit A_testFunct \n " color=yellow style=filled] + 9 -> 8 ; +8 [label="8: Exit A_testFunct \n " color=yellow style=filled] -9 [label="9: Start A_testFunct\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 26]\n NULLIFY(&self,false); [line 26]\n " color=yellow style=filled] +7 [label="7: Start A_testFunct\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 26]\n NULLIFY(&self,false); [line 26]\n " color=yellow style=filled] - 9 -> 11 ; -8 [label="8: Call _fun_NSLog \n n$1=_fun_NSString_stringWithUTF8String:(\"%s\":char *) [line 23]\n _fun_NSLog(n$1:struct objc_object *,\"\":char *) [line 23]\n REMOVE_TEMPS(n$1); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] + 7 -> 9 ; +6 [label="6: Call _fun_NSLog \n n$1=_fun_NSString_stringWithUTF8String:(\"%s\":char *) [line 23]\n _fun_NSLog(n$1:struct objc_object *,\"\":char *) [line 23]\n REMOVE_TEMPS(n$1); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] - 8 -> 7 ; -7 [label="7: Exit A_testFunction \n " color=yellow style=filled] + 6 -> 5 ; +5 [label="5: Exit A_testFunction \n " color=yellow style=filled] -6 [label="6: Start A_testFunction\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 22]\n NULLIFY(&self,false); [line 22]\n " color=yellow style=filled] +4 [label="4: Start A_testFunction\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 22]\n NULLIFY(&self,false); [line 22]\n " color=yellow style=filled] - 6 -> 8 ; -5 [label="5: Call _fun_NSLog \n n$0=_fun_NSString_stringWithUTF8String:(\"%s\":char *) [line 19]\n _fun_NSLog(n$0:struct objc_object *,\"\":char *) [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] + 4 -> 6 ; +3 [label="3: Call _fun_NSLog \n n$0=_fun_NSString_stringWithUTF8String:(\"%s\":char *) [line 19]\n _fun_NSLog(n$0:struct objc_object *,\"\":char *) [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit A_testPrettyFunction \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_testPrettyFunction \n " color=yellow style=filled] -3 [label="3: Start A_testPrettyFunction\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] +1 [label="1: Start A_testPrettyFunction\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] - 3 -> 5 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot b/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot index 1fb17c902..75eac941d 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot @@ -62,10 +62,10 @@ digraph iCFG { 3 -> 12 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] +2 [label="2: Exit frontend_checks_23a4fcc8f25cc8087aa9202ac0edfbf5 \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start frontend_checks_23a4fcc8f25cc8087aa9202ac0edfbf5\nFormals: \nLocals: \n " color=yellow style=filled] 1 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/property/PropertyCustomAccessor.dot b/infer/tests/codetoanalyze/objc/frontend/property/PropertyCustomAccessor.dot index f42f4e57a..e69de29bb 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/PropertyCustomAccessor.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/PropertyCustomAccessor.dot @@ -1,9 +0,0 @@ -digraph iCFG { -2 [label="2: Exit ASDisplayNode_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start ASDisplayNode_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; -} diff --git a/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.dot b/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.dot index 0762b6852..180f1661b 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.dot @@ -1,20 +1,13 @@ digraph iCFG { -5 [label="5: BinaryOperatorStmt: Assign \n n$0=*&self:class PropertyImplSetter * [line 15]\n *n$0._maximumFileSize:int =0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&self,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:class PropertyImplSetter * [line 15]\n *n$0._maximumFileSize:int =0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&self,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit PropertyImplSetter_setMaximumFileSize: \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit PropertyImplSetter_setMaximumFileSize: \n " color=yellow style=filled] -3 [label="3: Start PropertyImplSetter_setMaximumFileSize:\nFormals: self:class PropertyImplSetter * newMaximumFileSize:int \nLocals: \n DECLARE_LOCALS(&return); [line 14]\n NULLIFY(&newMaximumFileSize,false); [line 14]\n " color=yellow style=filled] +1 [label="1: Start PropertyImplSetter_setMaximumFileSize:\nFormals: self:class PropertyImplSetter * newMaximumFileSize:int \nLocals: \n DECLARE_LOCALS(&return); [line 14]\n NULLIFY(&newMaximumFileSize,false); [line 14]\n " color=yellow style=filled] - 3 -> 5 ; -2 [label="2: Exit PropertyImplSetter_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start PropertyImplSetter_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.dot b/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.dot index f3e24a536..5de4ae770 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.dot @@ -1,20 +1,13 @@ digraph iCFG { -5 [label="5: Return Stmt \n n$0=*&target:class A * [line 19]\n n$1=_fun_A_x(n$0:class A *) [line 19]\n *&return:int =n$1 [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&target,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&target:class A * [line 19]\n n$1=_fun_A_x(n$0:class A *) [line 19]\n *&return:int =n$1 [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&target,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit A_addTarget: \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit A_addTarget: \n " color=yellow style=filled] -3 [label="3: Start A_addTarget:\nFormals: self:class A * target:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] +1 [label="1: Start A_addTarget:\nFormals: self:class A * target:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] - 3 -> 5 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/property/aclass.dot b/infer/tests/codetoanalyze/objc/frontend/property/aclass.dot index 06e044639..e69de29bb 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/aclass.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/aclass.dot @@ -1,9 +0,0 @@ -digraph iCFG { -2 [label="2: Exit AClass_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start AClass_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; -} diff --git a/infer/tests/codetoanalyze/objc/frontend/property_in_protocol/Test.dot b/infer/tests/codetoanalyze/objc/frontend/property_in_protocol/Test.dot index ca8402289..e69de29bb 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property_in_protocol/Test.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property_in_protocol/Test.dot @@ -1,9 +0,0 @@ -digraph iCFG { -2 [label="2: Exit Test_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start Test_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; -} diff --git a/infer/tests/codetoanalyze/objc/frontend/protocol/protocol.dot b/infer/tests/codetoanalyze/objc/frontend/protocol/protocol.dot index 1472991b6..3e8646cac 100644 --- a/infer/tests/codetoanalyze/objc/frontend/protocol/protocol.dot +++ b/infer/tests/codetoanalyze/objc/frontend/protocol/protocol.dot @@ -1,44 +1,30 @@ digraph iCFG { -11 [label="11: Return Stmt \n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +7 [label="7: Return Stmt \n APPLY_ABSTRACTION; [line 26]\n " shape="box"] - 11 -> 6 ; -10 [label="10: Prune (false branch) \n PRUNE((n$1 == 0), false); [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n " shape="invhouse"] + 7 -> 2 ; +6 [label="6: Prune (false branch) \n PRUNE((n$1 == 0), false); [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n " shape="invhouse"] - 10 -> 7 ; -9 [label="9: Prune (true branch) \n PRUNE((n$1 != 0), true); [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n " shape="invhouse"] + 6 -> 3 ; +5 [label="5: Prune (true branch) \n PRUNE((n$1 != 0), true); [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n " shape="invhouse"] - 9 -> 11 ; -8 [label="8: Message Call: conformsToProtocol: \n n$0=*&self:class Bla * [line 25]\n n$1=_fun_Bla_conformsToProtocol:(n$0:class Bla *,\"Foo\":class Protocol *) virtual [line 25]\n NULLIFY(&self,false); [line 25]\n " shape="box"] + 5 -> 7 ; +4 [label="4: Message Call: conformsToProtocol: \n n$0=*&self:class Bla * [line 25]\n n$1=_fun_Bla_conformsToProtocol:(n$0:class Bla *,\"Foo\":class Protocol *) virtual [line 25]\n NULLIFY(&self,false); [line 25]\n " shape="box"] - 8 -> 9 ; - 8 -> 10 ; -7 [label="7: + \n " ] + 4 -> 5 ; + 4 -> 6 ; +3 [label="3: + \n " ] - 7 -> 6 ; -6 [label="6: Exit Bla_fooMethod \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit Bla_fooMethod \n " color=yellow style=filled] -5 [label="5: Start Bla_fooMethod\nFormals: self:class Bla *\nLocals: \n DECLARE_LOCALS(&return); [line 24]\n " color=yellow style=filled] +1 [label="1: Start Bla_fooMethod\nFormals: self:class Bla *\nLocals: \n DECLARE_LOCALS(&return); [line 24]\n " color=yellow style=filled] - 5 -> 8 ; -4 [label="4: Exit Bla_frontendChecks \n " color=yellow style=filled] - - -3 [label="3: Start Bla_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 3 -> 4 ; -2 [label="2: Exit Foo_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start Foo_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 4 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot b/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot index af985f682..ac7392229 100644 --- a/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot +++ b/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot @@ -1,66 +1,59 @@ digraph iCFG { -16 [label="16: DeclStmt \n *&i:int =0 [line 19]\n " shape="box"] +14 [label="14: DeclStmt \n *&i:int =0 [line 19]\n " shape="box"] - 16 -> 15 ; -15 [label="15: DeclStmt \n *&j:int =0 [line 20]\n " shape="box"] + 14 -> 13 ; +13 [label="13: DeclStmt \n *&j:int =0 [line 20]\n " shape="box"] - 15 -> 11 ; -14 [label="14: Return Stmt \n NULLIFY(&i,false); [line 22]\n NULLIFY(&j,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] + 13 -> 9 ; +12 [label="12: Return Stmt \n NULLIFY(&i,false); [line 22]\n NULLIFY(&j,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] - 14 -> 4 ; -13 [label="13: Prune (false branch) \n PRUNE(((n$2 == 0) == 0), false); [line 21]\n REMOVE_TEMPS(n$2); [line 21]\n " shape="invhouse"] + 12 -> 2 ; +11 [label="11: Prune (false branch) \n PRUNE(((n$2 == 0) == 0), false); [line 21]\n REMOVE_TEMPS(n$2); [line 21]\n " shape="invhouse"] - 13 -> 10 ; -12 [label="12: Prune (true branch) \n PRUNE(((n$2 == 0) != 0), true); [line 21]\n REMOVE_TEMPS(n$2); [line 21]\n " shape="invhouse"] + 11 -> 8 ; +10 [label="10: Prune (true branch) \n PRUNE(((n$2 == 0) != 0), true); [line 21]\n REMOVE_TEMPS(n$2); [line 21]\n " shape="invhouse"] - 12 -> 14 ; -11 [label="11: BinaryOperatorStmt: EQ \n n$2=*&i:int [line 21]\n " shape="box"] + 10 -> 12 ; +9 [label="9: BinaryOperatorStmt: EQ \n n$2=*&i:int [line 21]\n " shape="box"] - 11 -> 12 ; - 11 -> 13 ; -10 [label="10: + \n " ] + 9 -> 10 ; + 9 -> 11 ; +8 [label="8: + \n " ] - 10 -> 6 ; -9 [label="9: UnaryOperator \n n$1=*&i:int [line 26]\n *&i:int =(n$1 + 1) [line 26]\n REMOVE_TEMPS(n$1); [line 26]\n NULLIFY(&i,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] + 8 -> 4 ; +7 [label="7: UnaryOperator \n n$1=*&i:int [line 26]\n *&i:int =(n$1 + 1) [line 26]\n REMOVE_TEMPS(n$1); [line 26]\n NULLIFY(&i,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] - 9 -> 5 ; -8 [label="8: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="invhouse"] + 7 -> 3 ; +6 [label="6: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="invhouse"] - 8 -> 5 ; -7 [label="7: Prune (true branch) \n PRUNE(((n$0 == 0) != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"] + 6 -> 3 ; +5 [label="5: Prune (true branch) \n PRUNE(((n$0 == 0) != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n " shape="invhouse"] - 7 -> 9 ; -6 [label="6: BinaryOperatorStmt: EQ \n n$0=*&j:int [line 25]\n NULLIFY(&j,false); [line 25]\n " shape="box"] + 5 -> 7 ; +4 [label="4: BinaryOperatorStmt: EQ \n n$0=*&j:int [line 25]\n NULLIFY(&j,false); [line 25]\n " shape="box"] - 6 -> 7 ; - 6 -> 8 ; -5 [label="5: + \n NULLIFY(&i,false); [line 25]\n " ] + 4 -> 5 ; + 4 -> 6 ; +3 [label="3: + \n NULLIFY(&i,false); [line 25]\n " ] - 5 -> 4 ; -4 [label="4: Exit MyClass_aMethod \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit MyClass_aMethod \n " color=yellow style=filled] -3 [label="3: Start MyClass_aMethod\nFormals: self:class MyClass *\nLocals: j:int i:int \n DECLARE_LOCALS(&return,&j,&i); [line 18]\n NULLIFY(&i,false); [line 18]\n NULLIFY(&j,false); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] +1 [label="1: Start MyClass_aMethod\nFormals: self:class MyClass *\nLocals: j:int i:int \n DECLARE_LOCALS(&return,&j,&i); [line 18]\n NULLIFY(&i,false); [line 18]\n NULLIFY(&j,false); [line 18]\n NULLIFY(&self,false); [line 18]\n " color=yellow style=filled] - 3 -> 16 ; -2 [label="2: Exit MyClass_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start MyClass_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 14 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot b/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot index 829ee478d..4a786f36d 100644 --- a/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot +++ b/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot @@ -1,204 +1,190 @@ digraph iCFG { -55 [label="55: Return Stmt \n *&return:int =0 [line 98]\n APPLY_ABSTRACTION; [line 98]\n " shape="box"] +51 [label="51: Return Stmt \n *&return:int =0 [line 98]\n APPLY_ABSTRACTION; [line 98]\n " shape="box"] - 55 -> 49 ; -54 [label="54: Return Stmt \n *&return:int =1 [line 96]\n APPLY_ABSTRACTION; [line 96]\n " shape="box"] + 51 -> 45 ; +50 [label="50: Return Stmt \n *&return:int =1 [line 96]\n APPLY_ABSTRACTION; [line 96]\n " shape="box"] - 54 -> 49 ; -53 [label="53: Prune (false branch) \n PRUNE(((sizeof(class A ) != n$15) == 0), false); [line 95]\n REMOVE_TEMPS(n$15); [line 95]\n " shape="invhouse"] + 50 -> 45 ; +49 [label="49: Prune (false branch) \n PRUNE(((sizeof(class A ) != n$15) == 0), false); [line 95]\n REMOVE_TEMPS(n$15); [line 95]\n " shape="invhouse"] - 53 -> 55 ; -52 [label="52: Prune (true branch) \n PRUNE(((sizeof(class A ) != n$15) != 0), true); [line 95]\n REMOVE_TEMPS(n$15); [line 95]\n " shape="invhouse"] + 49 -> 51 ; +48 [label="48: Prune (true branch) \n PRUNE(((sizeof(class A ) != n$15) != 0), true); [line 95]\n REMOVE_TEMPS(n$15); [line 95]\n " shape="invhouse"] - 52 -> 54 ; -51 [label="51: BinaryOperatorStmt: NE \n n$15=*&c:struct objc_class * [line 95]\n NULLIFY(&c,false); [line 95]\n " shape="box"] + 48 -> 50 ; +47 [label="47: BinaryOperatorStmt: NE \n n$15=*&c:struct objc_class * [line 95]\n NULLIFY(&c,false); [line 95]\n " shape="box"] - 51 -> 52 ; - 51 -> 53 ; -50 [label="50: + \n NULLIFY(&c,false); [line 95]\n " ] + 47 -> 48 ; + 47 -> 49 ; +46 [label="46: + \n NULLIFY(&c,false); [line 95]\n " ] - 50 -> 49 ; -49 [label="49: Exit A_used_in_binary_op: \n " color=yellow style=filled] + 46 -> 45 ; +45 [label="45: Exit A_used_in_binary_op: \n " color=yellow style=filled] -48 [label="48: Start A_used_in_binary_op:\nFormals: c:struct objc_class *\nLocals: \n DECLARE_LOCALS(&return); [line 94]\n " color=yellow style=filled] +44 [label="44: Start A_used_in_binary_op:\nFormals: c:struct objc_class *\nLocals: \n DECLARE_LOCALS(&return); [line 94]\n " color=yellow style=filled] - 48 -> 51 ; -47 [label="47: Return Stmt \n n$14=_fun_NSStringFromClass(sizeof(class A ):unsigned long ) [line 91]\n *&return:class NSString *=n$14 [line 91]\n REMOVE_TEMPS(n$14); [line 91]\n APPLY_ABSTRACTION; [line 91]\n " shape="box"] + 44 -> 47 ; +43 [label="43: Return Stmt \n n$14=_fun_NSStringFromClass(sizeof(class A ):unsigned long ) [line 91]\n *&return:class NSString *=n$14 [line 91]\n REMOVE_TEMPS(n$14); [line 91]\n APPLY_ABSTRACTION; [line 91]\n " shape="box"] - 47 -> 46 ; -46 [label="46: Exit A_loggerName \n " color=yellow style=filled] + 43 -> 42 ; +42 [label="42: Exit A_loggerName \n " color=yellow style=filled] -45 [label="45: Start A_loggerName\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 90]\n NULLIFY(&self,false); [line 90]\n " color=yellow style=filled] +41 [label="41: Start A_loggerName\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 90]\n NULLIFY(&self,false); [line 90]\n " color=yellow style=filled] - 45 -> 47 ; -44 [label="44: Message Call: init \n n$11=*&self:class A * [line 87]\n n$12=_fun_NSObject_init(n$11:class A *) [line 87]\n REMOVE_TEMPS(n$11,n$12); [line 87]\n NULLIFY(&self,false); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="box"] + 41 -> 43 ; +40 [label="40: Message Call: init \n n$11=*&self:class A * [line 87]\n n$12=_fun_NSObject_init(n$11:class A *) [line 87]\n REMOVE_TEMPS(n$11,n$12); [line 87]\n NULLIFY(&self,false); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="box"] - 44 -> 43 ; -43 [label="43: Exit A_init \n " color=yellow style=filled] + 40 -> 39 ; +39 [label="39: Exit A_init \n " color=yellow style=filled] -42 [label="42: Start A_init\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 86]\n " color=yellow style=filled] +38 [label="38: Start A_init\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 86]\n " color=yellow style=filled] - 42 -> 44 ; -41 [label="41: Message Call: test_class \n _fun_C_test_class() [line 83]\n APPLY_ABSTRACTION; [line 83]\n " shape="box"] + 38 -> 40 ; +37 [label="37: Message Call: test_class \n _fun_C_test_class() [line 83]\n APPLY_ABSTRACTION; [line 83]\n " shape="box"] - 41 -> 40 ; -40 [label="40: Exit A_calling_super \n " color=yellow style=filled] + 37 -> 36 ; +36 [label="36: Exit A_calling_super \n " color=yellow style=filled] -39 [label="39: Start A_calling_super\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 82]\n " color=yellow style=filled] +35 [label="35: Start A_calling_super\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 82]\n " color=yellow style=filled] - 39 -> 41 ; -38 [label="38: Return Stmt \n n$8=*&object:class B * [line 79]\n n$10=_fun_B_isC:(n$8:class B *,sizeof(class A ):unsigned long ) virtual [line 79]\n *&return:_Bool =n$10 [line 79]\n REMOVE_TEMPS(n$8,n$10); [line 79]\n NULLIFY(&object,false); [line 79]\n APPLY_ABSTRACTION; [line 79]\n " shape="box"] - - - 38 -> 37 ; -37 [label="37: Exit A_use_class_in_other_ways: \n " color=yellow style=filled] - - -36 [label="36: Start A_use_class_in_other_ways:\nFormals: self:class A * object:class B *\nLocals: \n DECLARE_LOCALS(&return); [line 78]\n NULLIFY(&self,false); [line 78]\n " color=yellow style=filled] - - - 36 -> 38 ; -35 [label="35: DeclStmt \n n$6=_fun___objc_alloc_no_fail(sizeof(class B ):unsigned long ) [line 74]\n n$7=_fun_NSObject_init(n$6:class B *) virtual [line 74]\n *&b:class B *=n$7 [line 74]\n REMOVE_TEMPS(n$6,n$7); [line 74]\n NULLIFY(&b,false); [line 74]\n " shape="box"] - - - 35 -> 34 ; -34 [label="34: Message Call: b_m \n _fun_B_b_m() [line 75]\n APPLY_ABSTRACTION; [line 75]\n " shape="box"] + 35 -> 37 ; +34 [label="34: Return Stmt \n n$8=*&object:class B * [line 79]\n n$10=_fun_B_isC:(n$8:class B *,sizeof(class A ):unsigned long ) virtual [line 79]\n *&return:_Bool =n$10 [line 79]\n REMOVE_TEMPS(n$8,n$10); [line 79]\n NULLIFY(&object,false); [line 79]\n APPLY_ABSTRACTION; [line 79]\n " shape="box"] 34 -> 33 ; -33 [label="33: Exit A_t \n " color=yellow style=filled] +33 [label="33: Exit A_use_class_in_other_ways: \n " color=yellow style=filled] -32 [label="32: Start A_t\nFormals: self:class A *\nLocals: b:class B * \n DECLARE_LOCALS(&return,&b); [line 73]\n NULLIFY(&b,false); [line 73]\n NULLIFY(&self,false); [line 73]\n " color=yellow style=filled] +32 [label="32: Start A_use_class_in_other_ways:\nFormals: self:class A * object:class B *\nLocals: \n DECLARE_LOCALS(&return); [line 78]\n NULLIFY(&self,false); [line 78]\n " color=yellow style=filled] - 32 -> 35 ; -31 [label="31: Message Call: test_class \n _fun_A_test_class() [line 70]\n APPLY_ABSTRACTION; [line 70]\n " shape="box"] + 32 -> 34 ; +31 [label="31: DeclStmt \n n$6=_fun___objc_alloc_no_fail(sizeof(class B ):unsigned long ) [line 74]\n n$7=_fun_NSObject_init(n$6:class B *) virtual [line 74]\n *&b:class B *=n$7 [line 74]\n REMOVE_TEMPS(n$6,n$7); [line 74]\n NULLIFY(&b,false); [line 74]\n " shape="box"] 31 -> 30 ; -30 [label="30: Exit A_call_class_instance_with_class_name \n " color=yellow style=filled] +30 [label="30: Message Call: b_m \n _fun_B_b_m() [line 75]\n APPLY_ABSTRACTION; [line 75]\n " shape="box"] -29 [label="29: Start A_call_class_instance_with_class_name\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 69]\n NULLIFY(&self,false); [line 69]\n " color=yellow style=filled] + 30 -> 29 ; +29 [label="29: Exit A_t \n " color=yellow style=filled] - 29 -> 31 ; -28 [label="28: Message Call: test_class \n _fun_A_test_class() [line 66]\n APPLY_ABSTRACTION; [line 66]\n " shape="box"] +28 [label="28: Start A_t\nFormals: self:class A *\nLocals: b:class B * \n DECLARE_LOCALS(&return,&b); [line 73]\n NULLIFY(&b,false); [line 73]\n NULLIFY(&self,false); [line 73]\n " color=yellow style=filled] - 28 -> 27 ; -27 [label="27: Exit A_call_class_instance \n " color=yellow style=filled] + 28 -> 31 ; +27 [label="27: Message Call: test_class \n _fun_A_test_class() [line 70]\n APPLY_ABSTRACTION; [line 70]\n " shape="box"] -26 [label="26: Start A_call_class_instance\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 65]\n NULLIFY(&self,false); [line 65]\n " color=yellow style=filled] + 27 -> 26 ; +26 [label="26: Exit A_call_class_instance_with_class_name \n " color=yellow style=filled] - 26 -> 28 ; -25 [label="25: Call alloc \n n$3=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 62]\n REMOVE_TEMPS(n$3); [line 62]\n APPLY_ABSTRACTION; [line 62]\n " shape="box"] +25 [label="25: Start A_call_class_instance_with_class_name\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 69]\n NULLIFY(&self,false); [line 69]\n " color=yellow style=filled] - 25 -> 24 ; -24 [label="24: Exit A_call_alloc_instance \n " color=yellow style=filled] + 25 -> 27 ; +24 [label="24: Message Call: test_class \n _fun_A_test_class() [line 66]\n APPLY_ABSTRACTION; [line 66]\n " shape="box"] -23 [label="23: Start A_call_alloc_instance\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 61]\n NULLIFY(&self,false); [line 61]\n " color=yellow style=filled] + 24 -> 23 ; +23 [label="23: Exit A_call_class_instance \n " color=yellow style=filled] - 23 -> 25 ; -22 [label="22: Call alloc \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 58]\n REMOVE_TEMPS(n$1); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +22 [label="22: Start A_call_class_instance\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 65]\n NULLIFY(&self,false); [line 65]\n " color=yellow style=filled] - 22 -> 21 ; -21 [label="21: Exit A_call_alloc_class \n " color=yellow style=filled] + 22 -> 24 ; +21 [label="21: Call alloc \n n$3=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 62]\n REMOVE_TEMPS(n$3); [line 62]\n APPLY_ABSTRACTION; [line 62]\n " shape="box"] -20 [label="20: Start A_call_alloc_class\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 57]\n " color=yellow style=filled] + 21 -> 20 ; +20 [label="20: Exit A_call_alloc_instance \n " color=yellow style=filled] - 20 -> 22 ; -19 [label="19: Message Call: test_class \n _fun_A_test_class() [line 54]\n APPLY_ABSTRACTION; [line 54]\n " shape="box"] +19 [label="19: Start A_call_alloc_instance\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 61]\n NULLIFY(&self,false); [line 61]\n " color=yellow style=filled] - 19 -> 18 ; -18 [label="18: Exit A_call_test_class \n " color=yellow style=filled] + 19 -> 21 ; +18 [label="18: Call alloc \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 58]\n REMOVE_TEMPS(n$1); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] -17 [label="17: Start A_call_test_class\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled] + 18 -> 17 ; +17 [label="17: Exit A_call_alloc_class \n " color=yellow style=filled] - 17 -> 19 ; -16 [label="16: Exit A_test_class \n " color=yellow style=filled] +16 [label="16: Start A_call_alloc_class\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 57]\n " color=yellow style=filled] -15 [label="15: Start A_test_class\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 50]\n " color=yellow style=filled] + 16 -> 18 ; +15 [label="15: Message Call: test_class \n _fun_A_test_class() [line 54]\n APPLY_ABSTRACTION; [line 54]\n " shape="box"] - 15 -> 16 ; -14 [label="14: Message Call: test \n n$0=*&self:class A * [line 47]\n _fun_A_test(n$0:class A *) virtual [line 47]\n REMOVE_TEMPS(n$0); [line 47]\n NULLIFY(&self,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] + 15 -> 14 ; +14 [label="14: Exit A_call_test_class \n " color=yellow style=filled] - 14 -> 13 ; -13 [label="13: Exit A_call_test \n " color=yellow style=filled] +13 [label="13: Start A_call_test_class\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 53]\n " color=yellow style=filled] -12 [label="12: Start A_call_test\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 46]\n " color=yellow style=filled] + 13 -> 15 ; +12 [label="12: Exit A_test_class \n " color=yellow style=filled] - 12 -> 14 ; -11 [label="11: Exit A_test \n " color=yellow style=filled] +11 [label="11: Start A_test_class\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 50]\n " color=yellow style=filled] -10 [label="10: Start A_test\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 43]\n NULLIFY(&self,false); [line 43]\n " color=yellow style=filled] + 11 -> 12 ; +10 [label="10: Message Call: test \n n$0=*&self:class A * [line 47]\n _fun_A_test(n$0:class A *) virtual [line 47]\n REMOVE_TEMPS(n$0); [line 47]\n NULLIFY(&self,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] - 10 -> 11 ; -9 [label="9: Exit A_frontendChecks \n " color=yellow style=filled] + 10 -> 9 ; +9 [label="9: Exit A_call_test \n " color=yellow style=filled] -8 [label="8: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +8 [label="8: Start A_call_test\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 46]\n " color=yellow style=filled] - 8 -> 9 ; -7 [label="7: Return Stmt \n *&return:_Bool =1 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] + 8 -> 10 ; +7 [label="7: Exit A_test \n " color=yellow style=filled] - 7 -> 6 ; -6 [label="6: Exit B_isC: \n " color=yellow style=filled] +6 [label="6: Start A_test\nFormals: self:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 43]\n NULLIFY(&self,false); [line 43]\n " color=yellow style=filled] -5 [label="5: Start B_isC:\nFormals: self:class B * aClass:struct objc_class *\nLocals: \n DECLARE_LOCALS(&return); [line 23]\n NULLIFY(&aClass,false); [line 23]\n NULLIFY(&self,false); [line 23]\n " color=yellow style=filled] + 6 -> 7 ; +5 [label="5: Return Stmt \n *&return:_Bool =1 [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 5 -> 7 ; -4 [label="4: Exit B_b_m \n " color=yellow style=filled] + 5 -> 4 ; +4 [label="4: Exit B_isC: \n " color=yellow style=filled] -3 [label="3: Start B_b_m\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] +3 [label="3: Start B_isC:\nFormals: self:class B * aClass:struct objc_class *\nLocals: \n DECLARE_LOCALS(&return); [line 23]\n NULLIFY(&aClass,false); [line 23]\n NULLIFY(&self,false); [line 23]\n " color=yellow style=filled] - 3 -> 4 ; -2 [label="2: Exit B_frontendChecks \n " color=yellow style=filled] + 3 -> 5 ; +2 [label="2: Exit B_b_m \n " color=yellow style=filled] -1 [label="1: Start B_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start B_b_m\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] 1 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/self_static/static.dot b/infer/tests/codetoanalyze/objc/frontend/self_static/static.dot index 7ab863029..67a980e58 100644 --- a/infer/tests/codetoanalyze/objc/frontend/self_static/static.dot +++ b/infer/tests/codetoanalyze/objc/frontend/self_static/static.dot @@ -1,64 +1,57 @@ digraph iCFG { -17 [label="17: Message Call: getX \n n$1=*&self:class MyClass * [line 37]\n n$2=_fun_MyClass_getX(n$1:class MyClass *) virtual [line 37]\n REMOVE_TEMPS(n$1,n$2); [line 37]\n NULLIFY(&self,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +15 [label="15: Message Call: getX \n n$1=*&self:class MyClass * [line 37]\n n$2=_fun_MyClass_getX(n$1:class MyClass *) virtual [line 37]\n REMOVE_TEMPS(n$1,n$2); [line 37]\n NULLIFY(&self,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] - 17 -> 16 ; -16 [label="16: Exit MyClass_anInstanceMethod2 \n " color=yellow style=filled] + 15 -> 14 ; +14 [label="14: Exit MyClass_anInstanceMethod2 \n " color=yellow style=filled] -15 [label="15: Start MyClass_anInstanceMethod2\nFormals: self:class MyClass *\nLocals: \n DECLARE_LOCALS(&return); [line 36]\n " color=yellow style=filled] +13 [label="13: Start MyClass_anInstanceMethod2\nFormals: self:class MyClass *\nLocals: \n DECLARE_LOCALS(&return); [line 36]\n " color=yellow style=filled] - 15 -> 17 ; -14 [label="14: Return Stmt \n *&return:int =0 [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] + 13 -> 15 ; +12 [label="12: Return Stmt \n *&return:int =0 [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] - 14 -> 13 ; -13 [label="13: Exit MyClass_getX \n " color=yellow style=filled] + 12 -> 11 ; +11 [label="11: Exit MyClass_getX \n " color=yellow style=filled] -12 [label="12: Start MyClass_getX\nFormals: self:class MyClass *\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n NULLIFY(&self,false); [line 32]\n " color=yellow style=filled] +10 [label="10: Start MyClass_getX\nFormals: self:class MyClass *\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n NULLIFY(&self,false); [line 32]\n " color=yellow style=filled] - 12 -> 14 ; -11 [label="11: Message Call: aClassMethod \n _fun_MyClass_aClassMethod() [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] + 10 -> 12 ; +9 [label="9: Message Call: aClassMethod \n _fun_MyClass_aClassMethod() [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] - 11 -> 10 ; -10 [label="10: Exit MyClass_aClassMethod2 \n " color=yellow style=filled] + 9 -> 8 ; +8 [label="8: Exit MyClass_aClassMethod2 \n " color=yellow style=filled] -9 [label="9: Start MyClass_aClassMethod2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 28]\n " color=yellow style=filled] +7 [label="7: Start MyClass_aClassMethod2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 28]\n " color=yellow style=filled] - 9 -> 11 ; -8 [label="8: Message Call: aClassMethod \n _fun_MyClass_aClassMethod() [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] + 7 -> 9 ; +6 [label="6: Message Call: aClassMethod \n _fun_MyClass_aClassMethod() [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] - 8 -> 7 ; -7 [label="7: Exit MyClass_anInstanceMethod \n " color=yellow style=filled] + 6 -> 5 ; +5 [label="5: Exit MyClass_anInstanceMethod \n " color=yellow style=filled] -6 [label="6: Start MyClass_anInstanceMethod\nFormals: self:class MyClass *\nLocals: \n DECLARE_LOCALS(&return); [line 24]\n NULLIFY(&self,false); [line 24]\n " color=yellow style=filled] +4 [label="4: Start MyClass_anInstanceMethod\nFormals: self:class MyClass *\nLocals: \n DECLARE_LOCALS(&return); [line 24]\n NULLIFY(&self,false); [line 24]\n " color=yellow style=filled] - 6 -> 8 ; -5 [label="5: DeclStmt \n n$0=_fun___objc_alloc_no_fail(sizeof(class MyClass ):unsigned long ) [line 21]\n *&myClass:class MyClass *=n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&myClass,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] + 4 -> 6 ; +3 [label="3: DeclStmt \n n$0=_fun___objc_alloc_no_fail(sizeof(class MyClass ):unsigned long ) [line 21]\n *&myClass:class MyClass *=n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&myClass,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit MyClass_aClassMethod \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit MyClass_aClassMethod \n " color=yellow style=filled] -3 [label="3: Start MyClass_aClassMethod\nFormals: \nLocals: myClass:class MyClass * \n DECLARE_LOCALS(&return,&myClass); [line 20]\n NULLIFY(&myClass,false); [line 20]\n " color=yellow style=filled] +1 [label="1: Start MyClass_aClassMethod\nFormals: \nLocals: myClass:class MyClass * \n DECLARE_LOCALS(&return,&myClass); [line 20]\n NULLIFY(&myClass,false); [line 20]\n " color=yellow style=filled] - 3 -> 5 ; -2 [label="2: Exit MyClass_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start MyClass_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/subclass/MyClass.dot b/infer/tests/codetoanalyze/objc/frontend/subclass/MyClass.dot index 26a443022..5b5e1a2fa 100644 --- a/infer/tests/codetoanalyze/objc/frontend/subclass/MyClass.dot +++ b/infer/tests/codetoanalyze/objc/frontend/subclass/MyClass.dot @@ -1,20 +1,13 @@ digraph iCFG { -5 [label="5: Return Stmt \n *&return:int =1 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n *&return:int =1 [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit MyClass_myNumber \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit MyClass_myNumber \n " color=yellow style=filled] -3 [label="3: Start MyClass_myNumber\nFormals: self:class MyClass *\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n NULLIFY(&self,false); [line 14]\n " color=yellow style=filled] +1 [label="1: Start MyClass_myNumber\nFormals: self:class MyClass *\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n NULLIFY(&self,false); [line 14]\n " color=yellow style=filled] - 3 -> 5 ; -2 [label="2: Exit MyClass_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start MyClass_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/subclass/MySubClass.dot b/infer/tests/codetoanalyze/objc/frontend/subclass/MySubClass.dot index 3297a1959..bf63f93ca 100644 --- a/infer/tests/codetoanalyze/objc/frontend/subclass/MySubClass.dot +++ b/infer/tests/codetoanalyze/objc/frontend/subclass/MySubClass.dot @@ -1,24 +1,17 @@ digraph iCFG { -6 [label="6: DeclStmt \n n$1=*&self:class MySubclass * [line 17]\n n$2=_fun_MyClass_myNumber(n$1:class MySubclass *) [line 17]\n *&subclassNumber:int =(n$2 + 1) [line 17]\n REMOVE_TEMPS(n$1,n$2); [line 17]\n NULLIFY(&self,false); [line 17]\n " shape="box"] +4 [label="4: DeclStmt \n n$1=*&self:class MySubclass * [line 17]\n n$2=_fun_MyClass_myNumber(n$1:class MySubclass *) [line 17]\n *&subclassNumber:int =(n$2 + 1) [line 17]\n REMOVE_TEMPS(n$1,n$2); [line 17]\n NULLIFY(&self,false); [line 17]\n " shape="box"] - 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&subclassNumber:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&subclassNumber,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] + 4 -> 3 ; +3 [label="3: Return Stmt \n n$0=*&subclassNumber:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&subclassNumber,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit MySubclass_myNumber \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit MySubclass_myNumber \n " color=yellow style=filled] -3 [label="3: Start MySubclass_myNumber\nFormals: self:class MySubclass *\nLocals: subclassNumber:int \n DECLARE_LOCALS(&return,&subclassNumber); [line 15]\n NULLIFY(&subclassNumber,false); [line 15]\n " color=yellow style=filled] +1 [label="1: Start MySubclass_myNumber\nFormals: self:class MySubclass *\nLocals: subclassNumber:int \n DECLARE_LOCALS(&return,&subclassNumber); [line 15]\n NULLIFY(&subclassNumber,false); [line 15]\n " color=yellow style=filled] - 3 -> 6 ; -2 [label="2: Exit MySubclass_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start MySubclass_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 4 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/types/attributes.dot b/infer/tests/codetoanalyze/objc/frontend/types/attributes.dot index 0ccf7f41f..9869dc102 100644 --- a/infer/tests/codetoanalyze/objc/frontend/types/attributes.dot +++ b/infer/tests/codetoanalyze/objc/frontend/types/attributes.dot @@ -1,64 +1,57 @@ digraph iCFG { -16 [label="16: DeclStmt \n *&aWeakRef:class A __weak *=0 [line 22]\n " shape="box"] - - - 16 -> 15 ; -15 [label="15: DeclStmt \n _fun___objc_retain(0:class A *) [line 23]\n *&aStrongRef:class A *=0 [line 23]\n NULLIFY(&aStrongRef,false); [line 23]\n " shape="box"] - - - 15 -> 14 ; -14 [label="14: DeclStmt \n *&anUnsafeUnretRef:class A __unsafe_unretained *=0 [line 24]\n " shape="box"] +14 [label="14: DeclStmt \n *&aWeakRef:class A __weak *=0 [line 22]\n " shape="box"] 14 -> 13 ; -13 [label="13: DeclStmt \n _fun___objc_retain(0:class A __autoreleasing *) [line 25]\n _fun___set_autorelease_attribute(0:class A __autoreleasing *) [line 25]\n *&anAutoRelRef:class A __autoreleasing *=0 [line 25]\n " shape="box"] +13 [label="13: DeclStmt \n _fun___objc_retain(0:class A *) [line 23]\n *&aStrongRef:class A *=0 [line 23]\n NULLIFY(&aStrongRef,false); [line 23]\n " shape="box"] 13 -> 12 ; -12 [label="12: DeclStmt \n _fun___objc_retain(0:class A *) [line 26]\n *&aStdRef:class A *=0 [line 26]\n " shape="box"] +12 [label="12: DeclStmt \n *&anUnsafeUnretRef:class A __unsafe_unretained *=0 [line 24]\n " shape="box"] 12 -> 11 ; -11 [label="11: BinaryOperatorStmt: Assign \n n$9=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 29]\n *&aStrongRef:class A *=n$9 [line 29]\n REMOVE_TEMPS(n$9); [line 29]\n " shape="box"] +11 [label="11: DeclStmt \n _fun___objc_retain(0:class A __autoreleasing *) [line 25]\n _fun___set_autorelease_attribute(0:class A __autoreleasing *) [line 25]\n *&anAutoRelRef:class A __autoreleasing *=0 [line 25]\n " shape="box"] 11 -> 10 ; -10 [label="10: BinaryOperatorStmt: Assign \n n$7=*&aStrongRef:class A * [line 31]\n _fun___objc_retain(n$7:class A *) [line 31]\n n$8=*&aStdRef:class A * [line 31]\n *&aStdRef:class A *=n$7 [line 31]\n _fun___objc_release(n$8:class A *) [line 31]\n REMOVE_TEMPS(n$7,n$8); [line 31]\n " shape="box"] +10 [label="10: DeclStmt \n _fun___objc_retain(0:class A *) [line 26]\n *&aStdRef:class A *=0 [line 26]\n " shape="box"] 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n _fun___objc_retain(0:class A *) [line 33]\n n$6=*&aStrongRef:class A * [line 33]\n *&aStrongRef:class A *=0 [line 33]\n _fun___objc_release(n$6:class A *) [line 33]\n REMOVE_TEMPS(n$6); [line 33]\n NULLIFY(&aStrongRef,false); [line 33]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n n$9=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 29]\n *&aStrongRef:class A *=n$9 [line 29]\n REMOVE_TEMPS(n$9); [line 29]\n " shape="box"] 9 -> 8 ; -8 [label="8: BinaryOperatorStmt: Assign \n n$4=*&aStdRef:class A * [line 35]\n _fun___objc_retain(n$4:class A *) [line 35]\n n$5=*&aWeakRef:class A * [line 35]\n *&aWeakRef:class A *=n$4 [line 35]\n _fun___objc_release(n$5:class A *) [line 35]\n REMOVE_TEMPS(n$4,n$5); [line 35]\n NULLIFY(&aWeakRef,false); [line 35]\n " shape="box"] +8 [label="8: BinaryOperatorStmt: Assign \n n$7=*&aStrongRef:class A * [line 31]\n _fun___objc_retain(n$7:class A *) [line 31]\n n$8=*&aStdRef:class A * [line 31]\n *&aStdRef:class A *=n$7 [line 31]\n _fun___objc_release(n$8:class A *) [line 31]\n REMOVE_TEMPS(n$7,n$8); [line 31]\n " shape="box"] 8 -> 7 ; -7 [label="7: BinaryOperatorStmt: Assign \n n$2=*&aStdRef:class A * [line 37]\n _fun___objc_retain(n$2:class A *) [line 37]\n n$3=*&anAutoRelRef:class A * [line 37]\n *&anAutoRelRef:class A *=n$2 [line 37]\n _fun___objc_release(n$3:class A *) [line 37]\n REMOVE_TEMPS(n$2,n$3); [line 37]\n NULLIFY(&anAutoRelRef,false); [line 37]\n " shape="box"] +7 [label="7: BinaryOperatorStmt: Assign \n _fun___objc_retain(0:class A *) [line 33]\n n$6=*&aStrongRef:class A * [line 33]\n *&aStrongRef:class A *=0 [line 33]\n _fun___objc_release(n$6:class A *) [line 33]\n REMOVE_TEMPS(n$6); [line 33]\n NULLIFY(&aStrongRef,false); [line 33]\n " shape="box"] 7 -> 6 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&aStdRef:class A * [line 39]\n _fun___objc_retain(n$0:class A *) [line 39]\n n$1=*&anUnsafeUnretRef:class A * [line 39]\n *&anUnsafeUnretRef:class A *=n$0 [line 39]\n _fun___objc_release(n$1:class A *) [line 39]\n REMOVE_TEMPS(n$0,n$1); [line 39]\n NULLIFY(&aStdRef,false); [line 39]\n NULLIFY(&anUnsafeUnretRef,false); [line 39]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$4=*&aStdRef:class A * [line 35]\n _fun___objc_retain(n$4:class A *) [line 35]\n n$5=*&aWeakRef:class A * [line 35]\n *&aWeakRef:class A *=n$4 [line 35]\n _fun___objc_release(n$5:class A *) [line 35]\n REMOVE_TEMPS(n$4,n$5); [line 35]\n NULLIFY(&aWeakRef,false); [line 35]\n " shape="box"] 6 -> 5 ; -5 [label="5: Return Stmt \n *&return:int =0 [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n n$2=*&aStdRef:class A * [line 37]\n _fun___objc_retain(n$2:class A *) [line 37]\n n$3=*&anAutoRelRef:class A * [line 37]\n *&anAutoRelRef:class A *=n$2 [line 37]\n _fun___objc_release(n$3:class A *) [line 37]\n REMOVE_TEMPS(n$2,n$3); [line 37]\n NULLIFY(&anAutoRelRef,false); [line 37]\n " shape="box"] 5 -> 4 ; -4 [label="4: Exit main \n " color=yellow style=filled] +4 [label="4: BinaryOperatorStmt: Assign \n n$0=*&aStdRef:class A * [line 39]\n _fun___objc_retain(n$0:class A *) [line 39]\n n$1=*&anUnsafeUnretRef:class A * [line 39]\n *&anUnsafeUnretRef:class A *=n$0 [line 39]\n _fun___objc_release(n$1:class A *) [line 39]\n REMOVE_TEMPS(n$0,n$1); [line 39]\n NULLIFY(&aStdRef,false); [line 39]\n NULLIFY(&anUnsafeUnretRef,false); [line 39]\n " shape="box"] -3 [label="3: Start main\nFormals: \nLocals: aStdRef:class A * anAutoRelRef:class A __autoreleasing * anUnsafeUnretRef:class A __unsafe_unretained * aStrongRef:class A * aWeakRef:class A __weak * \n DECLARE_LOCALS(&return,&aStdRef,&anAutoRelRef,&anUnsafeUnretRef,&aStrongRef,&aWeakRef); [line 20]\n NULLIFY(&aStdRef,false); [line 20]\n NULLIFY(&aStrongRef,false); [line 20]\n NULLIFY(&aWeakRef,false); [line 20]\n NULLIFY(&anAutoRelRef,false); [line 20]\n NULLIFY(&anUnsafeUnretRef,false); [line 20]\n " color=yellow style=filled] + 4 -> 3 ; +3 [label="3: Return Stmt \n *&return:int =0 [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] - 3 -> 16 ; -2 [label="2: Exit A_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit main \n " color=yellow style=filled] -1 [label="1: Start A_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start main\nFormals: \nLocals: aStdRef:class A * anAutoRelRef:class A __autoreleasing * anUnsafeUnretRef:class A __unsafe_unretained * aStrongRef:class A * aWeakRef:class A __weak * \n DECLARE_LOCALS(&return,&aStdRef,&anAutoRelRef,&anUnsafeUnretRef,&aStrongRef,&aWeakRef); [line 20]\n NULLIFY(&aStdRef,false); [line 20]\n NULLIFY(&aStrongRef,false); [line 20]\n NULLIFY(&aWeakRef,false); [line 20]\n NULLIFY(&anAutoRelRef,false); [line 20]\n NULLIFY(&anUnsafeUnretRef,false); [line 20]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 14 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/types/testloop.dot b/infer/tests/codetoanalyze/objc/frontend/types/testloop.dot index e1eea4de2..cd5582ab9 100644 --- a/infer/tests/codetoanalyze/objc/frontend/types/testloop.dot +++ b/infer/tests/codetoanalyze/objc/frontend/types/testloop.dot @@ -1,20 +1,13 @@ digraph iCFG { -5 [label="5: Return Stmt \n n$0=*&#GB$__iPhoneVideoAdLayout:struct FBVideoAdLayout [line 45]\n *&return:struct FBVideoAdLayout =n$0 [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&#GB$__iPhoneVideoAdLayout:struct FBVideoAdLayout [line 45]\n *&return:struct FBVideoAdLayout =n$0 [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit FBScrollViewDelegateProxy_layoutToUse \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit FBScrollViewDelegateProxy_layoutToUse \n " color=yellow style=filled] -3 [label="3: Start FBScrollViewDelegateProxy_layoutToUse\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 44]\n " color=yellow style=filled] +1 [label="1: Start FBScrollViewDelegateProxy_layoutToUse\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 44]\n " color=yellow style=filled] - 3 -> 5 ; -2 [label="2: Exit FBScrollViewDelegateProxy_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start FBScrollViewDelegateProxy_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot b/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot index 3c5d168ba..0c8c61964 100644 --- a/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot +++ b/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot @@ -1,101 +1,94 @@ digraph iCFG { -26 [label="26: DeclStmt \n *&x:int =1 [line 35]\n " shape="box"] - - - 26 -> 25 ; -25 [label="25: Call _fun_foo1 \n n$9=*&x:int [line 36]\n _fun_foo1(n$9:int ) [line 36]\n REMOVE_TEMPS(n$9); [line 36]\n " shape="box"] - - - 25 -> 24 ; -24 [label="24: BinaryOperatorStmt: Assign \n n$7=*&x:int [line 38]\n n$8=_fun_bar1(n$7:int ) [line 38]\n *&x:int =n$8 [line 38]\n REMOVE_TEMPS(n$7,n$8); [line 38]\n " shape="box"] +24 [label="24: DeclStmt \n *&x:int =1 [line 35]\n " shape="box"] 24 -> 23 ; -23 [label="23: DeclStmt \n n$6=_fun___objc_alloc_no_fail(sizeof(class AClass ):unsigned long ) [line 40]\n *&o:class AClass *=n$6 [line 40]\n REMOVE_TEMPS(n$6); [line 40]\n " shape="box"] +23 [label="23: Call _fun_foo1 \n n$9=*&x:int [line 36]\n _fun_foo1(n$9:int ) [line 36]\n REMOVE_TEMPS(n$9); [line 36]\n " shape="box"] - 23 -> 19 ; - 23 -> 20 ; -22 [label="22: Message Call: foo: \n n$4=*&o:class AClass * [line 44]\n n$5=*&x:int [line 44]\n _fun_AClass_foo:(n$4:class AClass *,n$5:int ) virtual [line 44]\n REMOVE_TEMPS(n$4,n$5); [line 44]\n " shape="box"] + 23 -> 22 ; +22 [label="22: BinaryOperatorStmt: Assign \n n$7=*&x:int [line 38]\n n$8=_fun_bar1(n$7:int ) [line 38]\n *&x:int =n$8 [line 38]\n REMOVE_TEMPS(n$7,n$8); [line 38]\n " shape="box"] 22 -> 21 ; -21 [label="21: BinaryOperatorStmt: Assign \n n$1=*&o:class AClass * [line 45]\n n$2=*&x:int [line 45]\n n$3=_fun_AClass_bar:(n$1:class AClass *,n$2:int ) virtual [line 45]\n *&x:int =n$3 [line 45]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 45]\n NULLIFY(&o,false); [line 45]\n NULLIFY(&x,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +21 [label="21: DeclStmt \n n$6=_fun___objc_alloc_no_fail(sizeof(class AClass ):unsigned long ) [line 40]\n *&o:class AClass *=n$6 [line 40]\n REMOVE_TEMPS(n$6); [line 40]\n " shape="box"] + 21 -> 17 ; 21 -> 18 ; -20 [label="20: Prune (false branch) \n n$0=*&o:class AClass * [line 42]\n PRUNE((n$0 == 0), false); [line 42]\n REMOVE_TEMPS(n$0); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="invhouse"] +20 [label="20: Message Call: foo: \n n$4=*&o:class AClass * [line 44]\n n$5=*&x:int [line 44]\n _fun_AClass_foo:(n$4:class AClass *,n$5:int ) virtual [line 44]\n REMOVE_TEMPS(n$4,n$5); [line 44]\n " shape="box"] - 20 -> 18 ; -19 [label="19: Prune (true branch) \n n$0=*&o:class AClass * [line 42]\n PRUNE((n$0 != 0), true); [line 42]\n REMOVE_TEMPS(n$0); [line 42]\n " shape="invhouse"] + 20 -> 19 ; +19 [label="19: BinaryOperatorStmt: Assign \n n$1=*&o:class AClass * [line 45]\n n$2=*&x:int [line 45]\n n$3=_fun_AClass_bar:(n$1:class AClass *,n$2:int ) virtual [line 45]\n *&x:int =n$3 [line 45]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 45]\n NULLIFY(&o,false); [line 45]\n NULLIFY(&x,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] - 19 -> 22 ; -18 [label="18: + \n " ] + 19 -> 16 ; +18 [label="18: Prune (false branch) \n n$0=*&o:class AClass * [line 42]\n PRUNE((n$0 == 0), false); [line 42]\n REMOVE_TEMPS(n$0); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="invhouse"] - 18 -> 17 ; -17 [label="17: Return Stmt \n NULLIFY(&o,false); [line 48]\n NULLIFY(&x,false); [line 48]\n *&return:int =0 [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] + 18 -> 16 ; +17 [label="17: Prune (true branch) \n n$0=*&o:class AClass * [line 42]\n PRUNE((n$0 != 0), true); [line 42]\n REMOVE_TEMPS(n$0); [line 42]\n " shape="invhouse"] - 17 -> 16 ; -16 [label="16: Exit main \n " color=yellow style=filled] + 17 -> 20 ; +16 [label="16: + \n " ] -15 [label="15: Start main\nFormals: \nLocals: o:class AClass * x:int \n DECLARE_LOCALS(&return,&o,&x); [line 33]\n NULLIFY(&o,false); [line 33]\n NULLIFY(&x,false); [line 33]\n " color=yellow style=filled] + 16 -> 15 ; +15 [label="15: Return Stmt \n NULLIFY(&o,false); [line 48]\n NULLIFY(&x,false); [line 48]\n *&return:int =0 [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] - 15 -> 26 ; -14 [label="14: Return Stmt \n n$0=*&a:int [line 31]\n *&a:int =(n$0 + 1) [line 31]\n *&return:int =n$0 [line 31]\n REMOVE_TEMPS(n$0); [line 31]\n NULLIFY(&a,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] + 15 -> 14 ; +14 [label="14: Exit main \n " color=yellow style=filled] - 14 -> 13 ; -13 [label="13: Exit bar1 \n " color=yellow style=filled] +13 [label="13: Start main\nFormals: \nLocals: o:class AClass * x:int \n DECLARE_LOCALS(&return,&o,&x); [line 33]\n NULLIFY(&o,false); [line 33]\n NULLIFY(&x,false); [line 33]\n " color=yellow style=filled] -12 [label="12: Start bar1\nFormals: a:int \nLocals: \n DECLARE_LOCALS(&return); [line 31]\n " color=yellow style=filled] + 13 -> 24 ; +12 [label="12: Return Stmt \n n$0=*&a:int [line 31]\n *&a:int =(n$0 + 1) [line 31]\n *&return:int =n$0 [line 31]\n REMOVE_TEMPS(n$0); [line 31]\n NULLIFY(&a,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] - 12 -> 14 ; -11 [label="11: UnaryOperator \n n$0=*&a:int [line 29]\n *&a:int =(n$0 + 1) [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&a,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] + 12 -> 11 ; +11 [label="11: Exit bar1 \n " color=yellow style=filled] - 11 -> 10 ; -10 [label="10: Exit foo1 \n " color=yellow style=filled] +10 [label="10: Start bar1\nFormals: a:int \nLocals: \n DECLARE_LOCALS(&return); [line 31]\n " color=yellow style=filled] -9 [label="9: Start foo1\nFormals: a:int \nLocals: \n DECLARE_LOCALS(&return); [line 29]\n " color=yellow style=filled] + 10 -> 12 ; +9 [label="9: UnaryOperator \n n$0=*&a:int [line 29]\n *&a:int =(n$0 + 1) [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&a,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] - 9 -> 11 ; -8 [label="8: Return Stmt \n n$1=*&a:int [line 24]\n *&a:int =(n$1 + 1) [line 24]\n *&return:int =n$1 [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&a,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] + 9 -> 8 ; +8 [label="8: Exit foo1 \n " color=yellow style=filled] - 8 -> 7 ; -7 [label="7: Exit AClass_bar: \n " color=yellow style=filled] +7 [label="7: Start foo1\nFormals: a:int \nLocals: \n DECLARE_LOCALS(&return); [line 29]\n " color=yellow style=filled] -6 [label="6: Start AClass_bar:\nFormals: self:class AClass * a:int \nLocals: \n DECLARE_LOCALS(&return); [line 23]\n NULLIFY(&self,false); [line 23]\n " color=yellow style=filled] + 7 -> 9 ; +6 [label="6: Return Stmt \n n$1=*&a:int [line 24]\n *&a:int =(n$1 + 1) [line 24]\n *&return:int =n$1 [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&a,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] - 6 -> 8 ; -5 [label="5: UnaryOperator \n n$0=*&a:int [line 21]\n *&a:int =(n$0 + 1) [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&a,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] + 6 -> 5 ; +5 [label="5: Exit AClass_bar: \n " color=yellow style=filled] - 5 -> 4 ; -4 [label="4: Exit AClass_foo: \n " color=yellow style=filled] +4 [label="4: Start AClass_bar:\nFormals: self:class AClass * a:int \nLocals: \n DECLARE_LOCALS(&return); [line 23]\n NULLIFY(&self,false); [line 23]\n " color=yellow style=filled] -3 [label="3: Start AClass_foo:\nFormals: self:class AClass * a:int \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n NULLIFY(&self,false); [line 20]\n " color=yellow style=filled] + 4 -> 6 ; +3 [label="3: UnaryOperator \n n$0=*&a:int [line 21]\n *&a:int =(n$0 + 1) [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&a,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] - 3 -> 5 ; -2 [label="2: Exit AClass_frontendChecks \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit AClass_foo: \n " color=yellow style=filled] -1 [label="1: Start AClass_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] +1 [label="1: Start AClass_foo:\nFormals: self:class AClass * a:int \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n NULLIFY(&self,false); [line 20]\n " color=yellow style=filled] - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass.dot b/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass.dot index e688cc50d..4b4f2490d 100644 --- a/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass.dot +++ b/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass.dot @@ -1,20 +1,13 @@ digraph iCFG { -5 [label="5: Return Stmt \n n$0=*&#GB$aVariable:class NSObject * [line 21]\n *&return:class NSObject *=n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&#GB$aVariable:class NSObject * [line 21]\n *&return:class NSObject *=n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit AClass_sharedInstance \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit AClass_sharedInstance \n " color=yellow style=filled] -3 [label="3: Start AClass_sharedInstance\nFormals: self:class AClass *\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n NULLIFY(&self,false); [line 20]\n " color=yellow style=filled] +1 [label="1: Start AClass_sharedInstance\nFormals: self:class AClass *\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n NULLIFY(&self,false); [line 20]\n " color=yellow style=filled] - 3 -> 5 ; -2 [label="2: Exit AClass_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start AClass_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass_2.dot b/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass_2.dot index e688cc50d..4b4f2490d 100644 --- a/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass_2.dot +++ b/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass_2.dot @@ -1,20 +1,13 @@ digraph iCFG { -5 [label="5: Return Stmt \n n$0=*&#GB$aVariable:class NSObject * [line 21]\n *&return:class NSObject *=n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&#GB$aVariable:class NSObject * [line 21]\n *&return:class NSObject *=n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] - 5 -> 4 ; -4 [label="4: Exit AClass_sharedInstance \n " color=yellow style=filled] + 3 -> 2 ; +2 [label="2: Exit AClass_sharedInstance \n " color=yellow style=filled] -3 [label="3: Start AClass_sharedInstance\nFormals: self:class AClass *\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n NULLIFY(&self,false); [line 20]\n " color=yellow style=filled] +1 [label="1: Start AClass_sharedInstance\nFormals: self:class AClass *\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n NULLIFY(&self,false); [line 20]\n " color=yellow style=filled] - 3 -> 5 ; -2 [label="2: Exit AClass_frontendChecks \n " color=yellow style=filled] - - -1 [label="1: Start AClass_frontendChecks\nFormals: \nLocals: \n " color=yellow style=filled] - - - 1 -> 2 ; + 1 -> 3 ; } diff --git a/infer/tests/endtoend/objc/AssignPointerTest.java b/infer/tests/endtoend/objc/AssignPointerTest.java index 3ab97afd2..55dd942ae 100644 --- a/infer/tests/endtoend/objc/AssignPointerTest.java +++ b/infer/tests/endtoend/objc/AssignPointerTest.java @@ -53,7 +53,7 @@ public class AssignPointerTest { throws InterruptedException, IOException, InferException { InferResults inferResults = InferRunner.runInferObjC(inferCmd); assertThat( - "Results should contain the correct assign pointer warnings", + "Results should contain the correct " + ASSIGN_POINTER_WARNING, inferResults, containsLines(new int[]{ 18, diff --git a/infer/tests/endtoend/objc/RegisteredObserver3.java b/infer/tests/endtoend/objc/RegisteredObserver3.java index 896bc7fcc..f39200ac4 100644 --- a/infer/tests/endtoend/objc/RegisteredObserver3.java +++ b/infer/tests/endtoend/objc/RegisteredObserver3.java @@ -10,7 +10,7 @@ package endtoend.objc; import static org.hamcrest.MatcherAssert.assertThat; -import static utils.matchers.ResultContainsExactly.containsExactly; +import static utils.matchers.ResultContainsLineNumbers.containsLines; import com.google.common.collect.ImmutableList; @@ -56,11 +56,6 @@ public class RegisteredObserver3 { assertThat( "Results should contain " + REGISTERED_OBSERVER, inferResults, - containsExactly( - REGISTERED_OBSERVER, - VCFile3, - methods - ) - ); + containsLines(new int[]{14})); } } diff --git a/infer/tests/endtoend/objc/StrongDelegateTest.java b/infer/tests/endtoend/objc/StrongDelegateTest.java index 1ddc44d7f..ad7947a1c 100644 --- a/infer/tests/endtoend/objc/StrongDelegateTest.java +++ b/infer/tests/endtoend/objc/StrongDelegateTest.java @@ -10,7 +10,7 @@ package endtoend.objc; import static org.hamcrest.MatcherAssert.assertThat; -import static utils.matchers.ResultContainsExactly.containsExactly; +import static utils.matchers.ResultContainsLineNumbers.containsLines; import com.google.common.collect.ImmutableList; @@ -50,16 +50,9 @@ public class StrongDelegateTest { throws InterruptedException, IOException, InferException { InferResults inferResults = InferRunner.runInferObjC(inferCmdFraction); assertThat( - "Results should contain a strong delegate warning", + "Results should contain " + STRONG_DELEGATE_WARNING, inferResults, - containsExactly( - STRONG_DELEGATE_WARNING, - FILE, - new String[]{ - "frontendChecks", - } - ) - ); + containsLines(new int[]{15, 19, 21, 23, 25})); } }