[objc] Fix bad footprint caused by incorrect translation of blocks as arguments

Reviewed By: jvillard

Differential Revision: D6171999

fbshipit-source-id: 25d5b61
master
Dulma Churchill 7 years ago committed by Facebook Github Bot
parent 38804101d9
commit 3a3e1893d6

@ -98,33 +98,6 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s
false
(* From a list of expression extract blocks from tuples and *)
(* returns block names and assignment to temp vars *)
let extract_block_from_tuple procname exps loc =
let insts = ref [] in
let make_function_name typ bn =
let bn' = Typ.Procname.to_string bn in
let bn'' = Mangled.from_string bn' in
let block = Exp.Lvar (Pvar.mk bn'' procname) in
let id = Ident.create_fresh Ident.knormal in
insts := Sil.Load (id, block, typ, loc) :: !insts ;
(Exp.Var id, typ)
in
let make_arg typ (id, _, _) = (id, typ) in
let f = function
| Exp.Closure {name; captured_vars}, ({Typ.desc= Tptr ({Typ.desc= Tfun _}, _)} as t) ->
let function_name = make_function_name t name in
let args = List.map ~f:(make_arg t) captured_vars in
function_name :: args
| e ->
[e]
in
(* evaluation order matters here *)
let exps' = List.concat_map ~f exps in
let insts' = !insts in
(exps', insts')
let collect_exprs res_trans_list =
List.concat_map ~f:(fun res_trans -> res_trans.exps) res_trans_list
@ -1276,19 +1249,15 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s
CMethod_trans.equal_method_call_type method_call_type CMethod_trans.MCVirtual
in
Cg.add_edge context.CContext.cg procname callee_name ;
let param_exps, instr_block_param =
extract_block_from_tuple procname subexpr_exprs sil_loc
in
let res_trans_block = {empty_res_trans with instrs= instr_block_param} in
let call_flags = {CallFlags.default with CallFlags.cf_virtual= is_virtual} in
let method_sil = Exp.Const (Const.Cfun callee_name) in
let res_trans_call =
create_call_instr trans_state method_type method_sil param_exps sil_loc call_flags
create_call_instr trans_state method_type method_sil subexpr_exprs sil_loc call_flags
~is_objc_method:true
in
let selector = obj_c_message_expr_info.Clang_ast_t.omei_selector in
let nname = "Message Call: " ^ selector in
let all_res_trans = res_trans_subexpr_list @ [res_trans_block; res_trans_call] in
let all_res_trans = res_trans_subexpr_list @ [res_trans_call] in
let res_trans_to_parent =
PriorityNode.compute_results_to_parent trans_state_pri sil_loc nname si all_res_trans
in

@ -77,6 +77,7 @@ SOURCES_BUCKET_ALL = \
shared/block/block_no_args.m \
shared/block/block_release.m \
shared/block/dispatch_in_macro.m \
shared/block/Blocks_as_parameters.m \
shared/category_procdesc/main.c \
shared/field_superclass/SuperExample.m \
shared/npe/npe_malloc.m \

@ -3,7 +3,7 @@ codetoanalyze/objc/errors/global_const/global_const.m, SimpleRoot_doSomethingBad
codetoanalyze/objc/errors/global_const/global_const.m, SimpleRoot_doSomethingOkWithDict:andString:, 3, NULL_DEREFERENCE, [start of procedure doSomethingOkWithDict:andString:,Message stringByAppendingString: with receiver nil returns nil.]
codetoanalyze/objc/errors/initialization/compound_literal.c, init_with_compound_literal, 2, DIVIDE_BY_ZERO, [start of procedure init_with_compound_literal()]
codetoanalyze/objc/errors/memory_leaks_benchmark/CADisplayLinkRetainCycle.m, testCycle, 3, RETAIN_CYCLE, [start of procedure testCycle(),start of procedure init,return from a call to CADisplay_init]
codetoanalyze/objc/errors/memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSVycleStaticVar, 2, MEMORY_LEAK, [start of procedure RetainCSVycleStaticVar(),start of procedure init,return from a call to RetainCSV_init,Skipping foo: function or method not found]
codetoanalyze/objc/errors/memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSVycleStaticVar, 2, MEMORY_LEAK, [start of procedure RetainCSVycleStaticVar(),start of procedure init,return from a call to RetainCSV_init,start of procedure foo,start of procedure block,start of procedure init,return from a call to RetainCSV_init,return from a call to objc_blockRetainCSV_foo_3,start of procedure block,start of procedure init,return from a call to RetainCSV_init,return from a call to objc_blockRetainCSV_foo_2,return from a call to RetainCSV_foo]
codetoanalyze/objc/errors/npe/blockenum.m, BlockEnumA_allResultsList:, 1, MEMORY_LEAK, [start of procedure allResultsList:,Skipping init: function or method not found]
codetoanalyze/objc/errors/npe/blockenum.m, BlockEnumA_foo1:, 2, MEMORY_LEAK, [start of procedure foo1:,Skipping init: function or method not found]
codetoanalyze/objc/errors/npe/nil_param.m, NilParamMain, 4, MEMORY_LEAK, [start of procedure NilParamMain(),start of procedure test1:,Message test2 with receiver nil returns nil.,return from a call to NilParamA_test1:,Skipping release: function or method not found]

@ -23,6 +23,7 @@ SOURCES = \
../types/void_call.m \
../vardecl/initlist.m \
../shared/block/BlockVar.m \
../shared/block/Blocks_as_parameters.m \
../shared/memory_leaks_benchmark/ArcExample.m \
../shared/memory_leaks_benchmark/arc_methods.m \
../shared/npe/Available_expr.m \

@ -41,11 +41,11 @@ digraph iCFG {
"capture#A#instance.d411336575e4bf632a1828f5f5979726_2" [label="2: Exit A_capture \n " color=yellow style=filled]
"capture#A#instance.d411336575e4bf632a1828f5f5979726_3" [label="3: Message Call: sHandler: \n n$0=*&self:A* [line 47, column 4]\n n$1=*n$0._b:B* [line 47, column 4]\n n$2=*&self:A* [line 47, column 16]\n n$5=*&objc_blockA_capture_1:_fn_(*) [line 47, column 3]\n _fun_B_sHandler:(n$1:B*,n$5:_fn_(*),n$2:_fn_(*)) virtual [line 47, column 3]\n " shape="box"]
"capture#A#instance.d411336575e4bf632a1828f5f5979726_3" [label="3: Message Call: sHandler: \n n$0=*&self:A* [line 47, column 4]\n n$1=*n$0._b:B* [line 47, column 4]\n n$2=*&self:A* [line 47, column 16]\n _fun_B_sHandler:(n$1:B*,(_fun_objc_blockA_capture_1,n$2):_fn_(*)) virtual [line 47, column 3]\n " shape="box"]
"capture#A#instance.d411336575e4bf632a1828f5f5979726_3" -> "capture#A#instance.d411336575e4bf632a1828f5f5979726_2" ;
"capture#A#instance.d411336575e4bf632a1828f5f5979726_4" [label="4: BinaryOperatorStmt: Assign \n n$6=*&self:A* [line 46, column 3]\n n$7=_fun___objc_alloc_no_fail(sizeof(t=B):unsigned long) [line 46, column 8]\n *n$6._b:B*=n$7 [line 46, column 3]\n " shape="box"]
"capture#A#instance.d411336575e4bf632a1828f5f5979726_4" [label="4: BinaryOperatorStmt: Assign \n n$5=*&self:A* [line 46, column 3]\n n$6=_fun___objc_alloc_no_fail(sizeof(t=B):unsigned long) [line 46, column 8]\n *n$5._b:B*=n$6 [line 46, column 3]\n " shape="box"]
"capture#A#instance.d411336575e4bf632a1828f5f5979726_4" -> "capture#A#instance.d411336575e4bf632a1828f5f5979726_3" ;

@ -0,0 +1,31 @@
/*
* 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 <Foundation/NSObject.h>
typedef void (^MyBlock)();
@interface B : NSObject {
int y;
int x;
int h;
}
+ (void)foo:(int)z and:(MyBlock)block;
@end
@implementation B
- (int)f {
[B foo:h
and:^{
self->x = 5;
}];
return self->y;
}
@end

@ -0,0 +1,29 @@
/* @generated */
digraph iCFG {
"f#B#instance.f1371ff5e7f410d3df6a2e71ff0a814e_1" [label="1: Start B_f\nFormals: self:B*\nLocals: \n DECLARE_LOCALS(&return); [line 24, column 1]\n " color=yellow style=filled]
"f#B#instance.f1371ff5e7f410d3df6a2e71ff0a814e_1" -> "f#B#instance.f1371ff5e7f410d3df6a2e71ff0a814e_4" ;
"f#B#instance.f1371ff5e7f410d3df6a2e71ff0a814e_2" [label="2: Exit B_f \n " color=yellow style=filled]
"f#B#instance.f1371ff5e7f410d3df6a2e71ff0a814e_3" [label="3: Return Stmt \n n$0=*&self:B* [line 29, column 10]\n n$1=*n$0.y:int [line 29, column 10]\n *&return:int=n$1 [line 29, column 3]\n " shape="box"]
"f#B#instance.f1371ff5e7f410d3df6a2e71ff0a814e_3" -> "f#B#instance.f1371ff5e7f410d3df6a2e71ff0a814e_2" ;
"f#B#instance.f1371ff5e7f410d3df6a2e71ff0a814e_4" [label="4: Message Call: foo:and: \n n$2=*&self:B* [line 25, column 10]\n n$3=*n$2.h:int [line 25, column 10]\n n$4=*&self:B* const [line 26, column 11]\n _fun_B_foo:and:(n$3:int,(_fun_objc_blockB_f_1,n$4):_fn_(*)) [line 25, column 3]\n " shape="box"]
"f#B#instance.f1371ff5e7f410d3df6a2e71ff0a814e_4" -> "f#B#instance.f1371ff5e7f410d3df6a2e71ff0a814e_3" ;
"objc_blockB_f_1.9ca2cd9875647cc0e2a4803d22445f9c_1" [label="1: Start objc_blockB_f_1\nFormals: self:B* const \nLocals: \nCaptured: self:B* const \n DECLARE_LOCALS(&return); [line 26, column 11]\n " color=yellow style=filled]
"objc_blockB_f_1.9ca2cd9875647cc0e2a4803d22445f9c_1" -> "objc_blockB_f_1.9ca2cd9875647cc0e2a4803d22445f9c_3" ;
"objc_blockB_f_1.9ca2cd9875647cc0e2a4803d22445f9c_2" [label="2: Exit objc_blockB_f_1 \n " color=yellow style=filled]
"objc_blockB_f_1.9ca2cd9875647cc0e2a4803d22445f9c_3" [label="3: BinaryOperatorStmt: Assign \n n$5=*&self:B* [line 27, column 9]\n *n$5.x:int=5 [line 27, column 9]\n " shape="box"]
"objc_blockB_f_1.9ca2cd9875647cc0e2a4803d22445f9c_3" -> "objc_blockB_f_1.9ca2cd9875647cc0e2a4803d22445f9c_2" ;
}

@ -44,15 +44,15 @@ digraph iCFG {
"objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_4" -> "objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_2" ;
"objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_5" [label="5: Prune (true branch) \n n$22=*&ShouldStop:int [line 44, column 13]\n PRUNE(n$22, true); [line 44, column 13]\n " shape="invhouse"]
"objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_5" [label="5: Prune (true branch) \n n$21=*&ShouldStop:int [line 44, column 13]\n PRUNE(n$21, true); [line 44, column 13]\n " shape="invhouse"]
"objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_5" -> "objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_7" ;
"objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_6" [label="6: Prune (false branch) \n n$22=*&ShouldStop:int [line 44, column 13]\n PRUNE(!n$22, false); [line 44, column 13]\n " shape="invhouse"]
"objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_6" [label="6: Prune (false branch) \n n$21=*&ShouldStop:int [line 44, column 13]\n PRUNE(!n$21, false); [line 44, column 13]\n " shape="invhouse"]
"objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_6" -> "objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_3" ;
"objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_7" [label="7: BinaryOperatorStmt: Assign \n n$23=*&stop:_Bool* [line 45, column 12]\n *n$23:_Bool=1 [line 45, column 11]\n " shape="box"]
"objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_7" [label="7: BinaryOperatorStmt: Assign \n n$22=*&stop:_Bool* [line 45, column 12]\n *n$22:_Bool=1 [line 45, column 11]\n " shape="box"]
"objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_7" -> "objc_blockMyBlock_array_trans_2.5153520a659dce1fe6582bd44cf47e84_3" ;
@ -63,11 +63,11 @@ digraph iCFG {
"array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_2" [label="2: Exit MyBlock_array \n " color=yellow style=filled]
"array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_3" [label="3: Message Call: enumerateObjectsUsingBlock: \n n$0=*&a:NSArray* [line 21, column 4]\n n$3=*&objc_blockMyBlock_array_1:_fn_(*) [line 21, column 3]\n _fun_NSArray_enumerateObjectsUsingBlock:(n$0:NSArray*,n$3:_fn_(*)) virtual [line 21, column 3]\n " shape="box"]
"array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_3" [label="3: Message Call: enumerateObjectsUsingBlock: \n n$0=*&a:NSArray* [line 21, column 4]\n _fun_NSArray_enumerateObjectsUsingBlock:(n$0:NSArray*,(_fun_objc_blockMyBlock_array_1):_fn_(*)) virtual [line 21, column 3]\n " shape="box"]
"array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_3" -> "array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_2" ;
"array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_4" [label="4: DeclStmt \n n$4=_fun___objc_alloc_no_fail(sizeof(t=NSArray):unsigned long) [line 20, column 17]\n n$5=_fun_NSArray_init(n$4:NSArray*) virtual [line 20, column 16]\n *&a:NSArray*=n$5 [line 20, column 3]\n " shape="box"]
"array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_4" [label="4: DeclStmt \n n$3=_fun___objc_alloc_no_fail(sizeof(t=NSArray):unsigned long) [line 20, column 17]\n n$4=_fun_NSArray_init(n$3:NSArray*) virtual [line 20, column 16]\n *&a:NSArray*=n$4 [line 20, column 3]\n " shape="box"]
"array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_4" -> "array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_3" ;
@ -78,7 +78,7 @@ digraph iCFG {
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_2" [label="2: Exit MyBlock_array_trans \n " color=yellow style=filled]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_3" [label="3: Call _fun_free \n n$6=*&stop:_Bool* [line 58, column 8]\n _fun_free(n$6:void*) [line 58, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_3" [label="3: Call _fun_free \n n$5=*&stop:_Bool* [line 58, column 8]\n _fun_free(n$5:void*) [line 58, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_3" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_2" ;
@ -90,20 +90,20 @@ digraph iCFG {
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_5" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_4" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_6" [label="6: UnaryOperator \n n$7=*&idx:unsigned long [line 51, column 49]\n *&idx:unsigned long=(n$7 + 1) [line 51, column 49]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_6" [label="6: UnaryOperator \n n$6=*&idx:unsigned long [line 51, column 49]\n *&idx:unsigned long=(n$6 + 1) [line 51, column 49]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_6" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_4" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_7" [label="7: BinaryOperatorStmt: LT \n n$8=*&idx:unsigned long [line 51, column 28]\n n$9=*&objects:NSArray* [line 51, column 34]\n n$10=_fun_NSArray_count(n$9:NSArray*) [line 51, column 42]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_7" [label="7: BinaryOperatorStmt: LT \n n$7=*&idx:unsigned long [line 51, column 28]\n n$8=*&objects:NSArray* [line 51, column 34]\n n$9=_fun_NSArray_count(n$8:NSArray*) [line 51, column 42]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_7" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_8" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_7" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_9" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_8" [label="8: Prune (true branch) \n PRUNE((n$8 < n$10), true); [line 51, column 28]\n " shape="invhouse"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_8" [label="8: Prune (true branch) \n PRUNE((n$7 < n$9), true); [line 51, column 28]\n " shape="invhouse"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_8" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_15" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_9" [label="9: Prune (false branch) \n PRUNE(!(n$8 < n$10), false); [line 51, column 28]\n " shape="invhouse"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_9" [label="9: Prune (false branch) \n PRUNE(!(n$7 < n$9), false); [line 51, column 28]\n " shape="invhouse"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_9" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_3" ;
@ -111,32 +111,32 @@ digraph iCFG {
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_10" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_6" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_11" [label="11: BinaryOperatorStmt: EQ \n n$11=*&stop:_Bool* [line 55, column 10]\n n$12=*n$11:_Bool [line 55, column 9]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_11" [label="11: BinaryOperatorStmt: EQ \n n$10=*&stop:_Bool* [line 55, column 10]\n n$11=*n$10:_Bool [line 55, column 9]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_11" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_12" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_11" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_13" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_12" [label="12: Prune (true branch) \n PRUNE((n$12 == 1), true); [line 55, column 9]\n " shape="invhouse"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_12" [label="12: Prune (true branch) \n PRUNE((n$11 == 1), true); [line 55, column 9]\n " shape="invhouse"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_12" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_3" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_13" [label="13: Prune (false branch) \n PRUNE(!(n$12 == 1), false); [line 55, column 9]\n " shape="invhouse"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_13" [label="13: Prune (false branch) \n PRUNE(!(n$11 == 1), false); [line 55, column 9]\n " shape="invhouse"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_13" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_10" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_14" [label="14: Call n$13 \n n$13=*&enumerateObjectsUsingBlock:_fn_(*) [line 54, column 5]\n n$14=*&object:objc_object* [line 54, column 32]\n n$15=*&idx:unsigned long [line 54, column 40]\n n$16=*&stop:_Bool* [line 54, column 45]\n n$13(n$14:objc_object*,n$15:unsigned long,n$16:_Bool*) [line 54, column 5]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_14" [label="14: Call n$12 \n n$12=*&enumerateObjectsUsingBlock:_fn_(*) [line 54, column 5]\n n$13=*&object:objc_object* [line 54, column 32]\n n$14=*&idx:unsigned long [line 54, column 40]\n n$15=*&stop:_Bool* [line 54, column 45]\n n$12(n$13:objc_object*,n$14:unsigned long,n$15:_Bool*) [line 54, column 5]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_14" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_11" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_15" [label="15: DeclStmt \n n$17=*&objects:NSArray* [line 53, column 17]\n n$18=*&idx:unsigned long [line 53, column 25]\n n$19=_fun_NSArray_objectAtIndexedSubscript:(n$17:NSArray*,n$18:unsigned long) virtual [line 53, column 17]\n *&object:objc_object*=n$19 [line 53, column 5]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_15" [label="15: DeclStmt \n n$16=*&objects:NSArray* [line 53, column 17]\n n$17=*&idx:unsigned long [line 53, column 25]\n n$18=_fun_NSArray_objectAtIndexedSubscript:(n$16:NSArray*,n$17:unsigned long) virtual [line 53, column 17]\n *&object:objc_object*=n$18 [line 53, column 5]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_15" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_14" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_16" [label="16: BinaryOperatorStmt: Assign \n n$20=*&stop:_Bool* [line 49, column 4]\n *n$20:_Bool=0 [line 49, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_16" [label="16: BinaryOperatorStmt: Assign \n n$19=*&stop:_Bool* [line 49, column 4]\n *n$19:_Bool=0 [line 49, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_16" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_5" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_17" [label="17: DeclStmt \n n$21=_fun_malloc_no_fail(sizeof(t=_Bool;nbytes=1):_Bool) [line 48, column 16]\n *&stop:_Bool*=n$21 [line 48, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_17" [label="17: DeclStmt \n n$20=_fun_malloc_no_fail(sizeof(t=_Bool;nbytes=1):_Bool) [line 48, column 16]\n *&stop:_Bool*=n$20 [line 48, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_17" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_16" ;
@ -144,11 +144,11 @@ digraph iCFG {
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_18" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_17" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_19" [label="19: DeclStmt \n n$24=*&a:NSArray* [line 36, column 22]\n *&objects:NSArray*=n$24 [line 36, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_19" [label="19: DeclStmt \n n$23=*&a:NSArray* [line 36, column 22]\n *&objects:NSArray*=n$23 [line 36, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_19" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_18" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_20" [label="20: DeclStmt \n n$25=_fun___objc_alloc_no_fail(sizeof(t=NSArray):unsigned long) [line 34, column 17]\n n$26=_fun_NSArray_init(n$25:NSArray*) virtual [line 34, column 16]\n *&a:NSArray*=n$26 [line 34, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_20" [label="20: DeclStmt \n n$24=_fun___objc_alloc_no_fail(sizeof(t=NSArray):unsigned long) [line 34, column 17]\n n$25=_fun_NSArray_init(n$24:NSArray*) virtual [line 34, column 16]\n *&a:NSArray*=n$25 [line 34, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_20" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_19" ;

Loading…
Cancel
Save