From 6097c05d886430d7b96970d9396f23f4bb864e3a Mon Sep 17 00:00:00 2001 From: Dulma Churchill Date: Thu, 4 May 2017 06:25:03 -0700 Subject: [PATCH] [clang] Add a preanalysis to compute nullability annotations Reviewed By: sblackshear Differential Revision: D4884502 fbshipit-source-id: e0b12a5 --- infer/src/IR/Pvar.re | 4 + infer/src/IR/Pvar.rei | 4 + infer/src/checkers/NullabilityPreanalysis.ml | 112 ++++++++++++++++++ infer/src/checkers/NullabilityPreanalysis.mli | 13 ++ infer/src/clang/cFrontend.ml | 1 + infer/src/clang/cTrans_utils.ml | 3 + .../if_short_circuit.c.dot | 10 +- .../pseudo_destructor_expr.cpp.dot | 2 +- .../constructors/copy_array_field.cpp.dot | 2 +- .../cpp/shared/exceptions/Exceptions.cpp.dot | 6 +- .../tests/codetoanalyze/objc/errors/Makefile | 1 + .../codetoanalyze/objc/errors/issues.exp | 1 + .../objc/errors/npe/ivar_blocks.m | 45 +++++++ .../objc/frontend/boxing/array.m.dot | 6 +- .../objc/frontend/boxing/array_literal.c.dot | 4 +- .../objc/frontend/boxing/dict_literal.c.dot | 4 +- .../exceptions/ExceptionExample.m.dot | 2 +- .../fast_enumeration/Fast_enumeration.m.dot | 6 +- .../objc/frontend/types/attributes.m.dot | 12 +- .../annotations/nullable_annotations.m.dot | 2 +- .../shared/assertions/NSAssert_example.m.dot | 12 +- .../objc/shared/block/BlockVar.m.dot | 8 +- .../objc/shared/block/block_no_args.m.dot | 2 +- .../objc/shared/block/block_release.m.dot | 2 +- .../objc/shared/block/dispatch.m.dot | 6 +- .../objc/shared/block/dispatch_examples.m.dot | 12 +- .../field_superclass/SuperExample.m.dot | 2 +- .../AutoreleaseExample.m.dot | 12 +- .../MemoryLeakExample.m.dot | 6 +- .../TollBridgeExample.m.dot | 10 +- .../npe/Nonnull_attribute_example.m.dot | 2 +- 31 files changed, 249 insertions(+), 65 deletions(-) create mode 100644 infer/src/checkers/NullabilityPreanalysis.ml create mode 100644 infer/src/checkers/NullabilityPreanalysis.mli create mode 100644 infer/tests/codetoanalyze/objc/errors/npe/ivar_blocks.m diff --git a/infer/src/IR/Pvar.re b/infer/src/IR/Pvar.re index b11e9423f..b3bad8fb9 100644 --- a/infer/src/IR/Pvar.re +++ b/infer/src/IR/Pvar.re @@ -248,6 +248,10 @@ let is_static_local pv => let is_this pvar => Mangled.equal (get_name pvar) (Mangled.from_string "this"); +/** Check if a pvar is the special "self" var */ +let is_self pvar => Mangled.equal (get_name pvar) (Mangled.from_string "self"); + + /** Check if the pvar is a return var */ let is_return pv => Mangled.equal (get_name pv) Ident.name_return; diff --git a/infer/src/IR/Pvar.rei b/infer/src/IR/Pvar.rei index 7d0a2d292..a3de879be 100644 --- a/infer/src/IR/Pvar.rei +++ b/infer/src/IR/Pvar.rei @@ -88,6 +88,10 @@ let is_return: t => bool; let is_this: t => bool; +/** Check if a pvar is the special "self" var */ +let is_self: t => bool; + + /** return true if [pvar] is a temporary variable generated by the frontend */ let is_frontend_tmp: t => bool; diff --git a/infer/src/checkers/NullabilityPreanalysis.ml b/infer/src/checkers/NullabilityPreanalysis.ml new file mode 100644 index 000000000..d691cdec1 --- /dev/null +++ b/infer/src/checkers/NullabilityPreanalysis.ml @@ -0,0 +1,112 @@ +(* + * Copyright (c) 2016 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) + +(* Module that define preanalysis to derive nullability annotations *) + +open! IStd + +module F = Format +module L = Logging + +type t = Fieldname.t * Typ.t [@@deriving compare] + +let pp fmt (fieldname, typ) = + F.fprintf fmt "(%a, %a)" Fieldname.pp fieldname (Typ.pp_full Pp.text) typ + +module DomainSet = + PrettyPrintable.MakePPSet(struct + type nonrec t = t + let compare = compare + let pp = pp + end) + +module FieldsAssignedInConstructors = AbstractDomain.FiniteSet(DomainSet) + +module TransferFunctions (CFG : ProcCfg.S) = struct + module CFG = CFG + module Domain = FieldsAssignedInConstructors + type extras = Exp.t Ident.IdentHash.t + + let exp_is_null ids_map exp = + match exp with + | Exp.Var id -> + (try + let exp = Ident.IdentHash.find ids_map id in + Exp.is_null_literal exp + with Not_found -> false) + | _ -> Exp.is_null_literal exp + + let is_self ids_map id = + try + match Ident.IdentHash.find ids_map id with + | Exp.Lvar var -> Pvar.is_self var + | _ -> false + with Not_found -> false + + let exec_instr astate (proc_data: Exp.t Ident.IdentHash.t ProcData.t) _ instr = + match instr with + | Sil.Load (id, exp, _, _) -> + Ident.IdentHash.add proc_data.extras id exp; + astate + | Sil.Store (Exp.Lfield (Exp.Var lhs_id, name, typ), exp_typ, rhs, _) -> + (match exp_typ.Typ.desc with (* block field of a ObjC class *) + | Typ.Tptr ({desc=Tfun _}, _) + when Typ.is_objc_class typ && + is_self proc_data.extras lhs_id && (* lhs is self, rhs is not null *) + not (exp_is_null proc_data.extras rhs) -> + FieldsAssignedInConstructors.add (name, typ) astate + | _ -> astate) + | _ -> astate +end + +(* Tracks when block variables of ObjC classes have been assigned to in constructors *) +module FieldsAssignedInConstructorsChecker = + AbstractInterpreter.Make (ProcCfg.Normal) (TransferFunctions) + +module AnalysisCfg = ProcCfg.Normal + +let add_annot annot annot_name = + ({ Annot.class_name = annot_name; parameters = []; }, true) :: annot + +let add_nonnull_to_selected_field given_field ((fieldname, typ, annot) as field) = + if Fieldname.equal fieldname given_field && + not (Annotations.ia_is_nullable annot) then + let new_annot = add_annot annot Annotations.nonnull in + (fieldname, typ, new_annot) + else field + +let add_nonnull_to_fields fields tenv = + let add_nonnull_to_field (field, typ) = + match Typ.name typ with + | Some typ_name -> + (match Tenv.lookup tenv typ_name with + | Some { fields; statics; supers; methods; annots} -> + let fields_with_annot = + List.map ~f:(add_nonnull_to_selected_field field) fields in + ignore( + Tenv.mk_struct tenv + ~fields: fields_with_annot ~statics ~supers ~methods ~annots typ_name) + | None -> ()) + | None -> () in + DomainSet.iter add_nonnull_to_field fields + +let analysis cfg tenv = + let initial = FieldsAssignedInConstructors.empty in + let f domain pdesc = + let proc_name = Procdesc.get_proc_name pdesc in + if Typ.Procname.is_constructor proc_name then + match FieldsAssignedInConstructorsChecker.compute_post + (ProcData.make pdesc tenv (Ident.IdentHash.create 10)) ~initial with + | Some new_domain -> + FieldsAssignedInConstructors.union new_domain domain + | None -> domain + else domain in + let procs = Cfg.get_defined_procs cfg in + let fields_assigned_in_constructor = List.fold ~f ~init:initial procs in + add_nonnull_to_fields fields_assigned_in_constructor tenv diff --git a/infer/src/checkers/NullabilityPreanalysis.mli b/infer/src/checkers/NullabilityPreanalysis.mli new file mode 100644 index 000000000..9637d86de --- /dev/null +++ b/infer/src/checkers/NullabilityPreanalysis.mli @@ -0,0 +1,13 @@ +(* + * Copyright (c) 2016 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) + +(* Module that define preanalysis to derive nullability annotations *) + +(* Analysis the cfg and updates the tenv with nullability annotations *) +val analysis : Cfg.cfg -> Tenv.t -> unit diff --git a/infer/src/clang/cFrontend.ml b/infer/src/clang/cFrontend.ml index dcd73bbf2..deab5694e 100644 --- a/infer/src/clang/cFrontend.ml +++ b/infer/src/clang/cFrontend.ml @@ -55,6 +55,7 @@ let do_source_file translation_unit_context ast = changes here, it should be changed there as well*) let cfg_file = DB.source_dir_get_internal_file source_dir ".cfg" in let cg_file = DB.source_dir_get_internal_file source_dir ".cg" in + NullabilityPreanalysis.analysis cfg tenv; Cg.store_to_file cg_file call_graph; Cfg.store_cfg_to_file ~source_file cfg_file cfg; CGeneral_utils.sort_fields_tenv tenv; diff --git a/infer/src/clang/cTrans_utils.ml b/infer/src/clang/cTrans_utils.ml index 627587dbb..4b03de352 100644 --- a/infer/src/clang/cTrans_utils.ml +++ b/infer/src/clang/cTrans_utils.ml @@ -438,6 +438,9 @@ let cast_operation trans_state cast_kind exps cast_typ sil_loc is_objc_bridged = (* So we assign the LValue to a temp and we pass it to the parent.*) let instrs, deref_exp = dereference_var_sil (exp, cast_typ) sil_loc in instrs, (deref_exp, cast_typ) + | `NullToPointer -> + if Exp.is_zero exp then ([], (Exp.null, cast_typ)) + else ([], (exp, cast_typ)) | _ -> Logging.err_debug "\nWARNING: Missing translation for Cast Kind %s. The construct has been ignored...\n" diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot index fe01b6164..82788a0a7 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot @@ -109,7 +109,7 @@ digraph iCFG { "test_loop.254a9d372f8f45542e409771135b9322_26" -> "test_loop.254a9d372f8f45542e409771135b9322_2" ; -"test_loop.254a9d372f8f45542e409771135b9322_27" [label="27: BinaryOperatorStmt: Assign \n *&block_size:char*=0 [line 38]\n " shape="box"] +"test_loop.254a9d372f8f45542e409771135b9322_27" [label="27: BinaryOperatorStmt: Assign \n *&block_size:char*=null [line 38]\n " shape="box"] "test_loop.254a9d372f8f45542e409771135b9322_27" -> "test_loop.254a9d372f8f45542e409771135b9322_3" ; @@ -229,7 +229,7 @@ digraph iCFG { "main.fad58de7366495db4650cfefac2fcd61_27" -> "main.fad58de7366495db4650cfefac2fcd61_30" ; -"main.fad58de7366495db4650cfefac2fcd61_28" [label="28: BinaryOperatorStmt: Assign \n *&block_size:char*=0 [line 50]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_28" [label="28: BinaryOperatorStmt: Assign \n *&block_size:char*=null [line 50]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_28" -> "main.fad58de7366495db4650cfefac2fcd61_4" ; @@ -250,7 +250,7 @@ digraph iCFG { "main.fad58de7366495db4650cfefac2fcd61_32" -> "main.fad58de7366495db4650cfefac2fcd61_29" ; -"main.fad58de7366495db4650cfefac2fcd61_33" [label="33: BinaryOperatorStmt: Assign \n *&block_size:char*=0 [line 53]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_33" [label="33: BinaryOperatorStmt: Assign \n *&block_size:char*=null [line 53]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_33" -> "main.fad58de7366495db4650cfefac2fcd61_29" ; @@ -279,11 +279,11 @@ digraph iCFG { "shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_5" -> "shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_6" ; "shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_5" -> "shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_7" ; -"shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_6" [label="6: Prune (true branch) \n PRUNE(((n$0 == 0) != 0), true); [line 14]\n " shape="invhouse"] +"shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_6" [label="6: Prune (true branch) \n PRUNE(((n$0 == null) != 0), true); [line 14]\n " shape="invhouse"] "shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_6" -> "shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_11" ; -"shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_7" [label="7: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 14]\n " shape="invhouse"] +"shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_7" [label="7: Prune (false branch) \n PRUNE(((n$0 == null) == 0), false); [line 14]\n " shape="invhouse"] "shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_7" -> "shortcircuit_or.5845fe75b89f8af7ec1944cd207962af_8" ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot index ded83da29..7cb2b685b 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot @@ -11,7 +11,7 @@ digraph iCFG { "test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_3" -> "test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_2" ; -"test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_4" [label="4: DeclStmt \n *&t:int*=0 [line 24]\n " shape="box"] +"test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_4" [label="4: DeclStmt \n *&t:int*=null [line 24]\n " shape="box"] "test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_4" -> "test#_Z4testv.1b928d988491fdd2fa78fcb048d46e8c_3" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/constructors/copy_array_field.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/copy_array_field.cpp.dot index 4f12504f3..812d8fe77 100644 --- a/infer/tests/codetoanalyze/cpp/shared/constructors/copy_array_field.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/constructors/copy_array_field.cpp.dot @@ -15,7 +15,7 @@ digraph iCFG { "npe#copy_array_field#_ZN16copy_array_field3npeEv.58bc386c3b842b7b8d6ccc067d94bb03_4" -> "npe#copy_array_field#_ZN16copy_array_field3npeEv.58bc386c3b842b7b8d6ccc067d94bb03_3" ; -"npe#copy_array_field#_ZN16copy_array_field3npeEv.58bc386c3b842b7b8d6ccc067d94bb03_5" [label="5: BinaryOperatorStmt: Assign \n *&x1.p:int*=0 [line 17]\n " shape="box"] +"npe#copy_array_field#_ZN16copy_array_field3npeEv.58bc386c3b842b7b8d6ccc067d94bb03_5" [label="5: BinaryOperatorStmt: Assign \n *&x1.p:int*=null [line 17]\n " shape="box"] "npe#copy_array_field#_ZN16copy_array_field3npeEv.58bc386c3b842b7b8d6ccc067d94bb03_5" -> "npe#copy_array_field#_ZN16copy_array_field3npeEv.58bc386c3b842b7b8d6ccc067d94bb03_4" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/exceptions/Exceptions.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/exceptions/Exceptions.cpp.dot index 3ac808f78..6105f7679 100644 --- a/infer/tests/codetoanalyze/cpp/shared/exceptions/Exceptions.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/exceptions/Exceptions.cpp.dot @@ -18,7 +18,7 @@ digraph iCFG { "main.fad58de7366495db4650cfefac2fcd61_2" [label="2: Exit main \n " color=yellow style=filled] -"main.fad58de7366495db4650cfefac2fcd61_3" [label="3: Return Stmt \n n$0=_fun_deref(0:int*) [line 28]\n *&return:int=n$0 [line 28]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_3" [label="3: Return Stmt \n n$0=_fun_deref(null:int*) [line 28]\n *&return:int=n$0 [line 28]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_3" -> "main.fad58de7366495db4650cfefac2fcd61_2" ; @@ -42,11 +42,11 @@ digraph iCFG { "deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_5" -> "deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_6" ; "deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_5" -> "deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_7" ; -"deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_6" [label="6: Prune (true branch) \n PRUNE(((n$2 == 0) != 0), true); [line 11]\n " shape="invhouse"] +"deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_6" [label="6: Prune (true branch) \n PRUNE(((n$2 == null) != 0), true); [line 11]\n " shape="invhouse"] "deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_6" -> "deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_8" ; -"deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_7" [label="7: Prune (false branch) \n PRUNE(((n$2 == 0) == 0), false); [line 11]\n " shape="invhouse"] +"deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_7" [label="7: Prune (false branch) \n PRUNE(((n$2 == null) == 0), false); [line 11]\n " shape="invhouse"] "deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_7" -> "deref#_Z5derefPi.4795e142c647658d2d19ca83904cd96e_4" ; diff --git a/infer/tests/codetoanalyze/objc/errors/Makefile b/infer/tests/codetoanalyze/objc/errors/Makefile index 79ca230ae..14edd1f2d 100644 --- a/infer/tests/codetoanalyze/objc/errors/Makefile +++ b/infer/tests/codetoanalyze/objc/errors/Makefile @@ -32,6 +32,7 @@ SOURCES_DEFAULT = \ npe/NPD_core_foundation.m \ npe/Npe_with_equal_names.m \ npe/block.m \ + npe/ivar_blocks.m \ npe/skip_method_with_nil_object.m \ npe/Nsstring_length_no_npe.m \ npe/No_null_from_array.m \ diff --git a/infer/tests/codetoanalyze/objc/errors/issues.exp b/infer/tests/codetoanalyze/objc/errors/issues.exp index 214016010..303bdae7f 100644 --- a/infer/tests/codetoanalyze/objc/errors/issues.exp +++ b/infer/tests/codetoanalyze/objc/errors/issues.exp @@ -108,6 +108,7 @@ codetoanalyze/objc/errors/npe/block.m, BlockA_foo, 5, NULL_DEREFERENCE, [start o codetoanalyze/objc/errors/npe/block.m, BlockA_foo3:, 3, NULL_DEREFERENCE, [start of procedure foo3:] codetoanalyze/objc/errors/npe/block.m, BlockA_foo4:, 6, NULL_DEREFERENCE, [start of procedure foo4:] codetoanalyze/objc/errors/npe/block.m, BlockA_foo7, 2, IVAR_NOT_NULL_CHECKED, [start of procedure foo7] +codetoanalyze/objc/errors/npe/ivar_blocks.m, MyClass_ivar_npe, 1, IVAR_NOT_NULL_CHECKED, [start of procedure ivar_npe] codetoanalyze/objc/errors/npe/skip_method_with_nil_object.m, SkipMethodNilA_testBug:, 6, PARAMETER_NOT_NULL_CHECKED, [start of procedure testBug:,Message get_a with receiver nil returns nil.,Message skip_method with receiver nil returns nil.,Condition is false] codetoanalyze/objc/errors/property/main.c, property_main, 3, MEMORY_LEAK, [start of procedure property_main(),Skipped call: function or method not found] codetoanalyze/objc/errors/taint/sources.m, testNSHTTPCookie1, 5, TAINTED_VALUE_REACHING_SENSITIVE_FUNCTION, [start of procedure testNSHTTPCookie1()] diff --git a/infer/tests/codetoanalyze/objc/errors/npe/ivar_blocks.m b/infer/tests/codetoanalyze/objc/errors/npe/ivar_blocks.m new file mode 100644 index 000000000..77a3b3c5a --- /dev/null +++ b/infer/tests/codetoanalyze/objc/errors/npe/ivar_blocks.m @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2017 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ +#import + +@interface MyClass : NSObject + +- (instancetype)initWithBlock:(void (^)(NSString*))block; + +@end + +@implementation MyClass { + void (^_success_block)(NSString*); + void (^_failure_block)(NSString*); +} + +- (instancetype)initWithBlock:(void (^)(NSString*))block { + if (self = [super init]) { + _success_block = block; + _failure_block = nil; + return self; + } +} + +- (void)no_constructor_assignment:(void (^)(NSString*))block { + _failure_block = block; +} + +- (int)no_ivar_npe { + self->_success_block( + @"Yay"); // No IVAR_NOT_NULL_CHECKED reported because of the preanalysis. + return 0; +} + +- (int)ivar_npe { + self->_failure_block(@"Failure!"); // IVAR_NOT_NULL_CHECKED reported. + return 0; +} + +@end diff --git a/infer/tests/codetoanalyze/objc/frontend/boxing/array.m.dot b/infer/tests/codetoanalyze/objc/frontend/boxing/array.m.dot index 5f9c4bfd0..1e242adf6 100644 --- a/infer/tests/codetoanalyze/objc/frontend/boxing/array.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/boxing/array.m.dot @@ -20,11 +20,11 @@ digraph iCFG { "main.fad58de7366495db4650cfefac2fcd61_5" -> "main.fad58de7366495db4650cfefac2fcd61_6" ; "main.fad58de7366495db4650cfefac2fcd61_5" -> "main.fad58de7366495db4650cfefac2fcd61_7" ; -"main.fad58de7366495db4650cfefac2fcd61_6" [label="6: Prune (true branch) \n PRUNE(((n$0 != 0) != 0), true); [line 26]\n " shape="invhouse"] +"main.fad58de7366495db4650cfefac2fcd61_6" [label="6: Prune (true branch) \n PRUNE(((n$0 != null) != 0), true); [line 26]\n " shape="invhouse"] "main.fad58de7366495db4650cfefac2fcd61_6" -> "main.fad58de7366495db4650cfefac2fcd61_9" ; -"main.fad58de7366495db4650cfefac2fcd61_7" [label="7: Prune (false branch) \n PRUNE(((n$0 != 0) == 0), false); [line 26]\n " shape="invhouse"] +"main.fad58de7366495db4650cfefac2fcd61_7" [label="7: Prune (false branch) \n PRUNE(((n$0 != null) == 0), false); [line 26]\n " shape="invhouse"] "main.fad58de7366495db4650cfefac2fcd61_7" -> "main.fad58de7366495db4650cfefac2fcd61_3" ; @@ -44,7 +44,7 @@ digraph iCFG { "main.fad58de7366495db4650cfefac2fcd61_11" -> "main.fad58de7366495db4650cfefac2fcd61_10" ; -"main.fad58de7366495db4650cfefac2fcd61_12" [label="12: DeclStmt \n n$9=_fun_NSString_stringWithUTF8String:(\"Mercedes-Benz\":char* const ) [line 17]\n n$10=_fun_NSString_stringWithUTF8String:(\"BMW\":char* const ) [line 18]\n n$11=_fun_NSString_stringWithUTF8String:(\"Porsche\":char* const ) [line 19]\n n$12=_fun_NSString_stringWithUTF8String:(\"Opel\":char* const ) [line 20]\n n$13=_fun_NSString_stringWithUTF8String:(\"Volkswagen\":char* const ) [line 21]\n n$14=_fun_NSString_stringWithUTF8String:(\"Audi\":char* const ) [line 22]\n n$15=_fun_NSArray_arrayWithObjects:count:(n$9:objc_object*,n$10:objc_object*,n$11:objc_object*,n$12:objc_object*,n$13:objc_object*,n$14:objc_object*,0:objc_object*) [line 16]\n *&germanCars:NSArray*=n$15 [line 16]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_12" [label="12: DeclStmt \n n$9=_fun_NSString_stringWithUTF8String:(\"Mercedes-Benz\":char* const ) [line 17]\n n$10=_fun_NSString_stringWithUTF8String:(\"BMW\":char* const ) [line 18]\n n$11=_fun_NSString_stringWithUTF8String:(\"Porsche\":char* const ) [line 19]\n n$12=_fun_NSString_stringWithUTF8String:(\"Opel\":char* const ) [line 20]\n n$13=_fun_NSString_stringWithUTF8String:(\"Volkswagen\":char* const ) [line 21]\n n$14=_fun_NSString_stringWithUTF8String:(\"Audi\":char* const ) [line 22]\n n$15=_fun_NSArray_arrayWithObjects:count:(n$9:objc_object*,n$10:objc_object*,n$11:objc_object*,n$12:objc_object*,n$13:objc_object*,n$14:objc_object*,null:objc_object*) [line 16]\n *&germanCars:NSArray*=n$15 [line 16]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_12" -> "main.fad58de7366495db4650cfefac2fcd61_11" ; diff --git a/infer/tests/codetoanalyze/objc/frontend/boxing/array_literal.c.dot b/infer/tests/codetoanalyze/objc/frontend/boxing/array_literal.c.dot index 6699fa41a..c23ee7270 100644 --- a/infer/tests/codetoanalyze/objc/frontend/boxing/array_literal.c.dot +++ b/infer/tests/codetoanalyze/objc/frontend/boxing/array_literal.c.dot @@ -7,11 +7,11 @@ digraph iCFG { "get_array.bca6b16c85e5b8ba530f380271b2ec79_2" [label="2: Exit get_array \n " color=yellow style=filled] -"get_array.bca6b16c85e5b8ba530f380271b2ec79_3" [label="3: Return Stmt \n n$0=_fun_NSString_stringWithUTF8String:(\"cat\":char* const ) [line 14]\n n$1=_fun_NSString_stringWithUTF8String:(\"dog\":char* const ) [line 14]\n n$2=_fun_NSArray_arrayWithObjects:count:(n$0:objc_object*,n$1:objc_object*,0:objc_object*) [line 14]\n *&return:NSArray*=n$2 [line 14]\n " shape="box"] +"get_array.bca6b16c85e5b8ba530f380271b2ec79_3" [label="3: Return Stmt \n n$0=_fun_NSString_stringWithUTF8String:(\"cat\":char* const ) [line 14]\n n$1=_fun_NSString_stringWithUTF8String:(\"dog\":char* const ) [line 14]\n n$2=_fun_NSArray_arrayWithObjects:count:(n$0:objc_object*,n$1:objc_object*,null:objc_object*) [line 14]\n *&return:NSArray*=n$2 [line 14]\n " shape="box"] "get_array.bca6b16c85e5b8ba530f380271b2ec79_3" -> "get_array.bca6b16c85e5b8ba530f380271b2ec79_2" ; -"get_array.bca6b16c85e5b8ba530f380271b2ec79_4" [label="4: DeclStmt \n n$3=_fun_NSString_stringWithUTF8String:(\"cat\":char* const ) [line 13]\n n$4=_fun_NSString_stringWithUTF8String:(\"dog\":char* const ) [line 13]\n n$5=_fun_NSArray_arrayWithObjects:(n$3:objc_object*,n$4:NSString*,0:void*) [line 13]\n *&animals:NSArray*=n$5 [line 13]\n " shape="box"] +"get_array.bca6b16c85e5b8ba530f380271b2ec79_4" [label="4: DeclStmt \n n$3=_fun_NSString_stringWithUTF8String:(\"cat\":char* const ) [line 13]\n n$4=_fun_NSString_stringWithUTF8String:(\"dog\":char* const ) [line 13]\n n$5=_fun_NSArray_arrayWithObjects:(n$3:objc_object*,n$4:NSString*,null:void*) [line 13]\n *&animals:NSArray*=n$5 [line 13]\n " shape="box"] "get_array.bca6b16c85e5b8ba530f380271b2ec79_4" -> "get_array.bca6b16c85e5b8ba530f380271b2ec79_3" ; diff --git a/infer/tests/codetoanalyze/objc/frontend/boxing/dict_literal.c.dot b/infer/tests/codetoanalyze/objc/frontend/boxing/dict_literal.c.dot index 1bde58747..4736ec5ae 100644 --- a/infer/tests/codetoanalyze/objc/frontend/boxing/dict_literal.c.dot +++ b/infer/tests/codetoanalyze/objc/frontend/boxing/dict_literal.c.dot @@ -7,7 +7,7 @@ digraph iCFG { "get_array1.5988b7ad8acf5c81cef9a72d072073c1_2" [label="2: Exit get_array1 \n " color=yellow style=filled] -"get_array1.5988b7ad8acf5c81cef9a72d072073c1_3" [label="3: Return Stmt \n n$0=_fun_NSString_stringWithUTF8String:(\"Matt\":char* const ) [line 14]\n n$1=_fun_NSString_stringWithUTF8String:(\"firstName\":char* const ) [line 15]\n n$2=_fun_NSString_stringWithUTF8String:(\"Galloway\":char* const ) [line 16]\n n$3=_fun_NSString_stringWithUTF8String:(\"lastName\":char* const ) [line 17]\n n$4=_fun_NSNumber_numberWithInt:(28:int) [line 18]\n n$5=_fun_NSString_stringWithUTF8String:(\"age\":char* const ) [line 19]\n n$6=_fun_NSDictionary_dictionaryWithObjectsAndKeys:(n$0:objc_object*,n$1:NSString*,n$2:NSString*,n$3:NSString*,n$4:NSNumber*,n$5:NSString*,0:void*) [line 14]\n *&return:NSDictionary*=n$6 [line 14]\n " shape="box"] +"get_array1.5988b7ad8acf5c81cef9a72d072073c1_3" [label="3: Return Stmt \n n$0=_fun_NSString_stringWithUTF8String:(\"Matt\":char* const ) [line 14]\n n$1=_fun_NSString_stringWithUTF8String:(\"firstName\":char* const ) [line 15]\n n$2=_fun_NSString_stringWithUTF8String:(\"Galloway\":char* const ) [line 16]\n n$3=_fun_NSString_stringWithUTF8String:(\"lastName\":char* const ) [line 17]\n n$4=_fun_NSNumber_numberWithInt:(28:int) [line 18]\n n$5=_fun_NSString_stringWithUTF8String:(\"age\":char* const ) [line 19]\n n$6=_fun_NSDictionary_dictionaryWithObjectsAndKeys:(n$0:objc_object*,n$1:NSString*,n$2:NSString*,n$3:NSString*,n$4:NSNumber*,n$5:NSString*,null:void*) [line 14]\n *&return:NSDictionary*=n$6 [line 14]\n " shape="box"] "get_array1.5988b7ad8acf5c81cef9a72d072073c1_3" -> "get_array1.5988b7ad8acf5c81cef9a72d072073c1_2" ; @@ -18,7 +18,7 @@ digraph iCFG { "get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_2" [label="2: Exit get_array2 \n " color=yellow style=filled] -"get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_3" [label="3: Return Stmt \n n$0=_fun_NSString_stringWithUTF8String:(\"Matt\":char* const ) [line 25]\n n$1=_fun_NSString_stringWithUTF8String:(\"firstName\":char* const ) [line 25]\n n$2=_fun_NSString_stringWithUTF8String:(\"Galloway\":char* const ) [line 25]\n n$3=_fun_NSString_stringWithUTF8String:(\"lastName\":char* const ) [line 25]\n n$4=_fun_NSNumber_numberWithInt:(28:int) [line 25]\n n$5=_fun_NSString_stringWithUTF8String:(\"age\":char* const ) [line 25]\n n$6=_fun_NSDictionary_dictionaryWithObjects:forKeys:count:(n$0:objc_object*,n$1:objc_object*,n$2:objc_object*,n$3:objc_object*,n$4:objc_object*,n$5:objc_object*,0:objc_object*) [line 25]\n *&return:NSDictionary*=n$6 [line 25]\n " shape="box"] +"get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_3" [label="3: Return Stmt \n n$0=_fun_NSString_stringWithUTF8String:(\"Matt\":char* const ) [line 25]\n n$1=_fun_NSString_stringWithUTF8String:(\"firstName\":char* const ) [line 25]\n n$2=_fun_NSString_stringWithUTF8String:(\"Galloway\":char* const ) [line 25]\n n$3=_fun_NSString_stringWithUTF8String:(\"lastName\":char* const ) [line 25]\n n$4=_fun_NSNumber_numberWithInt:(28:int) [line 25]\n n$5=_fun_NSString_stringWithUTF8String:(\"age\":char* const ) [line 25]\n n$6=_fun_NSDictionary_dictionaryWithObjects:forKeys:count:(n$0:objc_object*,n$1:objc_object*,n$2:objc_object*,n$3:objc_object*,n$4:objc_object*,n$5:objc_object*,null:objc_object*) [line 25]\n *&return:NSDictionary*=n$6 [line 25]\n " shape="box"] "get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_3" -> "get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_2" ; diff --git a/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.m.dot b/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.m.dot index 1f210cc6a..96465aa13 100644 --- a/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.m.dot @@ -38,7 +38,7 @@ digraph iCFG { "test1#ExceptionExample#instance.400b3bc567ff814f7f6788584460738f_6" -> "test1#ExceptionExample#instance.400b3bc567ff814f7f6788584460738f_3" ; -"test1#ExceptionExample#instance.400b3bc567ff814f7f6788584460738f_7" [label="7: ObjCCPPThrow \n n$4=_fun_NSString_stringWithUTF8String:(\"Something is not right exception\":char* const ) [line 31]\n n$5=_fun_NSString_stringWithUTF8String:(\"Can't perform this operation because of this or that\":char* const ) [line 33]\n n$6=_fun_NSException_exceptionWithName:reason:userInfo:(n$4:NSString*,n$5:NSString*,0:NSDictionary*) [line 30]\n _fun___infer_objc_cpp_throw(n$6:NSException*) [line 30]\n " shape="box"] +"test1#ExceptionExample#instance.400b3bc567ff814f7f6788584460738f_7" [label="7: ObjCCPPThrow \n n$4=_fun_NSString_stringWithUTF8String:(\"Something is not right exception\":char* const ) [line 31]\n n$5=_fun_NSString_stringWithUTF8String:(\"Can't perform this operation because of this or that\":char* const ) [line 33]\n n$6=_fun_NSException_exceptionWithName:reason:userInfo:(n$4:NSString*,n$5:NSString*,null:NSDictionary*) [line 30]\n _fun___infer_objc_cpp_throw(n$6:NSException*) [line 30]\n " shape="box"] "test1#ExceptionExample#instance.400b3bc567ff814f7f6788584460738f_7" -> "test1#ExceptionExample#instance.400b3bc567ff814f7f6788584460738f_3" ; diff --git a/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.m.dot b/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.m.dot index 9c586e9a8..a4e0f07c8 100644 --- a/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.m.dot @@ -20,11 +20,11 @@ digraph iCFG { "fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_5" -> "fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_6" ; "fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_5" -> "fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_7" ; -"fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_6" [label="6: Prune (true branch) \n PRUNE(((n$1 != 0) != 0), true); [line 19]\n " shape="invhouse"] +"fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_6" [label="6: Prune (true branch) \n PRUNE(((n$1 != null) != 0), true); [line 19]\n " shape="invhouse"] "fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_6" -> "fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_9" ; -"fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_7" [label="7: Prune (false branch) \n PRUNE(((n$1 != 0) == 0), false); [line 19]\n " shape="invhouse"] +"fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_7" [label="7: Prune (false branch) \n PRUNE(((n$1 != null) == 0), false); [line 19]\n " shape="invhouse"] "fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_7" -> "fast_loop:#A#instance.9cd800cb29c7a698fe4cc371a7448f6e_3" ; @@ -76,7 +76,7 @@ digraph iCFG { "while_loop:#A#instance.30e9692b3abdc47bcb262e353f292a28_8" -> "while_loop:#A#instance.30e9692b3abdc47bcb262e353f292a28_4" ; -"while_loop:#A#instance.30e9692b3abdc47bcb262e353f292a28_9" [label="9: DeclStmt \n *&item:NSArray*=0 [line 27]\n " shape="box"] +"while_loop:#A#instance.30e9692b3abdc47bcb262e353f292a28_9" [label="9: DeclStmt \n *&item:NSArray*=null [line 27]\n " shape="box"] "while_loop:#A#instance.30e9692b3abdc47bcb262e353f292a28_9" -> "while_loop:#A#instance.30e9692b3abdc47bcb262e353f292a28_4" ; diff --git a/infer/tests/codetoanalyze/objc/frontend/types/attributes.m.dot b/infer/tests/codetoanalyze/objc/frontend/types/attributes.m.dot index 6cf38a1e1..78eda637c 100644 --- a/infer/tests/codetoanalyze/objc/frontend/types/attributes.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/types/attributes.m.dot @@ -23,7 +23,7 @@ digraph iCFG { "main.fad58de7366495db4650cfefac2fcd61_6" -> "main.fad58de7366495db4650cfefac2fcd61_5" ; -"main.fad58de7366495db4650cfefac2fcd61_7" [label="7: BinaryOperatorStmt: Assign \n _fun___objc_retain(0:A*) [line 33]\n n$6=*&aStrongRef:A* [line 33]\n *&aStrongRef:A*=0 [line 33]\n _fun___objc_release(n$6:A*) [line 33]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_7" [label="7: BinaryOperatorStmt: Assign \n _fun___objc_retain(null:A*) [line 33]\n n$6=*&aStrongRef:A* [line 33]\n *&aStrongRef:A*=null [line 33]\n _fun___objc_release(n$6:A*) [line 33]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_7" -> "main.fad58de7366495db4650cfefac2fcd61_6" ; @@ -35,23 +35,23 @@ digraph iCFG { "main.fad58de7366495db4650cfefac2fcd61_9" -> "main.fad58de7366495db4650cfefac2fcd61_8" ; -"main.fad58de7366495db4650cfefac2fcd61_10" [label="10: DeclStmt \n _fun___objc_retain(0:A*) [line 26]\n *&aStdRef:A*=0 [line 26]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_10" [label="10: DeclStmt \n _fun___objc_retain(null:A*) [line 26]\n *&aStdRef:A*=null [line 26]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_10" -> "main.fad58de7366495db4650cfefac2fcd61_9" ; -"main.fad58de7366495db4650cfefac2fcd61_11" [label="11: DeclStmt \n _fun___objc_retain(0:A__autoreleasing *) [line 25]\n _fun___set_autorelease_attribute(0:A__autoreleasing *) [line 25]\n *&anAutoRelRef:A__autoreleasing *=0 [line 25]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_11" [label="11: DeclStmt \n _fun___objc_retain(null:A__autoreleasing *) [line 25]\n _fun___set_autorelease_attribute(null:A__autoreleasing *) [line 25]\n *&anAutoRelRef:A__autoreleasing *=null [line 25]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_11" -> "main.fad58de7366495db4650cfefac2fcd61_10" ; -"main.fad58de7366495db4650cfefac2fcd61_12" [label="12: DeclStmt \n *&anUnsafeUnretRef:A__unsafe_unretained *=0 [line 24]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_12" [label="12: DeclStmt \n *&anUnsafeUnretRef:A__unsafe_unretained *=null [line 24]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_12" -> "main.fad58de7366495db4650cfefac2fcd61_11" ; -"main.fad58de7366495db4650cfefac2fcd61_13" [label="13: DeclStmt \n _fun___objc_retain(0:A*) [line 23]\n *&aStrongRef:A*=0 [line 23]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_13" [label="13: DeclStmt \n _fun___objc_retain(null:A*) [line 23]\n *&aStrongRef:A*=null [line 23]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_13" -> "main.fad58de7366495db4650cfefac2fcd61_12" ; -"main.fad58de7366495db4650cfefac2fcd61_14" [label="14: DeclStmt \n *&aWeakRef:A__weak *=0 [line 22]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_14" [label="14: DeclStmt \n *&aWeakRef:A__weak *=null [line 22]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_14" -> "main.fad58de7366495db4650cfefac2fcd61_13" ; diff --git a/infer/tests/codetoanalyze/objc/shared/annotations/nullable_annotations.m.dot b/infer/tests/codetoanalyze/objc/shared/annotations/nullable_annotations.m.dot index 2e640e159..b88bda417 100644 --- a/infer/tests/codetoanalyze/objc/shared/annotations/nullable_annotations.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/annotations/nullable_annotations.m.dot @@ -7,7 +7,7 @@ digraph iCFG { "npe_property_nullable.ba4461b16b55481ab8de5124734d2bf3_2" [label="2: Exit npe_property_nullable \n " color=yellow style=filled] -"npe_property_nullable.ba4461b16b55481ab8de5124734d2bf3_3" [label="3: Return Stmt \n n$0=*&child:Person* [line 58]\n n$1=_fun_NSString_stringWithUTF8String:(\"key\":char* const ) [line 58]\n n$2=_fun_NSDictionary_dictionaryWithObjects:forKeys:count:(n$0:objc_object*,n$1:objc_object*,0:objc_object*) [line 58]\n *&return:NSDictionary*=n$2 [line 58]\n " shape="box"] +"npe_property_nullable.ba4461b16b55481ab8de5124734d2bf3_3" [label="3: Return Stmt \n n$0=*&child:Person* [line 58]\n n$1=_fun_NSString_stringWithUTF8String:(\"key\":char* const ) [line 58]\n n$2=_fun_NSDictionary_dictionaryWithObjects:forKeys:count:(n$0:objc_object*,n$1:objc_object*,null:objc_object*) [line 58]\n *&return:NSDictionary*=n$2 [line 58]\n " shape="box"] "npe_property_nullable.ba4461b16b55481ab8de5124734d2bf3_3" -> "npe_property_nullable.ba4461b16b55481ab8de5124734d2bf3_2" ; diff --git a/infer/tests/codetoanalyze/objc/shared/assertions/NSAssert_example.m.dot b/infer/tests/codetoanalyze/objc/shared/assertions/NSAssert_example.m.dot index 32d84a6c6..65cb8685b 100644 --- a/infer/tests/codetoanalyze/objc/shared/assertions/NSAssert_example.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/assertions/NSAssert_example.m.dot @@ -38,11 +38,11 @@ digraph iCFG { "initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_9" -> "initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_10" ; "initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_9" -> "initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_11" ; -"initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_10" [label="10: Prune (true branch) \n PRUNE(((n$20 != 0) != 0), true); [line 24]\n " shape="invhouse"] +"initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_10" [label="10: Prune (true branch) \n PRUNE(((n$20 != null) != 0), true); [line 24]\n " shape="invhouse"] "initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_10" -> "initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_12" ; -"initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_11" [label="11: Prune (false branch) \n PRUNE(((n$20 != 0) == 0), false); [line 24]\n " shape="invhouse"] +"initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_11" [label="11: Prune (false branch) \n PRUNE(((n$20 != null) == 0), false); [line 24]\n " shape="invhouse"] "initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_11" -> "initWithRequest:#NSAssert#instance.aa6bdc90db5d0e020b6778cefe9a011f_13" ; @@ -133,11 +133,11 @@ digraph iCFG { "addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_9" -> "addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_10" ; "addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_9" -> "addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_11" ; -"addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_10" [label="10: Prune (true branch) \n PRUNE(((n$3 != 0) != 0), true); [line 19]\n " shape="invhouse"] +"addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_10" [label="10: Prune (true branch) \n PRUNE(((n$3 != null) != 0), true); [line 19]\n " shape="invhouse"] "addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_10" -> "addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_12" ; -"addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_11" [label="11: Prune (false branch) \n PRUNE(((n$3 != 0) == 0), false); [line 19]\n " shape="invhouse"] +"addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_11" [label="11: Prune (false branch) \n PRUNE(((n$3 != null) == 0), false); [line 19]\n " shape="invhouse"] "addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_11" -> "addTarget:#NSAssert#instance.69cefe4d9cf64204d99f63924a056673_13" ; @@ -228,11 +228,11 @@ digraph iCFG { "test1.5a105e8b9d40e1329780d62ea2265d8a_9" -> "test1.5a105e8b9d40e1329780d62ea2265d8a_10" ; "test1.5a105e8b9d40e1329780d62ea2265d8a_9" -> "test1.5a105e8b9d40e1329780d62ea2265d8a_11" ; -"test1.5a105e8b9d40e1329780d62ea2265d8a_10" [label="10: Prune (true branch) \n PRUNE(((n$3 != 0) != 0), true); [line 31]\n " shape="invhouse"] +"test1.5a105e8b9d40e1329780d62ea2265d8a_10" [label="10: Prune (true branch) \n PRUNE(((n$3 != null) != 0), true); [line 31]\n " shape="invhouse"] "test1.5a105e8b9d40e1329780d62ea2265d8a_10" -> "test1.5a105e8b9d40e1329780d62ea2265d8a_12" ; -"test1.5a105e8b9d40e1329780d62ea2265d8a_11" [label="11: Prune (false branch) \n PRUNE(((n$3 != 0) == 0), false); [line 31]\n " shape="invhouse"] +"test1.5a105e8b9d40e1329780d62ea2265d8a_11" [label="11: Prune (false branch) \n PRUNE(((n$3 != null) == 0), false); [line 31]\n " shape="invhouse"] "test1.5a105e8b9d40e1329780d62ea2265d8a_11" -> "test1.5a105e8b9d40e1329780d62ea2265d8a_13" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/BlockVar.m.dot b/infer/tests/codetoanalyze/objc/shared/block/BlockVar.m.dot index f5b495114..904fc35de 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/BlockVar.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/BlockVar.m.dot @@ -47,7 +47,7 @@ digraph iCFG { "navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_9" -> "navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_2" ; -"navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_10" [label="10: DeclStmt \n *&p:int*=0 [line 24]\n " shape="box"] +"navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_10" [label="10: DeclStmt \n *&p:int*=null [line 24]\n " shape="box"] "navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_10" -> "navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_5" ; @@ -89,7 +89,7 @@ digraph iCFG { "blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_4" -> "blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_3" ; -"blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_5" [label="5: DeclStmt \n *&x:int*=0 [line 32]\n " shape="box"] +"blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_5" [label="5: DeclStmt \n *&x:int*=null [line 32]\n " shape="box"] "blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_5" -> "blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_4" ; @@ -131,7 +131,7 @@ digraph iCFG { "capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_4" -> "capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_3" ; -"capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_5" [label="5: DeclStmt \n *&x:int*=0 [line 49]\n " shape="box"] +"capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_5" [label="5: DeclStmt \n *&x:int*=null [line 49]\n " shape="box"] "capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_5" -> "capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_4" ; @@ -146,7 +146,7 @@ digraph iCFG { "capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_3" -> "capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_2" ; -"capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_4" [label="4: BinaryOperatorStmt: Assign \n *&x:int*=0 [line 62]\n " shape="box"] +"capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_4" [label="4: BinaryOperatorStmt: Assign \n *&x:int*=null [line 62]\n " shape="box"] "capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_4" -> "capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_3" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/block_no_args.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block_no_args.m.dot index 1cf22aaba..61dda9f8c 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/block_no_args.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/block_no_args.m.dot @@ -36,7 +36,7 @@ digraph iCFG { "m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_9" -> "m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_2" ; -"m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_10" [label="10: DeclStmt \n *&p:int*=0 [line 29]\n " shape="box"] +"m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_10" [label="10: DeclStmt \n *&p:int*=null [line 29]\n " shape="box"] "m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_10" -> "m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_5" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/block_release.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block_release.m.dot index 50ced325f..d6a680272 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/block_release.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/block_release.m.dot @@ -40,7 +40,7 @@ digraph iCFG { "blockReleaseTODO#My_manager#instance.8c1d633cf596e86a307167d9425628a8_10" -> "blockReleaseTODO#My_manager#instance.8c1d633cf596e86a307167d9425628a8_9" ; -"blockReleaseTODO#My_manager#instance.8c1d633cf596e86a307167d9425628a8_11" [label="11: DeclStmt \n n$12=_fun_CGBitmapContextCreate(0:void*,0:unsigned long,0:unsigned long,8:unsigned long,0:unsigned long,0:CGColorSpace*,0:unsigned int) [line 23]\n *&context:CGContext*=n$12 [line 23]\n " shape="box"] +"blockReleaseTODO#My_manager#instance.8c1d633cf596e86a307167d9425628a8_11" [label="11: DeclStmt \n n$12=_fun_CGBitmapContextCreate(null:void*,0:unsigned long,0:unsigned long,8:unsigned long,0:unsigned long,null:CGColorSpace*,0:unsigned int) [line 23]\n *&context:CGContext*=n$12 [line 23]\n " shape="box"] "blockReleaseTODO#My_manager#instance.8c1d633cf596e86a307167d9425628a8_11" -> "blockReleaseTODO#My_manager#instance.8c1d633cf596e86a307167d9425628a8_10" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot index aef244075..328055866 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot @@ -147,11 +147,11 @@ digraph iCFG { "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_5" -> "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_6" ; "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_5" -> "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_7" ; -"DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_6" [label="6: Prune (true branch) \n PRUNE(((n$0 == 0) != 0), true); [line 78]\n " shape="invhouse"] +"DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_6" [label="6: Prune (true branch) \n PRUNE(((n$0 == null) != 0), true); [line 78]\n " shape="invhouse"] "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_6" -> "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_8" ; -"DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_7" [label="7: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 78]\n " shape="invhouse"] +"DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_7" [label="7: Prune (false branch) \n PRUNE(((n$0 == null) == 0), false); [line 78]\n " shape="invhouse"] "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_7" -> "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_9" ; @@ -163,7 +163,7 @@ digraph iCFG { "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_9" -> "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_2" ; -"DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_10" [label="10: DeclStmt \n *&p:int*=0 [line 77]\n " shape="box"] +"DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_10" [label="10: DeclStmt \n *&p:int*=null [line 77]\n " shape="box"] "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_10" -> "DispatchMain.f6461dbdaeaf9a114cbe40f5f72fbb3f_5" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot index 0d601ff96..3a7ba24e8 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot @@ -15,7 +15,7 @@ digraph iCFG { "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_4" -> "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_3" ; -"dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_once_example_a:DispatchEx*=0 [line 25]\n " shape="box"] +"dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_once_example_a:DispatchEx*=null [line 25]\n " shape="box"] "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_5" -> "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_4" ; @@ -49,7 +49,7 @@ digraph iCFG { "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_4" -> "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_3" ; -"dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_async_example_a:DispatchEx*=0 [line 37]\n " shape="box"] +"dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_async_example_a:DispatchEx*=null [line 37]\n " shape="box"] "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_5" -> "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_4" ; @@ -83,7 +83,7 @@ digraph iCFG { "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_4" -> "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_3" ; -"dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_after_example_a:DispatchEx*=0 [line 47]\n " shape="box"] +"dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_after_example_a:DispatchEx*=null [line 47]\n " shape="box"] "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_5" -> "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_4" ; @@ -117,7 +117,7 @@ digraph iCFG { "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_4" -> "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_3" ; -"dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_group_example_a:DispatchEx*=0 [line 58]\n " shape="box"] +"dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_group_example_a:DispatchEx*=null [line 58]\n " shape="box"] "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_5" -> "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_4" ; @@ -151,7 +151,7 @@ digraph iCFG { "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_4" -> "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_3" ; -"dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_group_notify_example_a:DispatchEx*=0 [line 67]\n " shape="box"] +"dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_group_notify_example_a:DispatchEx*=null [line 67]\n " shape="box"] "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_5" -> "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_4" ; @@ -185,7 +185,7 @@ digraph iCFG { "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_4" -> "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_3" ; -"dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_barrier_example_a:DispatchEx*=0 [line 76]\n " shape="box"] +"dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_barrier_example_a:DispatchEx*=null [line 76]\n " shape="box"] "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_5" -> "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_4" ; diff --git a/infer/tests/codetoanalyze/objc/shared/field_superclass/SuperExample.m.dot b/infer/tests/codetoanalyze/objc/shared/field_superclass/SuperExample.m.dot index 3cc08d8ba..9a85b6843 100644 --- a/infer/tests/codetoanalyze/objc/shared/field_superclass/SuperExample.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/field_superclass/SuperExample.m.dot @@ -41,7 +41,7 @@ digraph iCFG { "init#BSuper#instance.6678b088cbd2579c21b766781beb8030_2" [label="2: Exit BSuper_init \n " color=yellow style=filled] -"init#BSuper#instance.6678b088cbd2579c21b766781beb8030_3" [label="3: Return Stmt \n *&return:objc_object*=0 [line 19]\n " shape="box"] +"init#BSuper#instance.6678b088cbd2579c21b766781beb8030_3" [label="3: Return Stmt \n *&return:objc_object*=null [line 19]\n " shape="box"] "init#BSuper#instance.6678b088cbd2579c21b766781beb8030_3" -> "init#BSuper#instance.6678b088cbd2579c21b766781beb8030_2" ; diff --git a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot index eb0250df0..eb8138ff0 100644 --- a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot @@ -46,15 +46,15 @@ digraph iCFG { "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_8" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_7" ; -"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_9" [label="9: DeclStmt \n *&s3:Auto*=0 [line 37]\n " shape="box"] +"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_9" [label="9: DeclStmt \n *&s3:Auto*=null [line 37]\n " shape="box"] "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_9" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_8" ; -"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_10" [label="10: DeclStmt \n *&s2:Auto*=0 [line 36]\n " shape="box"] +"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_10" [label="10: DeclStmt \n *&s2:Auto*=null [line 36]\n " shape="box"] "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_10" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_9" ; -"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_11" [label="11: DeclStmt \n *&s1:Auto*=0 [line 35]\n " shape="box"] +"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_11" [label="11: DeclStmt \n *&s1:Auto*=null [line 35]\n " shape="box"] "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_11" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_10" ; @@ -85,15 +85,15 @@ digraph iCFG { "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_7" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_6" ; -"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_8" [label="8: DeclStmt \n *&s3:Auto*=0 [line 50]\n " shape="box"] +"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_8" [label="8: DeclStmt \n *&s3:Auto*=null [line 50]\n " shape="box"] "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_8" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_7" ; -"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_9" [label="9: DeclStmt \n *&s2:Auto*=0 [line 49]\n " shape="box"] +"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_9" [label="9: DeclStmt \n *&s2:Auto*=null [line 49]\n " shape="box"] "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_9" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_8" ; -"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_10" [label="10: DeclStmt \n *&s1:Auto*=0 [line 48]\n " shape="box"] +"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_10" [label="10: DeclStmt \n *&s1:Auto*=null [line 48]\n " shape="box"] "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_10" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_9" ; diff --git a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot index 498e191e1..8f0983a01 100644 --- a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot @@ -37,7 +37,7 @@ digraph iCFG { "test1NoLeak#MemoryLeakExample#class.7e0d9640dbd86a21622e801793707bd9_3" -> "test1NoLeak#MemoryLeakExample#class.7e0d9640dbd86a21622e801793707bd9_2" ; -"test1NoLeak#MemoryLeakExample#class.7e0d9640dbd86a21622e801793707bd9_4" [label="4: DeclStmt \n n$20=_fun_CTFramesetterCreateWithAttributedString(0:__CFAttributedString const *) [line 49]\n *&framesetter:__CTFramesetter const *=n$20 [line 49]\n " shape="box"] +"test1NoLeak#MemoryLeakExample#class.7e0d9640dbd86a21622e801793707bd9_4" [label="4: DeclStmt \n n$20=_fun_CTFramesetterCreateWithAttributedString(null:__CFAttributedString const *) [line 49]\n *&framesetter:__CTFramesetter const *=n$20 [line 49]\n " shape="box"] "test1NoLeak#MemoryLeakExample#class.7e0d9640dbd86a21622e801793707bd9_4" -> "test1NoLeak#MemoryLeakExample#class.7e0d9640dbd86a21622e801793707bd9_3" ; @@ -52,7 +52,7 @@ digraph iCFG { "test2NoLeak#MemoryLeakExample#class.69cf0c35f7df26deefa723cac655894d_3" -> "test2NoLeak#MemoryLeakExample#class.69cf0c35f7df26deefa723cac655894d_2" ; -"test2NoLeak#MemoryLeakExample#class.69cf0c35f7df26deefa723cac655894d_4" [label="4: DeclStmt \n n$31=_fun_SecTrustCopyPublicKey(0:__SecTrust*) [line 71]\n *&allowedPublicKey:__SecKey*=n$31 [line 71]\n " shape="box"] +"test2NoLeak#MemoryLeakExample#class.69cf0c35f7df26deefa723cac655894d_4" [label="4: DeclStmt \n n$31=_fun_SecTrustCopyPublicKey(null:__SecTrust*) [line 71]\n *&allowedPublicKey:__SecKey*=n$31 [line 71]\n " shape="box"] "test2NoLeak#MemoryLeakExample#class.69cf0c35f7df26deefa723cac655894d_4" -> "test2NoLeak#MemoryLeakExample#class.69cf0c35f7df26deefa723cac655894d_3" ; @@ -67,7 +67,7 @@ digraph iCFG { "testImageRefRelease#MemoryLeakExample#class.fa3cf5eac6a14b14c5050c7d62d2a79f_3" -> "testImageRefRelease#MemoryLeakExample#class.fa3cf5eac6a14b14c5050c7d62d2a79f_2" ; -"testImageRefRelease#MemoryLeakExample#class.fa3cf5eac6a14b14c5050c7d62d2a79f_4" [label="4: DeclStmt \n n$33=_fun_CGBitmapContextCreateImage(0:CGContext*) [line 76]\n *&newImage:CGImage*=n$33 [line 76]\n " shape="box"] +"testImageRefRelease#MemoryLeakExample#class.fa3cf5eac6a14b14c5050c7d62d2a79f_4" [label="4: DeclStmt \n n$33=_fun_CGBitmapContextCreateImage(null:CGContext*) [line 76]\n *&newImage:CGImage*=n$33 [line 76]\n " shape="box"] "testImageRefRelease#MemoryLeakExample#class.fa3cf5eac6a14b14c5050c7d62d2a79f_4" -> "testImageRefRelease#MemoryLeakExample#class.fa3cf5eac6a14b14c5050c7d62d2a79f_3" ; diff --git a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/TollBridgeExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/TollBridgeExample.m.dot index 3b55e6642..5ba007c30 100644 --- a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/TollBridgeExample.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/TollBridgeExample.m.dot @@ -7,7 +7,7 @@ digraph iCFG { "cfautorelease_test.2ccea2233b65cd3828a2d5e2571ad69b_2" [label="2: Exit cfautorelease_test \n " color=yellow style=filled] -"cfautorelease_test.2ccea2233b65cd3828a2d5e2571ad69b_3" [label="3: Return Stmt \n n$0=_fun___builtin___CFStringMakeConstantString(\"Icon\":char const *) [line 41]\n n$1=_fun_CTFontCreateWithName(n$0:__CFString const *,17.000000:double,0:CGAffineTransform const *) [line 41]\n n$2=_fun___objc_cast(n$1:void const *,sizeof(void const ):unsigned long) [line 41]\n *&return:__CTFont const *=n$2 [line 41]\n " shape="box"] +"cfautorelease_test.2ccea2233b65cd3828a2d5e2571ad69b_3" [label="3: Return Stmt \n n$0=_fun___builtin___CFStringMakeConstantString(\"Icon\":char const *) [line 41]\n n$1=_fun_CTFontCreateWithName(n$0:__CFString const *,17.000000:double,null:CGAffineTransform const *) [line 41]\n n$2=_fun___objc_cast(n$1:void const *,sizeof(void const ):unsigned long) [line 41]\n *&return:__CTFont const *=n$2 [line 41]\n " shape="box"] "cfautorelease_test.2ccea2233b65cd3828a2d5e2571ad69b_3" -> "cfautorelease_test.2ccea2233b65cd3828a2d5e2571ad69b_2" ; @@ -22,7 +22,7 @@ digraph iCFG { "bridgeDictionaryNoLeak.a9b55a0c8751bf95138aeb6870d0dec1_3" -> "bridgeDictionaryNoLeak.a9b55a0c8751bf95138aeb6870d0dec1_2" ; -"bridgeDictionaryNoLeak.a9b55a0c8751bf95138aeb6870d0dec1_4" [label="4: DeclStmt \n n$1=_fun_NSDictionary_dictionaryWithObjects:forKeys:count:(0:objc_object*) [line 45]\n n$2=_fun_NSString_stringWithUTF8String:(\"key\":char* const ) [line 45]\n n$3=_fun_NSDictionary_dictionaryWithObjects:forKeys:count:(n$1:objc_object*,n$2:objc_object*,0:objc_object*) [line 45]\n *&bufferAttributes:NSDictionary*=n$3 [line 45]\n " shape="box"] +"bridgeDictionaryNoLeak.a9b55a0c8751bf95138aeb6870d0dec1_4" [label="4: DeclStmt \n n$1=_fun_NSDictionary_dictionaryWithObjects:forKeys:count:(null:objc_object*) [line 45]\n n$2=_fun_NSString_stringWithUTF8String:(\"key\":char* const ) [line 45]\n n$3=_fun_NSDictionary_dictionaryWithObjects:forKeys:count:(n$1:objc_object*,n$2:objc_object*,null:objc_object*) [line 45]\n *&bufferAttributes:NSDictionary*=n$3 [line 45]\n " shape="box"] "bridgeDictionaryNoLeak.a9b55a0c8751bf95138aeb6870d0dec1_4" -> "bridgeDictionaryNoLeak.a9b55a0c8751bf95138aeb6870d0dec1_3" ; @@ -37,7 +37,7 @@ digraph iCFG { "bridgeTransfer#TollBridgeExample#instance.d0065913beb197e891ef0d8a0bb81b38_3" -> "bridgeTransfer#TollBridgeExample#instance.d0065913beb197e891ef0d8a0bb81b38_2" ; -"bridgeTransfer#TollBridgeExample#instance.d0065913beb197e891ef0d8a0bb81b38_4" [label="4: DeclStmt \n n$1=_fun_CFLocaleCreate(0:__CFAllocator const *,0:__CFString const *) [line 20]\n *&nameRef:__CFLocale const *=n$1 [line 20]\n " shape="box"] +"bridgeTransfer#TollBridgeExample#instance.d0065913beb197e891ef0d8a0bb81b38_4" [label="4: DeclStmt \n n$1=_fun_CFLocaleCreate(null:__CFAllocator const *,null:__CFString const *) [line 20]\n *&nameRef:__CFLocale const *=n$1 [line 20]\n " shape="box"] "bridgeTransfer#TollBridgeExample#instance.d0065913beb197e891ef0d8a0bb81b38_4" -> "bridgeTransfer#TollBridgeExample#instance.d0065913beb197e891ef0d8a0bb81b38_3" ; @@ -52,7 +52,7 @@ digraph iCFG { "bridge#TollBridgeExample#instance.fadd5a014118113c960fa1a6e3ff27ba_3" -> "bridge#TollBridgeExample#instance.fadd5a014118113c960fa1a6e3ff27ba_2" ; -"bridge#TollBridgeExample#instance.fadd5a014118113c960fa1a6e3ff27ba_4" [label="4: DeclStmt \n n$3=_fun_CFLocaleCreate(0:__CFAllocator const *,0:__CFString const *) [line 25]\n *&nameRef:__CFLocale const *=n$3 [line 25]\n " shape="box"] +"bridge#TollBridgeExample#instance.fadd5a014118113c960fa1a6e3ff27ba_4" [label="4: DeclStmt \n n$3=_fun_CFLocaleCreate(null:__CFAllocator const *,null:__CFString const *) [line 25]\n *&nameRef:__CFLocale const *=n$3 [line 25]\n " shape="box"] "bridge#TollBridgeExample#instance.fadd5a014118113c960fa1a6e3ff27ba_4" -> "bridge#TollBridgeExample#instance.fadd5a014118113c960fa1a6e3ff27ba_3" ; @@ -82,7 +82,7 @@ digraph iCFG { "_readHTTPHeader#TollBridgeExample#instance.3d37ce88cf13750e89ba404865a70554_3" -> "_readHTTPHeader#TollBridgeExample#instance.3d37ce88cf13750e89ba404865a70554_2" ; -"_readHTTPHeader#TollBridgeExample#instance.3d37ce88cf13750e89ba404865a70554_4" [label="4: DeclStmt \n n$8=_fun_CFHTTPMessageCopyAllHeaderFields(0:__CFHTTPMessage*) [line 36]\n *&ref:__CFDictionary const *=n$8 [line 36]\n " shape="box"] +"_readHTTPHeader#TollBridgeExample#instance.3d37ce88cf13750e89ba404865a70554_4" [label="4: DeclStmt \n n$8=_fun_CFHTTPMessageCopyAllHeaderFields(null:__CFHTTPMessage*) [line 36]\n *&ref:__CFDictionary const *=n$8 [line 36]\n " shape="box"] "_readHTTPHeader#TollBridgeExample#instance.3d37ce88cf13750e89ba404865a70554_4" -> "_readHTTPHeader#TollBridgeExample#instance.3d37ce88cf13750e89ba404865a70554_3" ; diff --git a/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot b/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot index 3cd215872..1f71de7b6 100644 --- a/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot @@ -7,7 +7,7 @@ digraph iCFG { "NonnullAtrributeTest.69a49728cf7d46ab0add381e5c93704c_2" [label="2: Exit NonnullAtrributeTest \n " color=yellow style=filled] -"NonnullAtrributeTest.69a49728cf7d46ab0add381e5c93704c_3" [label="3: Call n$0 \n n$0=*&callback:_fn_(*) [line 47]\n n$0(0:NSError*,0:objc_object*) [line 47]\n " shape="box"] +"NonnullAtrributeTest.69a49728cf7d46ab0add381e5c93704c_3" [label="3: Call n$0 \n n$0=*&callback:_fn_(*) [line 47]\n n$0(null:NSError*,null:objc_object*) [line 47]\n " shape="box"] "NonnullAtrributeTest.69a49728cf7d46ab0add381e5c93704c_3" -> "NonnullAtrributeTest.69a49728cf7d46ab0add381e5c93704c_2" ;