[clang] Replacing type void by type void star . Fixing bug in commit 41e0128cf71a399ddc183a7d12fd43dfdc493985

master
Dulma Rodriguez 9 years ago
parent 4dac490e8d
commit a4cbf94de5

@ -167,7 +167,7 @@ let create_integer_literal stmt_info n =
let create_cstyle_cast_expr stmt_info stmts qt =
let expr_info = {
Clang_ast_t.ei_qual_type = create_void_type;
Clang_ast_t.ei_qual_type = create_void_star_type;
ei_value_kind = `RValue;
ei_object_kind = `Ordinary;
} in
@ -179,7 +179,7 @@ let create_cstyle_cast_expr stmt_info stmts qt =
let create_parent_expr stmt_info stmts =
let expr_info = {
Clang_ast_t.ei_qual_type = create_void_type;
Clang_ast_t.ei_qual_type = create_void_star_type;
ei_value_kind = `RValue;
ei_object_kind = `Ordinary;
} in
@ -429,7 +429,7 @@ let translate_dispatch_function block_name stmt_info stmt_list ei n =
let block_var_decl = VarDecl(decl_info, block_name_info, ei.ei_qual_type, var_decl_info) in
let decl_stmt = DeclStmt(stmt_info,[], [block_var_decl]) in
let expr_info_call = make_general_expr_info create_void_type `XValue `Ordinary in
let expr_info_call = make_general_expr_info create_void_star_type `XValue `Ordinary in
let expr_info_dre = make_expr_info_with_objc_kind qt `Ordinary in
let decl_ref = make_decl_ref_qt `Var stmt_info.si_pointer block_name false qt in
let decl_ref_expr_info = make_decl_ref_expr_info decl_ref in
@ -478,7 +478,7 @@ let build_PseudoObjectExpr qt_m o_cast_decl_ref_exp mname =
let create_call stmt_info decl_pointer function_name qt parameters =
let expr_info_call = {
Clang_ast_t.ei_qual_type = create_void_type;
Clang_ast_t.ei_qual_type = create_void_star_type;
ei_value_kind = `XValue;
ei_object_kind = `Ordinary
} in
@ -578,7 +578,7 @@ let translate_block_enumerate block_name stmt_info stmt_list ei =
let decl_ref = make_decl_ref_qt `Var di.Clang_ast_t.di_pointer name.Clang_ast_t.ni_name false qt in
let cast = cast_expr decl_ref qt in
let parameter =
create_implicit_cast_expr (fresh_stmt_info stmt_info) [cast] create_void_type `BitCast in
create_implicit_cast_expr (fresh_stmt_info stmt_info) [cast] create_void_star_type `BitCast in
create_call (fresh_stmt_info stmt_info) di.Clang_ast_t.di_pointer CFrontend_config.free qt_fun [parameter]
| _ -> assert false in
@ -657,7 +657,7 @@ let translate_block_enumerate block_name stmt_info stmt_list ei =
let make_block_call block_qt object_cast idx_cast stop_cast =
let decl_ref = make_decl_ref_invalid `Var block_name false block_qt in
let fun_cast = cast_expr decl_ref block_qt in
let ei_call = make_expr_info create_void_type in
let ei_call = make_expr_info create_void_star_type in
Clang_ast_t.CallExpr (fresh_stmt_info stmt_info, [fun_cast; object_cast; idx_cast; stop_cast], ei_call) in
(* build statement "if (stop) break;" *)
@ -738,4 +738,4 @@ let create_assume_not_null_call decl_info var_name var_type =
let bin_op = make_binary_stmt decl_ref_exp_cast null_expr stmt_info (make_lvalue_obc_prop_expr_info var_type) boi in
let parameters = [bin_op] in
let procname = Procname.to_string SymExec.ModelBuiltins.__infer_assume in
create_call stmt_info var_decl_ptr procname create_void_type parameters
create_call stmt_info var_decl_ptr procname create_void_star_type parameters

@ -1,5 +1,5 @@
digraph iCFG {
20 [label="20: Call _fun___infer_assume \n n$1=*&callback:_fn_ (*) [line 46]\n _fun___infer_assume((n$1 != 0):_fn_ (*)) [line 46]\n REMOVE_TEMPS(n$1); [line 46]\n " shape="box"]
20 [label="20: 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"]
20 -> 19 ;
@ -14,11 +14,11 @@ digraph iCFG {
17 -> 20 ;
16 [label="16: Call _fun___infer_assume \n n$12=*&name:class NSString * [line -1]\n _fun___infer_assume((n$12 != 0):class NSString *) [line -1]\n REMOVE_TEMPS(n$12); [line -1]\n " shape="box"]
16 [label="16: Call _fun___infer_assume \n n$13=*&name:class NSString * [line -1]\n n$14=_fun___infer_assume((n$13 != 0):class NSString *) [line -1]\n REMOVE_TEMPS(n$13,n$14); [line -1]\n " shape="box"]
16 -> 15 ;
15 [label="15: BinaryOperatorStmt: Assign \n n$9=*&self:class C * [line 31]\n n$11=*&name:class NSString * [line 31]\n n$10=_fun_NSString_copy(n$11:class NSString *) virtual [line 31]\n *n$9._name:class NSString *=n$10 [line 31]\n REMOVE_TEMPS(n$9,n$10,n$11); [line 31]\n NULLIFY(&name,false); [line 31]\n NULLIFY(&self,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"]
15 [label="15: BinaryOperatorStmt: Assign \n n$10=*&self:class C * [line 31]\n n$12=*&name:class NSString * [line 31]\n n$11=_fun_NSString_copy(n$12:class NSString *) virtual [line 31]\n *n$10._name:class NSString *=n$11 [line 31]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 31]\n NULLIFY(&name,false); [line 31]\n NULLIFY(&self,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"]
15 -> 14 ;
@ -29,7 +29,7 @@ digraph iCFG {
13 -> 16 ;
12 [label="12: Return Stmt \n n$6=*&self:class C * [line 31]\n n$7=*n$6._name:class NSString * [line 31]\n *&return:class NSString *=n$7 [line 31]\n n$8=_fun___set_autorelease_attribute(n$7:class NSString *) [line 31]\n REMOVE_TEMPS(n$6,n$7,n$8); [line 31]\n NULLIFY(&self,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"]
12 [label="12: Return Stmt \n n$7=*&self:class C * [line 31]\n n$8=*n$7._name:class NSString * [line 31]\n *&return:class NSString *=n$8 [line 31]\n n$9=_fun___set_autorelease_attribute(n$8:class NSString *) [line 31]\n REMOVE_TEMPS(n$7,n$8,n$9); [line 31]\n NULLIFY(&self,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"]
12 -> 11 ;
@ -40,7 +40,7 @@ digraph iCFG {
10 -> 12 ;
9 [label="9: Call _fun___infer_assume \n n$5=*&a:class A * [line -1]\n _fun___infer_assume((n$5 != 0):class A *) [line -1]\n REMOVE_TEMPS(n$5); [line -1]\n " shape="box"]
9 [label="9: Call _fun___infer_assume \n n$5=*&a:class A * [line -1]\n n$6=_fun___infer_assume((n$5 != 0):class A *) [line -1]\n REMOVE_TEMPS(n$5,n$6); [line -1]\n " shape="box"]
9 -> 8 ;

@ -1,21 +1,21 @@
digraph iCFG {
52 [label="52: DeclStmt \n n$44=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 30]\n n$42=_fun_NSArray_init(n$44:class NSArray *) virtual [line 30]\n *&a:class NSArray *=n$42 [line 30]\n REMOVE_TEMPS(n$42,n$44); [line 30]\n " shape="box"]
52 [label="52: DeclStmt \n n$47=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 30]\n n$45=_fun_NSArray_init(n$47:class NSArray *) virtual [line 30]\n *&a:class NSArray *=n$45 [line 30]\n REMOVE_TEMPS(n$45,n$47); [line 30]\n " shape="box"]
52 -> 51 ;
51 [label="51: DeclStmt \n n$41=*&a:class NSArray * [line 32]\n *&objects:class NSArray *=n$41 [line 32]\n REMOVE_TEMPS(n$41); [line 32]\n NULLIFY(&a,false); [line 32]\n " shape="box"]
51 [label="51: DeclStmt \n n$44=*&a:class NSArray * [line 32]\n *&objects:class NSArray *=n$44 [line 32]\n REMOVE_TEMPS(n$44); [line 32]\n NULLIFY(&a,false); [line 32]\n " shape="box"]
51 -> 44 ;
50 [label="50: BinaryOperatorStmt: Assign \n NULLIFY(&ShouldStop,false); [line 40]\n n$39=*&stop:_Bool * [line 40]\n *n$39:_Bool =1 [line 40]\n REMOVE_TEMPS(n$39); [line 40]\n NULLIFY(&stop,false); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"]
50 [label="50: BinaryOperatorStmt: Assign \n NULLIFY(&ShouldStop,false); [line 40]\n n$42=*&stop:_Bool * [line 40]\n *n$42:_Bool =1 [line 40]\n REMOVE_TEMPS(n$42); [line 40]\n NULLIFY(&stop,false); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"]
50 -> 47 ;
49 [label="49: Prune (false branch) \n n$38=*&ShouldStop:int [line 39]\n PRUNE((n$38 == 0), false); [line 39]\n REMOVE_TEMPS(n$38); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="invhouse"]
49 [label="49: Prune (false branch) \n n$41=*&ShouldStop:int [line 39]\n PRUNE((n$41 == 0), false); [line 39]\n REMOVE_TEMPS(n$41); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="invhouse"]
49 -> 47 ;
48 [label="48: Prune (true branch) \n n$38=*&ShouldStop:int [line 39]\n PRUNE((n$38 != 0), true); [line 39]\n REMOVE_TEMPS(n$38); [line 39]\n " shape="invhouse"]
48 [label="48: Prune (true branch) \n n$41=*&ShouldStop:int [line 39]\n PRUNE((n$41 != 0), true); [line 39]\n REMOVE_TEMPS(n$41); [line 39]\n " shape="invhouse"]
48 -> 50 ;
@ -31,35 +31,35 @@ digraph iCFG {
45 -> 48 ;
45 -> 49 ;
44 [label="44: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array_trans______2); [line 35]\n n$40=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array_trans______2 ):unsigned long ) [line 35]\n *&__objc_anonymous_block_MyBlock_array_trans______2:class __objc_anonymous_block_MyBlock_array_trans______2 =n$40 [line 35]\n *&enumerateObjectsUsingBlock:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array_trans______2) [line 35]\n REMOVE_TEMPS(n$40); [line 35]\n " shape="box"]
44 [label="44: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array_trans______2); [line 35]\n n$43=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array_trans______2 ):unsigned long ) [line 35]\n *&__objc_anonymous_block_MyBlock_array_trans______2:class __objc_anonymous_block_MyBlock_array_trans______2 =n$43 [line 35]\n *&enumerateObjectsUsingBlock:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array_trans______2) [line 35]\n REMOVE_TEMPS(n$43); [line 35]\n " shape="box"]
44 -> 43 ;
43 [label="43: DeclStmt \n n$37=_fun_malloc_no_fail(sizeof(_Bool ):_Bool ) [line 43]\n *&stop:_Bool *=n$37 [line 43]\n REMOVE_TEMPS(n$37); [line 43]\n " shape="box"]
43 [label="43: DeclStmt \n n$40=_fun_malloc_no_fail(sizeof(_Bool ):_Bool ) [line 43]\n *&stop:_Bool *=n$40 [line 43]\n REMOVE_TEMPS(n$40); [line 43]\n " shape="box"]
43 -> 42 ;
42 [label="42: BinaryOperatorStmt: Assign \n n$36=*&stop:_Bool * [line 44]\n *n$36:_Bool =0 [line 44]\n REMOVE_TEMPS(n$36); [line 44]\n " shape="box"]
42 [label="42: BinaryOperatorStmt: Assign \n n$39=*&stop:_Bool * [line 44]\n *n$39:_Bool =0 [line 44]\n REMOVE_TEMPS(n$39); [line 44]\n " shape="box"]
42 -> 31 ;
41 [label="41: DeclStmt \n n$34=*&objects:class NSArray * [line 49]\n n$35=*&idx:unsigned long [line 49]\n n$33=_fun_NSArray_objectAtIndexedSubscript:(n$34:class NSArray *,n$35:unsigned long ) virtual [line 49]\n *&object:struct objc_object *=n$33 [line 49]\n REMOVE_TEMPS(n$33,n$34,n$35); [line 49]\n " shape="box"]
41 [label="41: DeclStmt \n n$37=*&objects:class NSArray * [line 49]\n n$38=*&idx:unsigned long [line 49]\n n$36=_fun_NSArray_objectAtIndexedSubscript:(n$37:class NSArray *,n$38:unsigned long ) virtual [line 49]\n *&object:struct objc_object *=n$36 [line 49]\n REMOVE_TEMPS(n$36,n$37,n$38); [line 49]\n " shape="box"]
41 -> 40 ;
40 [label="40: Call n$29 \n n$29=*&enumerateObjectsUsingBlock:_fn_ (*) [line 50]\n n$30=*&object:struct objc_object * [line 50]\n n$31=*&idx:unsigned long [line 50]\n n$32=*&stop:_Bool * [line 50]\n n$29(n$30:struct objc_object *,n$31:unsigned long ,n$32:_Bool *) [line 50]\n REMOVE_TEMPS(n$29,n$30,n$31,n$32); [line 50]\n NULLIFY(&object,false); [line 50]\n " shape="box"]
40 [label="40: Call n$32 \n n$32=*&enumerateObjectsUsingBlock:_fn_ (*) [line 50]\n n$33=*&object:struct objc_object * [line 50]\n n$34=*&idx:unsigned long [line 50]\n n$35=*&stop:_Bool * [line 50]\n n$32(n$33:struct objc_object *,n$34:unsigned long ,n$35:_Bool *) [line 50]\n REMOVE_TEMPS(n$32,n$33,n$34,n$35); [line 50]\n NULLIFY(&object,false); [line 50]\n " shape="box"]
40 -> 37 ;
39 [label="39: Prune (false branch) \n PRUNE(((n$28 == 1) == 0), false); [line 51]\n REMOVE_TEMPS(n$27,n$28); [line 51]\n " shape="invhouse"]
39 [label="39: Prune (false branch) \n PRUNE(((n$31 == 1) == 0), false); [line 51]\n REMOVE_TEMPS(n$30,n$31); [line 51]\n " shape="invhouse"]
39 -> 36 ;
38 [label="38: Prune (true branch) \n PRUNE(((n$28 == 1) != 0), true); [line 51]\n REMOVE_TEMPS(n$27,n$28); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="invhouse"]
38 [label="38: Prune (true branch) \n PRUNE(((n$31 == 1) != 0), true); [line 51]\n REMOVE_TEMPS(n$30,n$31); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="invhouse"]
38 -> 29 ;
37 [label="37: BinaryOperatorStmt: EQ \n n$27=*&stop:_Bool * [line 51]\n n$28=*n$27:_Bool [line 51]\n " shape="box"]
37 [label="37: BinaryOperatorStmt: EQ \n n$30=*&stop:_Bool * [line 51]\n n$31=*n$30:_Bool [line 51]\n " shape="box"]
37 -> 38 ;
@ -68,20 +68,20 @@ digraph iCFG {
36 -> 32 ;
35 [label="35: Prune (false branch) \n PRUNE(((n$24 < n$25) == 0), false); [line 46]\n REMOVE_TEMPS(n$24,n$25,n$26); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="invhouse"]
35 [label="35: Prune (false branch) \n PRUNE(((n$27 < n$28) == 0), false); [line 46]\n REMOVE_TEMPS(n$27,n$28,n$29); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="invhouse"]
35 -> 29 ;
34 [label="34: Prune (true branch) \n PRUNE(((n$24 < n$25) != 0), true); [line 46]\n REMOVE_TEMPS(n$24,n$25,n$26); [line 46]\n " shape="invhouse"]
34 [label="34: Prune (true branch) \n PRUNE(((n$27 < n$28) != 0), true); [line 46]\n REMOVE_TEMPS(n$27,n$28,n$29); [line 46]\n " shape="invhouse"]
34 -> 41 ;
33 [label="33: BinaryOperatorStmt: LT \n n$24=*&idx:unsigned long [line 46]\n n$26=*&objects:class NSArray * [line 46]\n n$25=_fun_NSArray_count(n$26:class NSArray *) virtual [line 46]\n " shape="box"]
33 [label="33: BinaryOperatorStmt: LT \n n$27=*&idx:unsigned long [line 46]\n n$29=*&objects:class NSArray * [line 46]\n n$28=_fun_NSArray_count(n$29:class NSArray *) virtual [line 46]\n " shape="box"]
33 -> 34 ;
33 -> 35 ;
32 [label="32: UnaryOperator \n n$23=*&idx:unsigned long [line 46]\n *&idx:unsigned long =(n$23 + 1) [line 46]\n REMOVE_TEMPS(n$23); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"]
32 [label="32: UnaryOperator \n n$26=*&idx:unsigned long [line 46]\n *&idx:unsigned long =(n$26 + 1) [line 46]\n REMOVE_TEMPS(n$26); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"]
32 -> 30 ;
@ -93,7 +93,7 @@ digraph iCFG {
30 -> 33 ;
29 [label="29: Call _fun_free \n NULLIFY(&enumerateObjectsUsingBlock,false); [line 53]\n NULLIFY(&idx,false); [line 53]\n NULLIFY(&objects,false); [line 53]\n n$22=*&stop:_Bool * [line 53]\n _fun_free(n$22:void *) [line 53]\n REMOVE_TEMPS(n$22); [line 53]\n NULLIFY(&__objc_anonymous_block_MyBlock_array_trans______2,true); [line 53]\n NULLIFY(&stop,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"]
29 [label="29: Call _fun_free \n NULLIFY(&enumerateObjectsUsingBlock,false); [line 53]\n NULLIFY(&idx,false); [line 53]\n NULLIFY(&objects,false); [line 53]\n n$25=*&stop:_Bool * [line 53]\n _fun_free(n$25:void *) [line 53]\n REMOVE_TEMPS(n$25); [line 53]\n NULLIFY(&__objc_anonymous_block_MyBlock_array_trans______2,true); [line 53]\n NULLIFY(&stop,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"]
29 -> 28 ;
@ -104,23 +104,23 @@ digraph iCFG {
27 -> 52 ;
26 [label="26: DeclStmt \n n$21=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 14]\n n$19=_fun_NSArray_init(n$21:class NSArray *) virtual [line 14]\n *&a:class NSArray *=n$19 [line 14]\n REMOVE_TEMPS(n$19,n$21); [line 14]\n " shape="box"]
26 [label="26: DeclStmt \n n$24=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 14]\n n$22=_fun_NSArray_init(n$24:class NSArray *) virtual [line 14]\n *&a:class NSArray *=n$22 [line 14]\n REMOVE_TEMPS(n$22,n$24); [line 14]\n " shape="box"]
26 -> 25 ;
25 [label="25: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_MyBlock_array______1); [line 15]\n DECLARE_LOCALS(&objects); [line 15]\n DECLARE_LOCALS(&stop); [line 15]\n DECLARE_LOCALS(&idx); [line 15]\n DECLARE_LOCALS(&object); [line 15]\n n$18=*&a:class NSArray * [line 15]\n *&objects:class NSArray *=n$18 [line 15]\n REMOVE_TEMPS(n$18); [line 15]\n NULLIFY(&a,false); [line 15]\n " shape="box"]
25 [label="25: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_MyBlock_array______1); [line 15]\n DECLARE_LOCALS(&objects); [line 15]\n DECLARE_LOCALS(&stop); [line 15]\n DECLARE_LOCALS(&idx); [line 15]\n DECLARE_LOCALS(&object); [line 15]\n n$21=*&a:class NSArray * [line 15]\n *&objects:class NSArray *=n$21 [line 15]\n REMOVE_TEMPS(n$21); [line 15]\n NULLIFY(&a,false); [line 15]\n " shape="box"]
25 -> 18 ;
24 [label="24: BinaryOperatorStmt: Assign \n NULLIFY(&ShouldStop,false); [line 22]\n n$16=*&stop:_Bool * [line 22]\n *n$16:_Bool =1 [line 22]\n REMOVE_TEMPS(n$16); [line 22]\n NULLIFY(&stop,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
24 [label="24: BinaryOperatorStmt: Assign \n NULLIFY(&ShouldStop,false); [line 22]\n n$19=*&stop:_Bool * [line 22]\n *n$19:_Bool =1 [line 22]\n REMOVE_TEMPS(n$19); [line 22]\n NULLIFY(&stop,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"]
24 -> 21 ;
23 [label="23: Prune (false branch) \n n$15=*&ShouldStop:int [line 20]\n PRUNE((n$15 == 0), false); [line 20]\n REMOVE_TEMPS(n$15); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="invhouse"]
23 [label="23: Prune (false branch) \n n$18=*&ShouldStop:int [line 20]\n PRUNE((n$18 == 0), false); [line 20]\n REMOVE_TEMPS(n$18); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="invhouse"]
23 -> 21 ;
22 [label="22: Prune (true branch) \n n$15=*&ShouldStop:int [line 20]\n PRUNE((n$15 != 0), true); [line 20]\n REMOVE_TEMPS(n$15); [line 20]\n " shape="invhouse"]
22 [label="22: Prune (true branch) \n n$18=*&ShouldStop:int [line 20]\n PRUNE((n$18 != 0), true); [line 20]\n REMOVE_TEMPS(n$18); [line 20]\n " shape="invhouse"]
22 -> 24 ;
@ -136,35 +136,35 @@ digraph iCFG {
19 -> 22 ;
19 -> 23 ;
18 [label="18: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array______1); [line 15]\n n$17=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array______1 ):unsigned long ) [line 15]\n *&__objc_anonymous_block_MyBlock_array______1:class __objc_anonymous_block_MyBlock_array______1 =n$17 [line 15]\n *&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array______1) [line 15]\n REMOVE_TEMPS(n$17); [line 15]\n " shape="box"]
18 [label="18: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array______1); [line 15]\n n$20=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array______1 ):unsigned long ) [line 15]\n *&__objc_anonymous_block_MyBlock_array______1:class __objc_anonymous_block_MyBlock_array______1 =n$20 [line 15]\n *&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array______1) [line 15]\n REMOVE_TEMPS(n$20); [line 15]\n " shape="box"]
18 -> 17 ;
17 [label="17: DeclStmt \n _fun_malloc_no_fail(sizeof(signed char ):signed char ) [line 15]\n *&stop:_Bool *=-1 [line 15]\n " shape="box"]
17 [label="17: DeclStmt \n n$17=_fun_malloc_no_fail(sizeof(signed char ):signed char ) [line 15]\n *&stop:_Bool *=n$17 [line 15]\n REMOVE_TEMPS(n$17); [line 15]\n " shape="box"]
17 -> 16 ;
16 [label="16: BinaryOperatorStmt: Assign \n n$14=*&stop:_Bool * [line 15]\n *n$14:void =0 [line 15]\n REMOVE_TEMPS(n$14); [line 15]\n " shape="box"]
16 [label="16: BinaryOperatorStmt: Assign \n n$16=*&stop:_Bool * [line 15]\n *n$16:void =0 [line 15]\n REMOVE_TEMPS(n$16); [line 15]\n " shape="box"]
16 -> 5 ;
15 [label="15: DeclStmt \n n$12=*&objects:class NSArray * [line 15]\n n$13=*&idx:unsigned long [line 15]\n n$11=_fun_NSArray_objectAtIndexedSubscript:(n$12:class NSArray *,n$13:unsigned long ) virtual [line 15]\n *&object:struct objc_object *=n$11 [line 15]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 15]\n " shape="box"]
15 [label="15: DeclStmt \n n$14=*&objects:class NSArray * [line 15]\n n$15=*&idx:unsigned long [line 15]\n n$13=_fun_NSArray_objectAtIndexedSubscript:(n$14:class NSArray *,n$15:unsigned long ) virtual [line 15]\n *&object:struct objc_object *=n$13 [line 15]\n REMOVE_TEMPS(n$13,n$14,n$15); [line 15]\n " shape="box"]
15 -> 14 ;
14 [label="14: Call n$7 \n n$7=*&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*) [line 15]\n n$8=*&object:struct objc_object * [line 15]\n n$9=*&idx:unsigned long [line 15]\n n$10=*&stop:_Bool * [line 15]\n n$7(n$8:struct objc_object *,n$9:unsigned long ,n$10:_Bool *) [line 15]\n REMOVE_TEMPS(n$7,n$8,n$9,n$10); [line 15]\n " shape="box"]
14 [label="14: Call n$8 \n n$8=*&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*) [line 15]\n n$9=*&object:struct objc_object * [line 15]\n n$10=*&idx:unsigned long [line 15]\n n$11=*&stop:_Bool * [line 15]\n n$12=n$8(n$9:struct objc_object *,n$10:unsigned long ,n$11:_Bool *) [line 15]\n REMOVE_TEMPS(n$8,n$9,n$10,n$11,n$12); [line 15]\n " shape="box"]
14 -> 11 ;
13 [label="13: Prune (false branch) \n n$6=*n$5:signed char [line 15]\n PRUNE((n$6 == 0), false); [line 15]\n REMOVE_TEMPS(n$5,n$6); [line 15]\n " shape="invhouse"]
13 [label="13: Prune (false branch) \n n$7=*n$6:signed char [line 15]\n PRUNE((n$7 == 0), false); [line 15]\n REMOVE_TEMPS(n$6,n$7); [line 15]\n " shape="invhouse"]
13 -> 10 ;
12 [label="12: Prune (true branch) \n n$6=*n$5:signed char [line 15]\n PRUNE((n$6 != 0), true); [line 15]\n REMOVE_TEMPS(n$5,n$6); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"]
12 [label="12: Prune (true branch) \n n$7=*n$6:signed char [line 15]\n PRUNE((n$7 != 0), true); [line 15]\n REMOVE_TEMPS(n$6,n$7); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"]
12 -> 3 ;
11 [label="11: UnaryOperator \n n$5=*&stop:_Bool * [line 15]\n " shape="box"]
11 [label="11: UnaryOperator \n n$6=*&stop:_Bool * [line 15]\n " shape="box"]
11 -> 12 ;
@ -173,20 +173,20 @@ digraph iCFG {
10 -> 6 ;
9 [label="9: Prune (false branch) \n PRUNE(((n$2 < n$3) == 0), false); [line 15]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"]
9 [label="9: Prune (false branch) \n PRUNE(((n$3 < n$4) == 0), false); [line 15]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"]
9 -> 3 ;
8 [label="8: Prune (true branch) \n PRUNE(((n$2 < n$3) != 0), true); [line 15]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 15]\n " shape="invhouse"]
8 [label="8: Prune (true branch) \n PRUNE(((n$3 < n$4) != 0), true); [line 15]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 15]\n " shape="invhouse"]
8 -> 15 ;
7 [label="7: BinaryOperatorStmt: LT \n n$2=*&idx:unsigned long [line 15]\n n$4=*&objects:class NSArray * [line 15]\n n$3=_fun_NSArray_count(n$4:class NSArray *) virtual [line 15]\n " shape="box"]
7 [label="7: BinaryOperatorStmt: LT \n n$3=*&idx:unsigned long [line 15]\n n$5=*&objects:class NSArray * [line 15]\n n$4=_fun_NSArray_count(n$5:class NSArray *) virtual [line 15]\n " shape="box"]
7 -> 8 ;
7 -> 9 ;
6 [label="6: UnaryOperator \n n$1=*&idx:unsigned long [line 15]\n *&idx:unsigned long =(n$1 + 1) [line 15]\n REMOVE_TEMPS(n$1); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
6 [label="6: UnaryOperator \n n$2=*&idx:unsigned long [line 15]\n *&idx:unsigned long =(n$2 + 1) [line 15]\n REMOVE_TEMPS(n$2); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
6 -> 4 ;
@ -198,7 +198,7 @@ digraph iCFG {
4 -> 7 ;
3 [label="3: Call _fun_free \n n$0=*&stop:_Bool * [line 15]\n _fun_free(n$0:void ) [line 15]\n NULLIFY(&object,true); [line 15]\n NULLIFY(&idx,true); [line 15]\n NULLIFY(&stop,true); [line 15]\n NULLIFY(&objects,true); [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&__objc_anonymous_block_MyBlock_array______1,true); [line 15]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,true); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
3 [label="3: Call _fun_free \n n$0=*&stop:_Bool * [line 15]\n n$1=_fun_free(n$0:void *) [line 15]\n NULLIFY(&object,true); [line 15]\n NULLIFY(&idx,true); [line 15]\n NULLIFY(&stop,true); [line 15]\n NULLIFY(&objects,true); [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&__objc_anonymous_block_MyBlock_array______1,true); [line 15]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,true); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"]
3 -> 2 ;

@ -29,7 +29,7 @@ digraph iCFG {
23 -> 30 ;
19 [label="19: Return Stmt \n n$12=*&self:class A * [line 14]\n n$13=*n$12._x:int [line 14]\n *&return:int =n$13 [line 14]\n REMOVE_TEMPS(n$12,n$13); [line 14]\n NULLIFY(&self,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"]
19 [label="19: Return Stmt \n n$13=*&self:class A * [line 14]\n n$14=*n$13._x:int [line 14]\n *&return:int =n$14 [line 14]\n REMOVE_TEMPS(n$13,n$14); [line 14]\n NULLIFY(&self,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"]
19 -> 18 ;
@ -40,7 +40,7 @@ digraph iCFG {
17 -> 19 ;
16 [label="16: BinaryOperatorStmt: Assign \n n$10=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 41]\n n$8=_fun_A_init(n$10:class A *) virtual [line 41]\n *&#GB$A_trans_SI_sharedInstance:struct objc_object *=n$8 [line 41]\n REMOVE_TEMPS(n$8,n$10); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"]
16 [label="16: BinaryOperatorStmt: Assign \n n$11=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 41]\n n$9=_fun_A_init(n$11:class A *) virtual [line 41]\n *&#GB$A_trans_SI_sharedInstance:struct objc_object *=n$9 [line 41]\n REMOVE_TEMPS(n$9,n$11); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"]
16 -> 15 ;
@ -51,15 +51,15 @@ digraph iCFG {
14 -> 16 ;
13 [label="13: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_trans_SI______2); [line 40]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_trans_SI______2 ):unsigned long ) [line 40]\n *&__objc_anonymous_block_A_trans_SI______2:class __objc_anonymous_block_A_trans_SI______2 =n$11 [line 40]\n *&dummy_block:_fn_ (*)=(_fun___objc_anonymous_block_A_trans_SI______2) [line 40]\n REMOVE_TEMPS(n$11); [line 40]\n " shape="box"]
13 [label="13: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_trans_SI______2); [line 40]\n n$12=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_trans_SI______2 ):unsigned long ) [line 40]\n *&__objc_anonymous_block_A_trans_SI______2:class __objc_anonymous_block_A_trans_SI______2 =n$12 [line 40]\n *&dummy_block:_fn_ (*)=(_fun___objc_anonymous_block_A_trans_SI______2) [line 40]\n REMOVE_TEMPS(n$12); [line 40]\n " shape="box"]
13 -> 12 ;
12 [label="12: Call n$7 \n n$7=*&dummy_block:_fn_ (*) [line 43]\n n$7() [line 43]\n REMOVE_TEMPS(n$7); [line 43]\n NULLIFY(&dummy_block,false); [line 43]\n " shape="box"]
12 [label="12: Call n$8 \n n$8=*&dummy_block:_fn_ (*) [line 43]\n n$8() [line 43]\n REMOVE_TEMPS(n$8); [line 43]\n NULLIFY(&dummy_block,false); [line 43]\n " shape="box"]
12 -> 11 ;
11 [label="11: Return Stmt \n n$6=*&#GB$A_trans_SI_sharedInstance:struct objc_object * [line 44]\n *&return:struct objc_object *=n$6 [line 44]\n REMOVE_TEMPS(n$6); [line 44]\n NULLIFY(&__objc_anonymous_block_A_trans_SI______2,true); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"]
11 [label="11: Return Stmt \n n$7=*&#GB$A_trans_SI_sharedInstance:struct objc_object * [line 44]\n *&return:struct objc_object *=n$7 [line 44]\n REMOVE_TEMPS(n$7); [line 44]\n NULLIFY(&__objc_anonymous_block_A_trans_SI______2,true); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"]
11 -> 10 ;
@ -70,7 +70,7 @@ digraph iCFG {
9 -> 13 ;
8 [label="8: BinaryOperatorStmt: Assign \n n$4=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 29]\n n$2=_fun_A_init(n$4:class A *) virtual [line 29]\n *&#GB$A_sharedInstance_sharedInstance:struct objc_object *=n$2 [line 29]\n REMOVE_TEMPS(n$2,n$4); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"]
8 [label="8: BinaryOperatorStmt: Assign \n n$5=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 29]\n n$3=_fun_A_init(n$5:class A *) virtual [line 29]\n *&#GB$A_sharedInstance_sharedInstance:struct objc_object *=n$3 [line 29]\n REMOVE_TEMPS(n$3,n$5); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"]
8 -> 7 ;
@ -81,11 +81,11 @@ digraph iCFG {
6 -> 8 ;
5 [label="5: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_sharedInstance______1); [line 30]\n DECLARE_LOCALS(&__objc_anonymous_block_A_sharedInstance______1); [line 28]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_sharedInstance______1 ):unsigned long ) [line 28]\n *&__objc_anonymous_block_A_sharedInstance______1:class __objc_anonymous_block_A_sharedInstance______1 =n$5 [line 28]\n *&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*)=(_fun___objc_anonymous_block_A_sharedInstance______1) [line 30]\n REMOVE_TEMPS(n$5); [line 30]\n " shape="box"]
5 [label="5: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_sharedInstance______1); [line 30]\n DECLARE_LOCALS(&__objc_anonymous_block_A_sharedInstance______1); [line 28]\n n$6=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_sharedInstance______1 ):unsigned long ) [line 28]\n *&__objc_anonymous_block_A_sharedInstance______1:class __objc_anonymous_block_A_sharedInstance______1 =n$6 [line 28]\n *&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*)=(_fun___objc_anonymous_block_A_sharedInstance______1) [line 30]\n REMOVE_TEMPS(n$6); [line 30]\n " shape="box"]
5 -> 4 ;
4 [label="4: Call n$1 \n n$1=*&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*) [line 30]\n n$1() [line 30]\n REMOVE_TEMPS(n$1); [line 30]\n NULLIFY(&infer___objc_anonymous_block_A_sharedInstance______1,true); [line 30]\n " shape="box"]
4 [label="4: Call n$1 \n n$1=*&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*) [line 30]\n n$2=n$1() [line 30]\n REMOVE_TEMPS(n$1,n$2); [line 30]\n NULLIFY(&infer___objc_anonymous_block_A_sharedInstance______1,true); [line 30]\n " shape="box"]
4 -> 3 ;

@ -3,11 +3,11 @@ digraph iCFG {
60 -> 55 ;
59 [label="59: BinaryOperatorStmt: Assign \n n$46=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 71]\n n$44=_fun_A_init(n$46:class A *) virtual [line 71]\n *&#GB$A_dispatch_barrier_example_a:class A *=n$44 [line 71]\n REMOVE_TEMPS(n$44,n$46); [line 71]\n " shape="box"]
59 [label="59: BinaryOperatorStmt: Assign \n n$52=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 71]\n n$50=_fun_A_init(n$52:class A *) virtual [line 71]\n *&#GB$A_dispatch_barrier_example_a:class A *=n$50 [line 71]\n REMOVE_TEMPS(n$50,n$52); [line 71]\n " shape="box"]
59 -> 58 ;
58 [label="58: BinaryOperatorStmt: Assign \n n$43=*&#GB$A_dispatch_barrier_example_a:class A * [line 72]\n *n$43.x:int =10 [line 72]\n REMOVE_TEMPS(n$43); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"]
58 [label="58: BinaryOperatorStmt: Assign \n n$49=*&#GB$A_dispatch_barrier_example_a:class A * [line 72]\n *n$49.x:int =10 [line 72]\n REMOVE_TEMPS(n$49); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"]
58 -> 57 ;
@ -18,15 +18,15 @@ digraph iCFG {
56 -> 59 ;
55 [label="55: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_barrier_example______6); [line 70]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_barrier_example______6); [line 70]\n n$47=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_barrier_example______6 ):unsigned long ) [line 70]\n *&__objc_anonymous_block_A_dispatch_barrier_example______6:class __objc_anonymous_block_A_dispatch_barrier_example______6 =n$47 [line 70]\n *&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_barrier_example______6) [line 70]\n REMOVE_TEMPS(n$47); [line 70]\n " shape="box"]
55 [label="55: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_barrier_example______6); [line 70]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_barrier_example______6); [line 70]\n n$53=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_barrier_example______6 ):unsigned long ) [line 70]\n *&__objc_anonymous_block_A_dispatch_barrier_example______6:class __objc_anonymous_block_A_dispatch_barrier_example______6 =n$53 [line 70]\n *&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_barrier_example______6) [line 70]\n REMOVE_TEMPS(n$53); [line 70]\n " shape="box"]
55 -> 54 ;
54 [label="54: Call n$42 \n n$42=*&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*) [line 70]\n n$42() [line 70]\n REMOVE_TEMPS(n$42); [line 70]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_barrier_example______6,true); [line 70]\n " shape="box"]
54 [label="54: Call n$47 \n n$47=*&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*) [line 70]\n n$48=n$47() [line 70]\n REMOVE_TEMPS(n$47,n$48); [line 70]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_barrier_example______6,true); [line 70]\n " shape="box"]
54 -> 53 ;
53 [label="53: Return Stmt \n n$40=*&#GB$A_dispatch_barrier_example_a:class A * [line 74]\n n$41=*n$40.x:int [line 74]\n *&return:int =n$41 [line 74]\n REMOVE_TEMPS(n$40,n$41); [line 74]\n NULLIFY(&__objc_anonymous_block_A_dispatch_barrier_example______6,true); [line 74]\n APPLY_ABSTRACTION; [line 74]\n " shape="box"]
53 [label="53: Return Stmt \n n$45=*&#GB$A_dispatch_barrier_example_a:class A * [line 74]\n n$46=*n$45.x:int [line 74]\n *&return:int =n$46 [line 74]\n REMOVE_TEMPS(n$45,n$46); [line 74]\n NULLIFY(&__objc_anonymous_block_A_dispatch_barrier_example______6,true); [line 74]\n APPLY_ABSTRACTION; [line 74]\n " shape="box"]
53 -> 52 ;
@ -41,11 +41,11 @@ digraph iCFG {
50 -> 45 ;
49 [label="49: BinaryOperatorStmt: Assign \n n$38=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 62]\n n$36=_fun_A_init(n$38:class A *) virtual [line 62]\n *&#GB$A_dispatch_group_notify_example_a:class A *=n$36 [line 62]\n REMOVE_TEMPS(n$36,n$38); [line 62]\n " shape="box"]
49 [label="49: BinaryOperatorStmt: Assign \n n$43=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 62]\n n$41=_fun_A_init(n$43:class A *) virtual [line 62]\n *&#GB$A_dispatch_group_notify_example_a:class A *=n$41 [line 62]\n REMOVE_TEMPS(n$41,n$43); [line 62]\n " shape="box"]
49 -> 48 ;
48 [label="48: BinaryOperatorStmt: Assign \n n$35=*&#GB$A_dispatch_group_notify_example_a:class A * [line 63]\n *n$35.x:int =10 [line 63]\n REMOVE_TEMPS(n$35); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"]
48 [label="48: BinaryOperatorStmt: Assign \n n$40=*&#GB$A_dispatch_group_notify_example_a:class A * [line 63]\n *n$40.x:int =10 [line 63]\n REMOVE_TEMPS(n$40); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"]
48 -> 47 ;
@ -56,15 +56,15 @@ digraph iCFG {
46 -> 49 ;
45 [label="45: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5); [line 61]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_notify_example______5); [line 61]\n n$39=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_notify_example______5 ):unsigned long ) [line 61]\n *&__objc_anonymous_block_A_dispatch_group_notify_example______5:class __objc_anonymous_block_A_dispatch_group_notify_example______5 =n$39 [line 61]\n *&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_notify_example______5) [line 61]\n REMOVE_TEMPS(n$39); [line 61]\n " shape="box"]
45 [label="45: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5); [line 61]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_notify_example______5); [line 61]\n n$44=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_notify_example______5 ):unsigned long ) [line 61]\n *&__objc_anonymous_block_A_dispatch_group_notify_example______5:class __objc_anonymous_block_A_dispatch_group_notify_example______5 =n$44 [line 61]\n *&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_notify_example______5) [line 61]\n REMOVE_TEMPS(n$44); [line 61]\n " shape="box"]
45 -> 44 ;
44 [label="44: Call n$34 \n n$34=*&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*) [line 61]\n n$34() [line 61]\n REMOVE_TEMPS(n$34); [line 61]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5,true); [line 61]\n " shape="box"]
44 [label="44: Call n$38 \n n$38=*&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*) [line 61]\n n$39=n$38() [line 61]\n REMOVE_TEMPS(n$38,n$39); [line 61]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5,true); [line 61]\n " shape="box"]
44 -> 43 ;
43 [label="43: Return Stmt \n n$32=*&#GB$A_dispatch_group_notify_example_a:class A * [line 65]\n n$33=*n$32.x:int [line 65]\n *&return:int =n$33 [line 65]\n REMOVE_TEMPS(n$32,n$33); [line 65]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_notify_example______5,true); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"]
43 [label="43: Return Stmt \n n$36=*&#GB$A_dispatch_group_notify_example_a:class A * [line 65]\n n$37=*n$36.x:int [line 65]\n *&return:int =n$37 [line 65]\n REMOVE_TEMPS(n$36,n$37); [line 65]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_notify_example______5,true); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"]
43 -> 42 ;
@ -79,11 +79,11 @@ digraph iCFG {
40 -> 35 ;
39 [label="39: BinaryOperatorStmt: Assign \n n$30=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 53]\n n$28=_fun_A_init(n$30:class A *) virtual [line 53]\n *&#GB$A_dispatch_group_example_a:class A *=n$28 [line 53]\n REMOVE_TEMPS(n$28,n$30); [line 53]\n " shape="box"]
39 [label="39: BinaryOperatorStmt: Assign \n n$34=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 53]\n n$32=_fun_A_init(n$34:class A *) virtual [line 53]\n *&#GB$A_dispatch_group_example_a:class A *=n$32 [line 53]\n REMOVE_TEMPS(n$32,n$34); [line 53]\n " shape="box"]
39 -> 38 ;
38 [label="38: BinaryOperatorStmt: Assign \n n$27=*&#GB$A_dispatch_group_example_a:class A * [line 54]\n *n$27.x:int =10 [line 54]\n REMOVE_TEMPS(n$27); [line 54]\n APPLY_ABSTRACTION; [line 54]\n " shape="box"]
38 [label="38: BinaryOperatorStmt: Assign \n n$31=*&#GB$A_dispatch_group_example_a:class A * [line 54]\n *n$31.x:int =10 [line 54]\n REMOVE_TEMPS(n$31); [line 54]\n APPLY_ABSTRACTION; [line 54]\n " shape="box"]
38 -> 37 ;
@ -94,15 +94,15 @@ digraph iCFG {
36 -> 39 ;
35 [label="35: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_group_example______4); [line 52]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_example______4); [line 52]\n n$31=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_example______4 ):unsigned long ) [line 52]\n *&__objc_anonymous_block_A_dispatch_group_example______4:class __objc_anonymous_block_A_dispatch_group_example______4 =n$31 [line 52]\n *&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_example______4) [line 52]\n REMOVE_TEMPS(n$31); [line 52]\n " shape="box"]
35 [label="35: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_group_example______4); [line 52]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_example______4); [line 52]\n n$35=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_example______4 ):unsigned long ) [line 52]\n *&__objc_anonymous_block_A_dispatch_group_example______4:class __objc_anonymous_block_A_dispatch_group_example______4 =n$35 [line 52]\n *&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_example______4) [line 52]\n REMOVE_TEMPS(n$35); [line 52]\n " shape="box"]
35 -> 34 ;
34 [label="34: Call n$26 \n n$26=*&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*) [line 52]\n n$26() [line 52]\n REMOVE_TEMPS(n$26); [line 52]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_example______4,true); [line 52]\n " shape="box"]
34 [label="34: Call n$29 \n n$29=*&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*) [line 52]\n n$30=n$29() [line 52]\n REMOVE_TEMPS(n$29,n$30); [line 52]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_example______4,true); [line 52]\n " shape="box"]
34 -> 33 ;
33 [label="33: Return Stmt \n n$24=*&#GB$A_dispatch_group_example_a:class A * [line 56]\n n$25=*n$24.x:int [line 56]\n *&return:int =n$25 [line 56]\n REMOVE_TEMPS(n$24,n$25); [line 56]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_example______4,true); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"]
33 [label="33: Return Stmt \n n$27=*&#GB$A_dispatch_group_example_a:class A * [line 56]\n n$28=*n$27.x:int [line 56]\n *&return:int =n$28 [line 56]\n REMOVE_TEMPS(n$27,n$28); [line 56]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_example______4,true); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"]
33 -> 32 ;
@ -117,11 +117,11 @@ digraph iCFG {
30 -> 25 ;
29 [label="29: BinaryOperatorStmt: Assign \n n$22=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 44]\n n$20=_fun_A_init(n$22:class A *) virtual [line 44]\n *&#GB$A_dispatch_after_example_a:class A *=n$20 [line 44]\n REMOVE_TEMPS(n$20,n$22); [line 44]\n " shape="box"]
29 [label="29: BinaryOperatorStmt: Assign \n n$25=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 44]\n n$23=_fun_A_init(n$25:class A *) virtual [line 44]\n *&#GB$A_dispatch_after_example_a:class A *=n$23 [line 44]\n REMOVE_TEMPS(n$23,n$25); [line 44]\n " shape="box"]
29 -> 28 ;
28 [label="28: BinaryOperatorStmt: Assign \n n$19=*&#GB$A_dispatch_after_example_a:class A * [line 45]\n *n$19.x:int =10 [line 45]\n REMOVE_TEMPS(n$19); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"]
28 [label="28: BinaryOperatorStmt: Assign \n n$22=*&#GB$A_dispatch_after_example_a:class A * [line 45]\n *n$22.x:int =10 [line 45]\n REMOVE_TEMPS(n$22); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"]
28 -> 27 ;
@ -132,15 +132,15 @@ digraph iCFG {
26 -> 29 ;
25 [label="25: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_after_example______3); [line 42]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 43]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):unsigned long ) [line 43]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$23 [line 43]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 42]\n REMOVE_TEMPS(n$23); [line 42]\n " shape="box"]
25 [label="25: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_after_example______3); [line 42]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 43]\n n$26=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):unsigned long ) [line 43]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$26 [line 43]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 42]\n REMOVE_TEMPS(n$26); [line 42]\n " shape="box"]
25 -> 24 ;
24 [label="24: Call n$18 \n n$18=*&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*) [line 42]\n n$18() [line 42]\n REMOVE_TEMPS(n$18); [line 42]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_after_example______3,true); [line 42]\n " shape="box"]
24 [label="24: Call n$20 \n n$20=*&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*) [line 42]\n n$21=n$20() [line 42]\n REMOVE_TEMPS(n$20,n$21); [line 42]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_after_example______3,true); [line 42]\n " shape="box"]
24 -> 23 ;
23 [label="23: Return Stmt \n n$16=*&#GB$A_dispatch_after_example_a:class A * [line 47]\n n$17=*n$16.x:int [line 47]\n *&return:int =n$17 [line 47]\n REMOVE_TEMPS(n$16,n$17); [line 47]\n NULLIFY(&__objc_anonymous_block_A_dispatch_after_example______3,true); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"]
23 [label="23: Return Stmt \n n$18=*&#GB$A_dispatch_after_example_a:class A * [line 47]\n n$19=*n$18.x:int [line 47]\n *&return:int =n$19 [line 47]\n REMOVE_TEMPS(n$18,n$19); [line 47]\n NULLIFY(&__objc_anonymous_block_A_dispatch_after_example______3,true); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"]
23 -> 22 ;
@ -155,11 +155,11 @@ digraph iCFG {
20 -> 15 ;
19 [label="19: BinaryOperatorStmt: Assign \n n$14=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 34]\n n$12=_fun_A_init(n$14:class A *) virtual [line 34]\n *&#GB$A_dispatch_async_example_a:class A *=n$12 [line 34]\n REMOVE_TEMPS(n$12,n$14); [line 34]\n " shape="box"]
19 [label="19: BinaryOperatorStmt: Assign \n n$16=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 34]\n n$14=_fun_A_init(n$16:class A *) virtual [line 34]\n *&#GB$A_dispatch_async_example_a:class A *=n$14 [line 34]\n REMOVE_TEMPS(n$14,n$16); [line 34]\n " shape="box"]
19 -> 18 ;
18 [label="18: BinaryOperatorStmt: Assign \n n$11=*&#GB$A_dispatch_async_example_a:class A * [line 35]\n *n$11.x:int =10 [line 35]\n REMOVE_TEMPS(n$11); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"]
18 [label="18: BinaryOperatorStmt: Assign \n n$13=*&#GB$A_dispatch_async_example_a:class A * [line 35]\n *n$13.x:int =10 [line 35]\n REMOVE_TEMPS(n$13); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"]
18 -> 17 ;
@ -170,15 +170,15 @@ digraph iCFG {
16 -> 19 ;
15 [label="15: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_async_example______2); [line 33]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_async_example______2); [line 33]\n n$15=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_async_example______2 ):unsigned long ) [line 33]\n *&__objc_anonymous_block_A_dispatch_async_example______2:class __objc_anonymous_block_A_dispatch_async_example______2 =n$15 [line 33]\n *&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_async_example______2) [line 33]\n REMOVE_TEMPS(n$15); [line 33]\n " shape="box"]
15 [label="15: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_async_example______2); [line 33]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_async_example______2); [line 33]\n n$17=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_async_example______2 ):unsigned long ) [line 33]\n *&__objc_anonymous_block_A_dispatch_async_example______2:class __objc_anonymous_block_A_dispatch_async_example______2 =n$17 [line 33]\n *&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_async_example______2) [line 33]\n REMOVE_TEMPS(n$17); [line 33]\n " shape="box"]
15 -> 14 ;
14 [label="14: Call n$10 \n n$10=*&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*) [line 33]\n n$10() [line 33]\n REMOVE_TEMPS(n$10); [line 33]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_async_example______2,true); [line 33]\n " shape="box"]
14 [label="14: Call n$11 \n n$11=*&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*) [line 33]\n n$12=n$11() [line 33]\n REMOVE_TEMPS(n$11,n$12); [line 33]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_async_example______2,true); [line 33]\n " shape="box"]
14 -> 13 ;
13 [label="13: Return Stmt \n n$8=*&#GB$A_dispatch_async_example_a:class A * [line 37]\n n$9=*n$8.x:int [line 37]\n *&return:int =n$9 [line 37]\n REMOVE_TEMPS(n$8,n$9); [line 37]\n NULLIFY(&__objc_anonymous_block_A_dispatch_async_example______2,true); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"]
13 [label="13: Return Stmt \n n$9=*&#GB$A_dispatch_async_example_a:class A * [line 37]\n n$10=*n$9.x:int [line 37]\n *&return:int =n$10 [line 37]\n REMOVE_TEMPS(n$9,n$10); [line 37]\n NULLIFY(&__objc_anonymous_block_A_dispatch_async_example______2,true); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"]
13 -> 12 ;
@ -193,11 +193,11 @@ digraph iCFG {
10 -> 5 ;
9 [label="9: BinaryOperatorStmt: Assign \n n$6=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 25]\n n$4=_fun_A_init(n$6:class A *) virtual [line 25]\n *&#GB$A_dispatch_once_example_a:class A *=n$4 [line 25]\n REMOVE_TEMPS(n$4,n$6); [line 25]\n " shape="box"]
9 [label="9: BinaryOperatorStmt: Assign \n n$7=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 25]\n n$5=_fun_A_init(n$7:class A *) virtual [line 25]\n *&#GB$A_dispatch_once_example_a:class A *=n$5 [line 25]\n REMOVE_TEMPS(n$5,n$7); [line 25]\n " shape="box"]
9 -> 8 ;
8 [label="8: BinaryOperatorStmt: Assign \n n$3=*&#GB$A_dispatch_once_example_a:class A * [line 26]\n *n$3.x:int =10 [line 26]\n REMOVE_TEMPS(n$3); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
8 [label="8: BinaryOperatorStmt: Assign \n n$4=*&#GB$A_dispatch_once_example_a:class A * [line 26]\n *n$4.x:int =10 [line 26]\n REMOVE_TEMPS(n$4); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
8 -> 7 ;
@ -208,11 +208,11 @@ digraph iCFG {
6 -> 9 ;
5 [label="5: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_once_example______1); [line 23]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 24]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):unsigned long ) [line 24]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$7 [line 24]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 23]\n REMOVE_TEMPS(n$7); [line 23]\n " shape="box"]
5 [label="5: DeclStmt \n DECLARE_LOCALS(&infer___objc_anonymous_block_A_dispatch_once_example______1); [line 23]\n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 24]\n n$8=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):unsigned long ) [line 24]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$8 [line 24]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 23]\n REMOVE_TEMPS(n$8); [line 23]\n " shape="box"]
5 -> 4 ;
4 [label="4: Call n$2 \n n$2=*&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) [line 23]\n n$2() [line 23]\n REMOVE_TEMPS(n$2); [line 23]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,true); [line 23]\n " shape="box"]
4 [label="4: Call n$2 \n n$2=*&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) [line 23]\n n$3=n$2() [line 23]\n REMOVE_TEMPS(n$2,n$3); [line 23]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,true); [line 23]\n " shape="box"]
4 -> 3 ;

@ -0,0 +1,62 @@
/*
* Copyright (c) 2013 - 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.
*/
package endtoend.objc;
import static org.hamcrest.MatcherAssert.assertThat;
import static utils.matchers.ResultContainsErrorInMethod.contains;
import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain;
import com.google.common.collect.ImmutableList;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import java.io.IOException;
import utils.DebuggableTemporaryFolder;
import utils.InferException;
import utils.InferResults;
import utils.InferRunner;
public class NoMemoryLeakBlockIteratorTest {
public static final String block_file =
"infer/tests/codetoanalyze/objc/frontend/block/block-it.m";
private static ImmutableList<String> inferCmd;
public static final String MEMORY_LEAK = "MEMORY_LEAK";
@ClassRule
public static DebuggableTemporaryFolder folder = new DebuggableTemporaryFolder();
@BeforeClass
public static void runInfer() throws InterruptedException, IOException {
inferCmd = InferRunner.createObjCInferCommandWithMLBuckets(
folder,
block_file,
"cf",
false);
}
@Test
public void whenInferRunsOnLayoutSubviewsThenMLIsNotFound()
throws InterruptedException, IOException, InferException {
InferResults inferResults = InferRunner.runInferObjC(inferCmd);
assertThat(
"Results should not contain memory leak",
inferResults,
doesNotContain(
MEMORY_LEAK,
block_file,
"array"));
}
}
Loading…
Cancel
Save