[infer] Translate casting expressions of integer pointers

Summary:
It enables the translation of casting expression. As of now, it
translates only the castings of pointers to integer types, in order to
avoid too much of change, which may mess the checkers up.

Reviewed By: jvillard

Differential Revision: D12920568

fbshipit-source-id: a5489df24
master
Sungkeun Cho 6 years ago committed by Facebook Github Bot
parent 0d5a7028ab
commit 1486a5f105

@ -197,9 +197,23 @@ let of_sil ~include_array_indexes ~f_resolve_id ~add_deref exp typ =
of_sil_ exp typ
let is_null_literal = function Constant (Cint n) -> IntLit.isnull n | _ -> false
let rec is_null_literal = function
| Constant (Cint n) ->
IntLit.isnull n
| Cast (_, e) ->
is_null_literal e
| _ ->
false
let rec is_int_zero = function
| Constant (Const.Cint i) ->
IntLit.iszero i
| Cast (_, e) ->
is_int_zero e
| _ ->
false
let is_int_zero = function Constant (Const.Cint i) -> IntLit.iszero i | _ -> false
let rec eval_arithmetic_binop op e1 e2 =
match (eval e1, eval e2) with
@ -212,6 +226,8 @@ let rec eval_arithmetic_binop op e1 e2 =
and eval = function
| Constant c ->
Some c
| Cast (_, e) ->
eval e
| BinaryOperator (Binop.Div, e1, e2) -> (
try eval_arithmetic_binop IntLit.div e1 e2 with Division_by_zero -> None )
| BinaryOperator (Binop.MinusA _, e1, e2) ->
@ -225,3 +241,6 @@ and eval = function
| _ ->
(* TODO: handle bitshifting cases, port eval_binop from RacerD.ml *)
None
let rec ignore_cast e = match e with Cast (_, e) -> ignore_cast e | _ -> e

@ -45,3 +45,5 @@ val is_null_literal : t -> bool
val is_int_zero : t -> bool
val eval : t -> Const.t option
val ignore_cast : t -> t

@ -73,7 +73,7 @@ let of_sil ~include_array_indexes ~f_resolve_id (instr : Sil.instr) =
analyze_id_assignment (Var.of_id ret_id) target_exp cast_typ loc
| Store (lhs_exp, typ, rhs_exp, loc) ->
let lhs_access_expr =
match exp_of_sil ~add_deref:true lhs_exp typ with
match HilExp.ignore_cast (exp_of_sil ~add_deref:true lhs_exp typ) with
| AccessExpression access_expr ->
access_expr
| BinaryOperator (_, exp0, exp1) -> (
@ -92,7 +92,7 @@ let of_sil ~include_array_indexes ~f_resolve_id (instr : Sil.instr) =
L.(die InternalError)
"Invalid pointer arithmetic expression %a used as LHS at %a" Exp.pp lhs_exp
Location.pp_file_pos loc ) )
| Constant (Const.Cint i) ->
| HilExp.Constant (Const.Cint i) ->
(* this can happen in intentionally crashing code like *0xdeadbeef = 0 used for
debugging. doesn't really matter what we do here, so just create a dummy var *)
let dummy_base_var =

@ -545,6 +545,8 @@ let is_pointer_to_cpp_class typ = match typ.desc with Tptr (t, _) -> is_cpp_clas
let is_pointer_to_void typ = match typ.desc with Tptr ({desc= Tvoid}, _) -> true | _ -> false
let is_pointer_to_int typ = match typ.desc with Tptr ({desc= Tint _}, _) -> true | _ -> false
let has_block_prefix s =
match Str.split_delim (Str.regexp_string Config.anonymous_block_prefix) s with
| _ :: _ :: _ ->

@ -284,6 +284,8 @@ val is_pointer_to_cpp_class : t -> bool
val is_pointer_to_void : t -> bool
val is_pointer_to_int : t -> bool
val is_pointer : t -> bool
val is_reference : t -> bool

@ -58,8 +58,10 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
false
let nullable_usedef_chain_of exp lhs astate loc =
let rec nullable_usedef_chain_of exp lhs astate loc =
match exp with
| HilExp.Cast (_, e) ->
nullable_usedef_chain_of e lhs astate loc
| HilExp.Constant (Cint n) when IntLit.isnull n ->
Some (UseDefChain.NullDefAssign (loc, lhs))
| HilExp.AccessExpression access_expr -> (
@ -78,7 +80,9 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
None
let extract_null_compare_expr = function
let rec extract_null_compare_expr = function
| HilExp.Cast (_, e) ->
extract_null_compare_expr e
| HilExp.BinaryOperator ((Eq | Ne), HilExp.AccessExpression access_expr, exp)
| HilExp.BinaryOperator ((Eq | Ne), exp, HilExp.AccessExpression access_expr) ->
Option.some_if (HilExp.is_null_literal exp) (AccessExpression.to_access_path access_expr)

@ -41,7 +41,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
false
let exec_assign lhs_access (rhs_exp : HilExp.t) loc astate =
let rec exec_assign lhs_access (rhs_exp : HilExp.t) loc astate =
(* try to evaluate [rhs_exp] down to an abstract address or generate a fresh one *)
match rhs_exp with
| AccessExpression rhs_access ->
@ -49,6 +49,8 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
>>= fun (astate, rhs_value) -> PulseDomain.write loc lhs_access rhs_value astate
| Constant (Cint address) when IntLit.iszero address ->
PulseDomain.write loc lhs_access PulseDomain.AbstractAddress.nullptr astate
| Cast (_, e) ->
exec_assign lhs_access e loc astate
| _ ->
PulseDomain.read_all loc (HilExp.get_access_exprs rhs_exp) astate
>>= PulseDomain.havoc loc lhs_access

@ -103,7 +103,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
let report_on_function_params pdesc tenv maybe_uninit_vars actuals loc summary callee_formals_opt
=
List.iteri actuals ~f:(fun idx e ->
match e with
match HilExp.ignore_cast e with
| HilExp.AccessExpression access_expr ->
let _, t = AccessExpression.get_base access_expr in
if
@ -185,7 +185,9 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
if should_report_var pdesc tenv astate.maybe_uninit_vars rhs_access_expr then
report_intra rhs_access_expr loc summary
in
let check_hil_expr ~loc = function
let rec check_hil_expr ~loc = function
| HilExp.Cast (_, e) ->
check_hil_expr ~loc e
| HilExp.AccessExpression access_expr ->
check_access_expr ~loc access_expr
| _ ->
@ -251,7 +253,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
in
let maybe_uninit_vars =
List.foldi ~init:astate.maybe_uninit_vars actuals ~f:(fun idx acc actual_exp ->
match actual_exp with
match HilExp.ignore_cast actual_exp with
| HilExp.AccessExpression access_expr -> (
let access_expr_to_remove =
match access_expr with AddressOf ae -> ae | _ -> access_expr

@ -481,6 +481,8 @@ let cast_operation cast_kind ((exp, typ) as exp_typ) cast_typ sil_loc =
| `NoOp | `DerivedToBase | `UncheckedDerivedToBase ->
(* These casts ignore change of type *)
([], exp_typ)
| `BitCast when Typ.is_pointer_to_int cast_typ ->
([], (Exp.Cast (cast_typ, exp), cast_typ))
| `BitCast | `IntegralCast | `IntegralToBoolean ->
(* This is treated as a nop by returning the same expressions exps*)
([], (exp, cast_typ))

@ -22,7 +22,7 @@ include TaintAnalysis.Make (struct
let handle_unknown_call pname ret_typ actuals _ =
let handle_generic_unknown ret_typ actuals =
match ((ret_typ.Typ.desc : Typ.desc), List.rev actuals) with
match ((ret_typ.Typ.desc : Typ.desc), List.rev_map actuals ~f:HilExp.ignore_cast) with
(* everything but Tvoid*)
| (Tint _ | Tfloat _ | Tfun _ | Tptr (_, _) | Tstruct _ | TVar _ | Tarray _), _ ->
(* propagate taint from actuals to return value *)

@ -97,7 +97,7 @@ module SourceKind = struct
false
in
(* accessed global will be passed to us as the only parameter *)
match actuals with
match List.map actuals ~f:HilExp.ignore_cast with
| [HilExp.AccessExpression access_expr] ->
let access_path = AccessExpression.to_access_path access_expr in
if is_gflag access_path then

@ -22,7 +22,9 @@ include TaintAnalysis.Make (struct
let handle_unknown_call pname ret_typ actuals tenv =
let get_receiver_typ tenv = function
let rec get_receiver_typ tenv = function
| HilExp.Cast (_, e) ->
get_receiver_typ tenv e
| HilExp.AccessExpression access_expr ->
AccessPath.get_typ (AccessExpression.to_access_path access_expr) tenv
| _ ->

@ -118,7 +118,7 @@ module SourceKind = struct
(Typ.Name.Java.from_string (Typ.Procname.Java.get_class_name pname))
| Typ.Procname.C _ when Typ.Procname.equal pname BuiltinDecl.__global_access -> (
(* accessed global will be passed to us as the only parameter *)
match actuals with
match List.map actuals ~f:HilExp.ignore_cast with
| [HilExp.AccessExpression access_expr] -> (
match AccessExpression.to_access_path access_expr with
| (Var.ProgramVar pvar, _), _ ->

@ -98,7 +98,7 @@ module Make (TaintSpecification : TaintSpec.S) = struct
let add_actual_source source index actuals access_tree proc_data =
match List.nth_exn actuals index with
match HilExp.ignore_cast (List.nth_exn actuals index) with
| HilExp.AccessExpression actual_ae_raw ->
let actual_ap =
AccessPath.Abs.Abstracted (AccessExpression.to_access_path actual_ae_raw)
@ -334,7 +334,7 @@ module Make (TaintSpecification : TaintSpec.S) = struct
in
let actual_trace' = TraceDomain.add_sink sink' actual_trace in
report_trace actual_trace' callee_site proc_data ;
match exp with
match HilExp.ignore_cast exp with
| HilExp.AccessExpression actual_ae_raw
when not
(TraceDomain.Sources.Footprint.is_empty
@ -390,7 +390,7 @@ module Make (TaintSpecification : TaintSpec.S) = struct
in
(projected_ap_opt, Option.value ~default:TaintDomain.empty_node caller_node_opt)
| Var.LogicalVar id when Ident.is_footprint id -> (
match List.nth actuals (Ident.get_stamp id) with
match Option.map (List.nth actuals (Ident.get_stamp id)) ~f:HilExp.ignore_cast with
| Some (HilExp.AccessExpression actual_ae) ->
let projected_ap =
project ~formal_ap ~actual_ap:(AccessExpression.to_access_path actual_ae)
@ -502,8 +502,10 @@ module Make (TaintSpecification : TaintSpec.S) = struct
astate
else astate
in
let add_sources_sinks_for_exp exp loc astate =
let rec add_sources_sinks_for_exp exp loc astate =
match exp with
| HilExp.Cast (_, e) ->
add_sources_sinks_for_exp e loc astate
| HilExp.AccessExpression access_expr ->
add_sinks_for_access_path access_expr loc astate
|> add_sources_for_access_path access_expr loc
@ -603,7 +605,7 @@ module Make (TaintSpecification : TaintSpec.S) = struct
(AccessPath.Abs.Abstracted (AccessExpression.to_access_path receiver_ae))
other_actuals astate_acc
| TaintSpec.Propagate_to_actual actual_index, _ -> (
match List.nth actuals actual_index with
match Option.map (List.nth actuals actual_index) ~f:HilExp.ignore_cast with
| Some (HilExp.AccessExpression actual_ae) ->
propagate_to_access_path
(AccessPath.Abs.Abstracted (AccessExpression.to_access_path actual_ae))
@ -619,7 +621,7 @@ module Make (TaintSpecification : TaintSpec.S) = struct
match Typ.Procname.get_method callee_pname with
| "operator=" when not (Typ.Procname.is_java callee_pname) -> (
(* treat unknown calls to C++ operator= as assignment *)
match actuals with
match List.map actuals ~f:HilExp.ignore_cast with
| [AccessExpression lhs_access_expr; rhs_exp] ->
exec_write lhs_access_expr rhs_exp access_tree
| [AccessExpression lhs_access_expr; rhs_exp; HilExp.AccessExpression access_expr] -> (

@ -30,7 +30,8 @@ codetoanalyze/c/errors/local_vars/local_vars.c, t, 8, DIVIDE_BY_ZERO, no_bucket
codetoanalyze/c/errors/memory_leaks/cleanup_attribute.c, FP_cleanup_malloc_good, 4, MEMORY_LEAK, no_bucket
codetoanalyze/c/errors/memory_leaks/cleanup_attribute.c, FP_cleanup_string_good, 2, MEMORY_LEAK, no_bucket
codetoanalyze/c/errors/memory_leaks/test.c, common_realloc_leak, 3, MEMORY_LEAK, no_bucket
codetoanalyze/c/errors/memory_leaks/test.c, common_realloc_leak, 5, NULL_TEST_AFTER_DEREFERENCE, no_bucket
codetoanalyze/c/errors/memory_leaks/test.c, common_realloc_leak2, 3, MEMORY_LEAK, no_bucket
codetoanalyze/c/errors/memory_leaks/test.c, common_realloc_leak2, 5, NULL_TEST_AFTER_DEREFERENCE, no_bucket
codetoanalyze/c/errors/memory_leaks/test.c, conditional_last_instruction, 5, MEMORY_LEAK, no_bucket
codetoanalyze/c/errors/memory_leaks/test.c, malloc_sizeof_value_leak_bad, 7, MEMORY_LEAK, no_bucket
codetoanalyze/c/errors/memory_leaks/test.c, malloc_sizeof_value_leak_bad, 8, ARRAY_OUT_OF_BOUNDS_L3, no_bucket

@ -22,6 +22,15 @@ void common_realloc_leak() {
free(q);
}
void common_realloc_leak2() {
float *p, *q;
p = (float*)malloc(sizeof(float));
q = (float*)realloc(p, sizeof(float) * 42);
// if realloc fails, then p becomes unreachable
if (q != NULL)
free(q);
}
int* allocate() {
int* p = NULL;
do {

@ -23,7 +23,7 @@ digraph cfg {
"main.fad58de7366495db4650cfefac2fcd61_6" -> "main.fad58de7366495db4650cfefac2fcd61_15" ;
"main.fad58de7366495db4650cfefac2fcd61_7" [label="7: BinaryOperatorStmt: Assign \n n$1=_fun_getenv(\"BLOCK_SIZE\":char const *) [line 47, column 25]\n *&spec:char*=n$1 [line 47, column 18]\n n$2=*&spec:char* [line 47, column 18]\n REMOVE_TEMPS(n$1); [line 47, column 18]\n " shape="box"]
"main.fad58de7366495db4650cfefac2fcd61_7" [label="7: BinaryOperatorStmt: Assign \n n$1=_fun_getenv((char const *)\"BLOCK_SIZE\":char const *) [line 47, column 25]\n *&spec:char*=n$1 [line 47, column 18]\n n$2=*&spec:char* [line 47, column 18]\n REMOVE_TEMPS(n$1); [line 47, column 18]\n " shape="box"]
"main.fad58de7366495db4650cfefac2fcd61_7" -> "main.fad58de7366495db4650cfefac2fcd61_8" ;
@ -36,7 +36,7 @@ digraph cfg {
"main.fad58de7366495db4650cfefac2fcd61_9" -> "main.fad58de7366495db4650cfefac2fcd61_15" ;
"main.fad58de7366495db4650cfefac2fcd61_10" [label="10: BinaryOperatorStmt: Assign \n n$3=_fun_getenv(\"BLOCKSIZE\":char const *) [line 47, column 59]\n *&spec:char*=n$3 [line 47, column 52]\n n$4=*&spec:char* [line 47, column 52]\n REMOVE_TEMPS(n$3); [line 47, column 52]\n " shape="box"]
"main.fad58de7366495db4650cfefac2fcd61_10" [label="10: BinaryOperatorStmt: Assign \n n$3=_fun_getenv((char const *)\"BLOCKSIZE\":char const *) [line 47, column 59]\n *&spec:char*=n$3 [line 47, column 52]\n n$4=*&spec:char* [line 47, column 52]\n REMOVE_TEMPS(n$3); [line 47, column 52]\n " shape="box"]
"main.fad58de7366495db4650cfefac2fcd61_10" -> "main.fad58de7366495db4650cfefac2fcd61_11" ;
@ -74,7 +74,7 @@ digraph cfg {
"main.fad58de7366495db4650cfefac2fcd61_18" -> "main.fad58de7366495db4650cfefac2fcd61_14" ;
"main.fad58de7366495db4650cfefac2fcd61_19" [label="19: BinaryOperatorStmt: Assign \n n$10=_fun_getenv(\"BLOCK\":char const *) [line 45, column 10]\n *&spec:char*=n$10 [line 45, column 3]\n REMOVE_TEMPS(n$10); [line 45, column 3]\n " shape="box"]
"main.fad58de7366495db4650cfefac2fcd61_19" [label="19: BinaryOperatorStmt: Assign \n n$10=_fun_getenv((char const *)\"BLOCK\":char const *) [line 45, column 10]\n *&spec:char*=n$10 [line 45, column 3]\n REMOVE_TEMPS(n$10); [line 45, column 3]\n " shape="box"]
"main.fad58de7366495db4650cfefac2fcd61_19" -> "main.fad58de7366495db4650cfefac2fcd61_5" ;
@ -103,7 +103,7 @@ digraph cfg {
"shortcircuit_and.10f9635d805ff3bd29dfc80b8f8d12da_6" -> "shortcircuit_and.10f9635d805ff3bd29dfc80b8f8d12da_11" ;
"shortcircuit_and.10f9635d805ff3bd29dfc80b8f8d12da_7" [label="7: BinaryOperatorStmt: Assign \n n$2=_fun_getenv(\"BLOCK\":char const *) [line 20, column 19]\n *&x:int*=n$2 [line 20, column 15]\n n$3=*&x:int* [line 20, column 15]\n REMOVE_TEMPS(n$2); [line 20, column 15]\n " shape="box"]
"shortcircuit_and.10f9635d805ff3bd29dfc80b8f8d12da_7" [label="7: BinaryOperatorStmt: Assign \n n$2=_fun_getenv((char const *)\"BLOCK\":char const *) [line 20, column 19]\n *&x:int*=(int*)n$2 [line 20, column 15]\n n$3=*&x:int* [line 20, column 15]\n REMOVE_TEMPS(n$2); [line 20, column 15]\n " shape="box"]
"shortcircuit_and.10f9635d805ff3bd29dfc80b8f8d12da_7" -> "shortcircuit_and.10f9635d805ff3bd29dfc80b8f8d12da_8" ;
@ -193,7 +193,7 @@ digraph cfg {
"test_loop.254a9d372f8f45542e409771135b9322_5" -> "test_loop.254a9d372f8f45542e409771135b9322_2" ;
"test_loop.254a9d372f8f45542e409771135b9322_6" [label="6: BinaryOperatorStmt: Assign \n n$1=_fun_getenv(\"BLOCK_SIZE\":char const *) [line 34, column 29]\n *&spec:char*=n$1 [line 34, column 22]\n n$2=*&spec:char* [line 34, column 22]\n REMOVE_TEMPS(n$1); [line 34, column 22]\n NULLIFY(&spec); [line 34, column 22]\n " shape="box"]
"test_loop.254a9d372f8f45542e409771135b9322_6" [label="6: BinaryOperatorStmt: Assign \n n$1=_fun_getenv((char const *)\"BLOCK_SIZE\":char const *) [line 34, column 29]\n *&spec:char*=n$1 [line 34, column 22]\n n$2=*&spec:char* [line 34, column 22]\n REMOVE_TEMPS(n$1); [line 34, column 22]\n NULLIFY(&spec); [line 34, column 22]\n " shape="box"]
"test_loop.254a9d372f8f45542e409771135b9322_6" -> "test_loop.254a9d372f8f45542e409771135b9322_7" ;
@ -206,7 +206,7 @@ digraph cfg {
"test_loop.254a9d372f8f45542e409771135b9322_8" -> "test_loop.254a9d372f8f45542e409771135b9322_2" ;
"test_loop.254a9d372f8f45542e409771135b9322_9" [label="9: BinaryOperatorStmt: Assign \n n$3=_fun_getenv(\"BLOCKSIZE\":char const *) [line 35, column 20]\n *&spec:char*=n$3 [line 35, column 13]\n n$4=*&spec:char* [line 35, column 13]\n REMOVE_TEMPS(n$3); [line 35, column 13]\n " shape="box"]
"test_loop.254a9d372f8f45542e409771135b9322_9" [label="9: BinaryOperatorStmt: Assign \n n$3=_fun_getenv((char const *)\"BLOCKSIZE\":char const *) [line 35, column 20]\n *&spec:char*=n$3 [line 35, column 13]\n n$4=*&spec:char* [line 35, column 13]\n REMOVE_TEMPS(n$3); [line 35, column 13]\n " shape="box"]
"test_loop.254a9d372f8f45542e409771135b9322_9" -> "test_loop.254a9d372f8f45542e409771135b9322_10" ;
@ -223,7 +223,7 @@ digraph cfg {
"test_loop.254a9d372f8f45542e409771135b9322_12" -> "test_loop.254a9d372f8f45542e409771135b9322_3" ;
"test_loop.254a9d372f8f45542e409771135b9322_13" [label="13: BinaryOperatorStmt: Assign \n n$6=_fun_getenv(\"BLOCK\":char const *) [line 32, column 10]\n *&spec:char*=n$6 [line 32, column 3]\n REMOVE_TEMPS(n$6); [line 32, column 3]\n APPLY_ABSTRACTION; [line 32, column 3]\n " shape="box"]
"test_loop.254a9d372f8f45542e409771135b9322_13" [label="13: BinaryOperatorStmt: Assign \n n$6=_fun_getenv((char const *)\"BLOCK\":char const *) [line 32, column 10]\n *&spec:char*=n$6 [line 32, column 3]\n REMOVE_TEMPS(n$6); [line 32, column 3]\n APPLY_ABSTRACTION; [line 32, column 3]\n " shape="box"]
"test_loop.254a9d372f8f45542e409771135b9322_13" -> "test_loop.254a9d372f8f45542e409771135b9322_3" ;

@ -201,7 +201,7 @@ digraph cfg {
"g3.8a9fd7dfda802921fdc4079f9a528ce8_3" -> "g3.8a9fd7dfda802921fdc4079f9a528ce8_2" ;
"g3.8a9fd7dfda802921fdc4079f9a528ce8_4" [label="4: Call _fun_printf \n n$0=_fun_printf(\"exit\\n\":char const *) [line 75, column 3]\n REMOVE_TEMPS(n$0); [line 75, column 3]\n " shape="box"]
"g3.8a9fd7dfda802921fdc4079f9a528ce8_4" [label="4: Call _fun_printf \n n$0=_fun_printf((char const *)\"exit\\n\":char const *) [line 75, column 3]\n REMOVE_TEMPS(n$0); [line 75, column 3]\n " shape="box"]
"g3.8a9fd7dfda802921fdc4079f9a528ce8_4" -> "g3.8a9fd7dfda802921fdc4079f9a528ce8_3" ;
@ -209,7 +209,7 @@ digraph cfg {
"g3.8a9fd7dfda802921fdc4079f9a528ce8_5" -> "g3.8a9fd7dfda802921fdc4079f9a528ce8_4" ;
"g3.8a9fd7dfda802921fdc4079f9a528ce8_6" [label="6: Call _fun_printf \n n$2=_fun_printf(\"A\\n\":char const *) [line 72, column 3]\n REMOVE_TEMPS(n$2); [line 72, column 3]\n APPLY_ABSTRACTION; [line 72, column 3]\n " shape="box"]
"g3.8a9fd7dfda802921fdc4079f9a528ce8_6" [label="6: Call _fun_printf \n n$2=_fun_printf((char const *)\"A\\n\":char const *) [line 72, column 3]\n REMOVE_TEMPS(n$2); [line 72, column 3]\n APPLY_ABSTRACTION; [line 72, column 3]\n " shape="box"]
"g3.8a9fd7dfda802921fdc4079f9a528ce8_6" -> "g3.8a9fd7dfda802921fdc4079f9a528ce8_5" ;
@ -225,7 +225,7 @@ digraph cfg {
"g3.8a9fd7dfda802921fdc4079f9a528ce8_9" -> "g3.8a9fd7dfda802921fdc4079f9a528ce8_2" ;
"g3.8a9fd7dfda802921fdc4079f9a528ce8_10" [label="10: Call _fun_printf \n n$5=_fun_printf(\"g3\\n\":char const *) [line 67, column 3]\n REMOVE_TEMPS(n$5); [line 67, column 3]\n " shape="box"]
"g3.8a9fd7dfda802921fdc4079f9a528ce8_10" [label="10: Call _fun_printf \n n$5=_fun_printf((char const *)\"g3\\n\":char const *) [line 67, column 3]\n REMOVE_TEMPS(n$5); [line 67, column 3]\n " shape="box"]
"g3.8a9fd7dfda802921fdc4079f9a528ce8_10" -> "g3.8a9fd7dfda802921fdc4079f9a528ce8_9" ;
@ -284,7 +284,7 @@ digraph cfg {
"g3.8a9fd7dfda802921fdc4079f9a528ce8_23" -> "g3.8a9fd7dfda802921fdc4079f9a528ce8_20" ;
"g3.8a9fd7dfda802921fdc4079f9a528ce8_24" [label="24: Call _fun_printf \n n$18=_fun_printf(\"B\\n\":char const *) [line 59, column 3]\n REMOVE_TEMPS(n$18); [line 59, column 3]\n " shape="box"]
"g3.8a9fd7dfda802921fdc4079f9a528ce8_24" [label="24: Call _fun_printf \n n$18=_fun_printf((char const *)\"B\\n\":char const *) [line 59, column 3]\n REMOVE_TEMPS(n$18); [line 59, column 3]\n " shape="box"]
"g3.8a9fd7dfda802921fdc4079f9a528ce8_24" -> "g3.8a9fd7dfda802921fdc4079f9a528ce8_21" ;
@ -299,7 +299,7 @@ digraph cfg {
"g4.b0b5c8f28ad7834e70a958a8882fa59a_3" -> "g4.b0b5c8f28ad7834e70a958a8882fa59a_2" ;
"g4.b0b5c8f28ad7834e70a958a8882fa59a_4" [label="4: Call _fun_printf \n n$0=_fun_printf(\"exit\\n\":char const *) [line 96, column 3]\n REMOVE_TEMPS(n$0); [line 96, column 3]\n " shape="box"]
"g4.b0b5c8f28ad7834e70a958a8882fa59a_4" [label="4: Call _fun_printf \n n$0=_fun_printf((char const *)\"exit\\n\":char const *) [line 96, column 3]\n REMOVE_TEMPS(n$0); [line 96, column 3]\n " shape="box"]
"g4.b0b5c8f28ad7834e70a958a8882fa59a_4" -> "g4.b0b5c8f28ad7834e70a958a8882fa59a_3" ;
@ -307,7 +307,7 @@ digraph cfg {
"g4.b0b5c8f28ad7834e70a958a8882fa59a_5" -> "g4.b0b5c8f28ad7834e70a958a8882fa59a_4" ;
"g4.b0b5c8f28ad7834e70a958a8882fa59a_6" [label="6: Call _fun_printf \n n$2=_fun_printf(\"A\\n\":char const *) [line 93, column 3]\n REMOVE_TEMPS(n$2); [line 93, column 3]\n APPLY_ABSTRACTION; [line 93, column 3]\n " shape="box"]
"g4.b0b5c8f28ad7834e70a958a8882fa59a_6" [label="6: Call _fun_printf \n n$2=_fun_printf((char const *)\"A\\n\":char const *) [line 93, column 3]\n REMOVE_TEMPS(n$2); [line 93, column 3]\n APPLY_ABSTRACTION; [line 93, column 3]\n " shape="box"]
"g4.b0b5c8f28ad7834e70a958a8882fa59a_6" -> "g4.b0b5c8f28ad7834e70a958a8882fa59a_5" ;
@ -319,7 +319,7 @@ digraph cfg {
"g4.b0b5c8f28ad7834e70a958a8882fa59a_8" -> "g4.b0b5c8f28ad7834e70a958a8882fa59a_7" ;
"g4.b0b5c8f28ad7834e70a958a8882fa59a_9" [label="9: Call _fun_printf \n n$5=_fun_printf(\"g4\\n\":char const *) [line 89, column 3]\n REMOVE_TEMPS(n$5); [line 89, column 3]\n APPLY_ABSTRACTION; [line 89, column 3]\n " shape="box"]
"g4.b0b5c8f28ad7834e70a958a8882fa59a_9" [label="9: Call _fun_printf \n n$5=_fun_printf((char const *)\"g4\\n\":char const *) [line 89, column 3]\n REMOVE_TEMPS(n$5); [line 89, column 3]\n APPLY_ABSTRACTION; [line 89, column 3]\n " shape="box"]
"g4.b0b5c8f28ad7834e70a958a8882fa59a_9" -> "g4.b0b5c8f28ad7834e70a958a8882fa59a_8" ;
@ -378,7 +378,7 @@ digraph cfg {
"g4.b0b5c8f28ad7834e70a958a8882fa59a_22" -> "g4.b0b5c8f28ad7834e70a958a8882fa59a_19" ;
"g4.b0b5c8f28ad7834e70a958a8882fa59a_23" [label="23: Call _fun_printf \n n$18=_fun_printf(\"B\\n\":char const *) [line 81, column 3]\n REMOVE_TEMPS(n$18); [line 81, column 3]\n " shape="box"]
"g4.b0b5c8f28ad7834e70a958a8882fa59a_23" [label="23: Call _fun_printf \n n$18=_fun_printf((char const *)\"B\\n\":char const *) [line 81, column 3]\n REMOVE_TEMPS(n$18); [line 81, column 3]\n " shape="box"]
"g4.b0b5c8f28ad7834e70a958a8882fa59a_23" -> "g4.b0b5c8f28ad7834e70a958a8882fa59a_20" ;
@ -393,7 +393,7 @@ digraph cfg {
"g5.37c965a8d6d7bec292c7b11ff315d9ea_3" -> "g5.37c965a8d6d7bec292c7b11ff315d9ea_8" ;
"g5.37c965a8d6d7bec292c7b11ff315d9ea_4" [label="4: Call _fun_printf \n n$1=_fun_printf(\"exit\\n\":char const *) [line 118, column 3]\n REMOVE_TEMPS(n$1); [line 118, column 3]\n APPLY_ABSTRACTION; [line 118, column 3]\n " shape="box"]
"g5.37c965a8d6d7bec292c7b11ff315d9ea_4" [label="4: Call _fun_printf \n n$1=_fun_printf((char const *)\"exit\\n\":char const *) [line 118, column 3]\n REMOVE_TEMPS(n$1); [line 118, column 3]\n APPLY_ABSTRACTION; [line 118, column 3]\n " shape="box"]
"g5.37c965a8d6d7bec292c7b11ff315d9ea_4" -> "g5.37c965a8d6d7bec292c7b11ff315d9ea_3" ;
@ -405,7 +405,7 @@ digraph cfg {
"g5.37c965a8d6d7bec292c7b11ff315d9ea_6" -> "g5.37c965a8d6d7bec292c7b11ff315d9ea_2" ;
"g5.37c965a8d6d7bec292c7b11ff315d9ea_7" [label="7: Call _fun_printf \n n$3=_fun_printf(\"A\\n\":char const *) [line 114, column 3]\n REMOVE_TEMPS(n$3); [line 114, column 3]\n " shape="box"]
"g5.37c965a8d6d7bec292c7b11ff315d9ea_7" [label="7: Call _fun_printf \n n$3=_fun_printf((char const *)\"A\\n\":char const *) [line 114, column 3]\n REMOVE_TEMPS(n$3); [line 114, column 3]\n " shape="box"]
"g5.37c965a8d6d7bec292c7b11ff315d9ea_7" -> "g5.37c965a8d6d7bec292c7b11ff315d9ea_6" ;
@ -468,7 +468,7 @@ digraph cfg {
"g5.37c965a8d6d7bec292c7b11ff315d9ea_21" -> "g5.37c965a8d6d7bec292c7b11ff315d9ea_18" ;
"g5.37c965a8d6d7bec292c7b11ff315d9ea_22" [label="22: Call _fun_printf \n n$19=_fun_printf(\"B\\n\":char const *) [line 102, column 3]\n REMOVE_TEMPS(n$19); [line 102, column 3]\n " shape="box"]
"g5.37c965a8d6d7bec292c7b11ff315d9ea_22" [label="22: Call _fun_printf \n n$19=_fun_printf((char const *)\"B\\n\":char const *) [line 102, column 3]\n REMOVE_TEMPS(n$19); [line 102, column 3]\n " shape="box"]
"g5.37c965a8d6d7bec292c7b11ff315d9ea_22" -> "g5.37c965a8d6d7bec292c7b11ff315d9ea_19" ;
@ -483,7 +483,7 @@ digraph cfg {
"g6.4a4314ef967aad20a9e7c423bc16e39c_3" -> "g6.4a4314ef967aad20a9e7c423bc16e39c_8" ;
"g6.4a4314ef967aad20a9e7c423bc16e39c_4" [label="4: Call _fun_printf \n n$1=_fun_printf(\"exit\\n\":char const *) [line 140, column 3]\n REMOVE_TEMPS(n$1); [line 140, column 3]\n APPLY_ABSTRACTION; [line 140, column 3]\n " shape="box"]
"g6.4a4314ef967aad20a9e7c423bc16e39c_4" [label="4: Call _fun_printf \n n$1=_fun_printf((char const *)\"exit\\n\":char const *) [line 140, column 3]\n REMOVE_TEMPS(n$1); [line 140, column 3]\n APPLY_ABSTRACTION; [line 140, column 3]\n " shape="box"]
"g6.4a4314ef967aad20a9e7c423bc16e39c_4" -> "g6.4a4314ef967aad20a9e7c423bc16e39c_3" ;
@ -495,7 +495,7 @@ digraph cfg {
"g6.4a4314ef967aad20a9e7c423bc16e39c_6" -> "g6.4a4314ef967aad20a9e7c423bc16e39c_2" ;
"g6.4a4314ef967aad20a9e7c423bc16e39c_7" [label="7: Call _fun_printf \n n$3=_fun_printf(\"A\\n\":char const *) [line 136, column 3]\n REMOVE_TEMPS(n$3); [line 136, column 3]\n " shape="box"]
"g6.4a4314ef967aad20a9e7c423bc16e39c_7" [label="7: Call _fun_printf \n n$3=_fun_printf((char const *)\"A\\n\":char const *) [line 136, column 3]\n REMOVE_TEMPS(n$3); [line 136, column 3]\n " shape="box"]
"g6.4a4314ef967aad20a9e7c423bc16e39c_7" -> "g6.4a4314ef967aad20a9e7c423bc16e39c_6" ;
@ -558,7 +558,7 @@ digraph cfg {
"g6.4a4314ef967aad20a9e7c423bc16e39c_21" -> "g6.4a4314ef967aad20a9e7c423bc16e39c_18" ;
"g6.4a4314ef967aad20a9e7c423bc16e39c_22" [label="22: Call _fun_printf \n n$19=_fun_printf(\"B\\n\":char const *) [line 124, column 3]\n REMOVE_TEMPS(n$19); [line 124, column 3]\n " shape="box"]
"g6.4a4314ef967aad20a9e7c423bc16e39c_22" [label="22: Call _fun_printf \n n$19=_fun_printf((char const *)\"B\\n\":char const *) [line 124, column 3]\n REMOVE_TEMPS(n$19); [line 124, column 3]\n " shape="box"]
"g6.4a4314ef967aad20a9e7c423bc16e39c_22" -> "g6.4a4314ef967aad20a9e7c423bc16e39c_19" ;
@ -573,7 +573,7 @@ digraph cfg {
"g7.727bb92f57c3951d11695a52c92c2b0c_3" -> "g7.727bb92f57c3951d11695a52c92c2b0c_2" ;
"g7.727bb92f57c3951d11695a52c92c2b0c_4" [label="4: Call _fun_printf \n n$0=_fun_printf(\"terminating!\\n\":char const *) [line 163, column 3]\n REMOVE_TEMPS(n$0); [line 163, column 3]\n " shape="box"]
"g7.727bb92f57c3951d11695a52c92c2b0c_4" [label="4: Call _fun_printf \n n$0=_fun_printf((char const *)\"terminating!\\n\":char const *) [line 163, column 3]\n REMOVE_TEMPS(n$0); [line 163, column 3]\n " shape="box"]
"g7.727bb92f57c3951d11695a52c92c2b0c_4" -> "g7.727bb92f57c3951d11695a52c92c2b0c_3" ;
@ -585,7 +585,7 @@ digraph cfg {
"g7.727bb92f57c3951d11695a52c92c2b0c_6" -> "g7.727bb92f57c3951d11695a52c92c2b0c_25" ;
"g7.727bb92f57c3951d11695a52c92c2b0c_7" [label="7: Call _fun_printf \n n$3=_fun_printf(\"out!\\n\":char const *) [line 160, column 3]\n REMOVE_TEMPS(n$3); [line 160, column 3]\n " shape="box"]
"g7.727bb92f57c3951d11695a52c92c2b0c_7" [label="7: Call _fun_printf \n n$3=_fun_printf((char const *)\"out!\\n\":char const *) [line 160, column 3]\n REMOVE_TEMPS(n$3); [line 160, column 3]\n " shape="box"]
"g7.727bb92f57c3951d11695a52c92c2b0c_7" -> "g7.727bb92f57c3951d11695a52c92c2b0c_6" ;
@ -661,7 +661,7 @@ digraph cfg {
"g7.727bb92f57c3951d11695a52c92c2b0c_24" -> "g7.727bb92f57c3951d11695a52c92c2b0c_21" ;
"g7.727bb92f57c3951d11695a52c92c2b0c_25" [label="25: Call _fun_printf \n n$10=_fun_printf(\"wow\\n\":char const *) [line 153, column 11]\n REMOVE_TEMPS(n$10); [line 153, column 11]\n " shape="box"]
"g7.727bb92f57c3951d11695a52c92c2b0c_25" [label="25: Call _fun_printf \n n$10=_fun_printf((char const *)\"wow\\n\":char const *) [line 153, column 11]\n REMOVE_TEMPS(n$10); [line 153, column 11]\n " shape="box"]
"g7.727bb92f57c3951d11695a52c92c2b0c_25" -> "g7.727bb92f57c3951d11695a52c92c2b0c_5" ;
@ -692,7 +692,7 @@ digraph cfg {
"g8.c98b82371573afc08575815d90f5eac4_3" -> "g8.c98b82371573afc08575815d90f5eac4_2" ;
"g8.c98b82371573afc08575815d90f5eac4_4" [label="4: Call _fun_printf \n n$0=_fun_printf(\"terminating!\\n\":char const *) [line 186, column 3]\n REMOVE_TEMPS(n$0); [line 186, column 3]\n " shape="box"]
"g8.c98b82371573afc08575815d90f5eac4_4" [label="4: Call _fun_printf \n n$0=_fun_printf((char const *)\"terminating!\\n\":char const *) [line 186, column 3]\n REMOVE_TEMPS(n$0); [line 186, column 3]\n " shape="box"]
"g8.c98b82371573afc08575815d90f5eac4_4" -> "g8.c98b82371573afc08575815d90f5eac4_3" ;
@ -700,7 +700,7 @@ digraph cfg {
"g8.c98b82371573afc08575815d90f5eac4_5" -> "g8.c98b82371573afc08575815d90f5eac4_4" ;
"g8.c98b82371573afc08575815d90f5eac4_6" [label="6: Call _fun_printf \n n$2=_fun_printf(\"out!\\n\":char const *) [line 184, column 3]\n REMOVE_TEMPS(n$2); [line 184, column 3]\n " shape="box"]
"g8.c98b82371573afc08575815d90f5eac4_6" [label="6: Call _fun_printf \n n$2=_fun_printf((char const *)\"out!\\n\":char const *) [line 184, column 3]\n REMOVE_TEMPS(n$2); [line 184, column 3]\n " shape="box"]
"g8.c98b82371573afc08575815d90f5eac4_6" -> "g8.c98b82371573afc08575815d90f5eac4_5" ;
@ -776,7 +776,7 @@ digraph cfg {
"g8.c98b82371573afc08575815d90f5eac4_23" -> "g8.c98b82371573afc08575815d90f5eac4_20" ;
"g8.c98b82371573afc08575815d90f5eac4_24" [label="24: Call _fun_printf \n n$8=_fun_printf(\"wow\\n\":char const *) [line 177, column 11]\n REMOVE_TEMPS(n$8); [line 177, column 11]\n APPLY_ABSTRACTION; [line 177, column 11]\n " shape="box"]
"g8.c98b82371573afc08575815d90f5eac4_24" [label="24: Call _fun_printf \n n$8=_fun_printf((char const *)\"wow\\n\":char const *) [line 177, column 11]\n REMOVE_TEMPS(n$8); [line 177, column 11]\n APPLY_ABSTRACTION; [line 177, column 11]\n " shape="box"]
"g8.c98b82371573afc08575815d90f5eac4_24" -> "g8.c98b82371573afc08575815d90f5eac4_20" ;

@ -39,7 +39,7 @@ digraph cfg {
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_7" -> "test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_3" ;
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_8" [label="8: Call _fun_printf \n n$1=_fun_printf(\"(after_switch)HELLO WORLD!\":char const *) [line 31, column 5]\n REMOVE_TEMPS(n$1); [line 31, column 5]\n APPLY_ABSTRACTION; [line 31, column 5]\n " shape="box"]
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_8" [label="8: Call _fun_printf \n n$1=_fun_printf((char const *)\"(after_switch)HELLO WORLD!\":char const *) [line 31, column 5]\n REMOVE_TEMPS(n$1); [line 31, column 5]\n APPLY_ABSTRACTION; [line 31, column 5]\n " shape="box"]
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_8" -> "test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_4" ;
@ -48,15 +48,15 @@ digraph cfg {
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_9" -> "test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_20" ;
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_9" -> "test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_21" ;
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_10" [label="10: Call _fun_printf \n n$4=_fun_printf(\"(2/def)HELLO WORLD!\":char const *) [line 28, column 9]\n REMOVE_TEMPS(n$4); [line 28, column 9]\n APPLY_ABSTRACTION; [line 28, column 9]\n " shape="box"]
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_10" [label="10: Call _fun_printf \n n$4=_fun_printf((char const *)\"(2/def)HELLO WORLD!\":char const *) [line 28, column 9]\n REMOVE_TEMPS(n$4); [line 28, column 9]\n APPLY_ABSTRACTION; [line 28, column 9]\n " shape="box"]
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_10" -> "test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_4" ;
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_11" [label="11: Call _fun_printf \n n$6=_fun_printf(\"(1)HELLO WORLD!\":char const *) [line 24, column 9]\n REMOVE_TEMPS(n$6); [line 24, column 9]\n APPLY_ABSTRACTION; [line 24, column 9]\n " shape="box"]
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_11" [label="11: Call _fun_printf \n n$6=_fun_printf((char const *)\"(1)HELLO WORLD!\":char const *) [line 24, column 9]\n REMOVE_TEMPS(n$6); [line 24, column 9]\n APPLY_ABSTRACTION; [line 24, column 9]\n " shape="box"]
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_11" -> "test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_4" ;
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_12" [label="12: Call _fun_printf \n n$8=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 21, column 9]\n REMOVE_TEMPS(n$8); [line 21, column 9]\n " shape="box"]
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_12" [label="12: Call _fun_printf \n n$8=_fun_printf((char const *)\"(0)HELLO WORLD!\":char const *) [line 21, column 9]\n REMOVE_TEMPS(n$8); [line 21, column 9]\n " shape="box"]
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_12" -> "test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_8" ;
@ -64,7 +64,7 @@ digraph cfg {
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_13" -> "test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_12" ;
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_14" [label="14: Call _fun_printf \n n$10=_fun_printf(\"(out)HELLO WORLD!\":char const *) [line 18, column 7]\n " shape="box"]
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_14" [label="14: Call _fun_printf \n n$10=_fun_printf((char const *)\"(out)HELLO WORLD!\":char const *) [line 18, column 7]\n " shape="box"]
"test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_14" -> "test_switch1.7c92c7e14d1a0ee28a9ab29b22df5d3f_13" ;
@ -162,7 +162,7 @@ digraph cfg {
"test_switch11.a1a6d859e414d268a57ed2a2bb6f8a8e_10" -> "test_switch11.a1a6d859e414d268a57ed2a2bb6f8a8e_12" ;
"test_switch11.a1a6d859e414d268a57ed2a2bb6f8a8e_10" -> "test_switch11.a1a6d859e414d268a57ed2a2bb6f8a8e_13" ;
"test_switch11.a1a6d859e414d268a57ed2a2bb6f8a8e_11" [label="11: Call _fun_printf \n n$4=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 192, column 7]\n REMOVE_TEMPS(n$4); [line 192, column 7]\n APPLY_ABSTRACTION; [line 192, column 7]\n " shape="box"]
"test_switch11.a1a6d859e414d268a57ed2a2bb6f8a8e_11" [label="11: Call _fun_printf \n n$4=_fun_printf((char const *)\"(0)HELLO WORLD!\":char const *) [line 192, column 7]\n REMOVE_TEMPS(n$4); [line 192, column 7]\n APPLY_ABSTRACTION; [line 192, column 7]\n " shape="box"]
"test_switch11.a1a6d859e414d268a57ed2a2bb6f8a8e_11" -> "test_switch11.a1a6d859e414d268a57ed2a2bb6f8a8e_3" ;
@ -210,7 +210,7 @@ digraph cfg {
"test_switch2.0717c55583f10f472ddb2d73d867e556_8" -> "test_switch2.0717c55583f10f472ddb2d73d867e556_7" ;
"test_switch2.0717c55583f10f472ddb2d73d867e556_9" [label="9: Call _fun_printf \n n$7=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 41, column 7]\n REMOVE_TEMPS(n$7); [line 41, column 7]\n APPLY_ABSTRACTION; [line 41, column 7]\n " shape="box"]
"test_switch2.0717c55583f10f472ddb2d73d867e556_9" [label="9: Call _fun_printf \n n$7=_fun_printf((char const *)\"(0)HELLO WORLD!\":char const *) [line 41, column 7]\n REMOVE_TEMPS(n$7); [line 41, column 7]\n APPLY_ABSTRACTION; [line 41, column 7]\n " shape="box"]
"test_switch2.0717c55583f10f472ddb2d73d867e556_9" -> "test_switch2.0717c55583f10f472ddb2d73d867e556_3" ;
@ -280,7 +280,7 @@ digraph cfg {
"test_switch3.d602e3f7cc0068667fd33a3e54ff193c_7" -> "test_switch3.d602e3f7cc0068667fd33a3e54ff193c_6" ;
"test_switch3.d602e3f7cc0068667fd33a3e54ff193c_8" [label="8: Call _fun_printf \n n$7=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 63, column 7]\n REMOVE_TEMPS(n$7); [line 63, column 7]\n APPLY_ABSTRACTION; [line 63, column 7]\n " shape="box"]
"test_switch3.d602e3f7cc0068667fd33a3e54ff193c_8" [label="8: Call _fun_printf \n n$7=_fun_printf((char const *)\"(0)HELLO WORLD!\":char const *) [line 63, column 7]\n REMOVE_TEMPS(n$7); [line 63, column 7]\n APPLY_ABSTRACTION; [line 63, column 7]\n " shape="box"]
"test_switch3.d602e3f7cc0068667fd33a3e54ff193c_8" -> "test_switch3.d602e3f7cc0068667fd33a3e54ff193c_3" ;
@ -355,7 +355,7 @@ digraph cfg {
"test_switch4.70d4e6e8539e8d1ee3505d4562bc236d_8" -> "test_switch4.70d4e6e8539e8d1ee3505d4562bc236d_7" ;
"test_switch4.70d4e6e8539e8d1ee3505d4562bc236d_9" [label="9: Call _fun_printf \n n$7=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 82, column 7]\n REMOVE_TEMPS(n$7); [line 82, column 7]\n APPLY_ABSTRACTION; [line 82, column 7]\n " shape="box"]
"test_switch4.70d4e6e8539e8d1ee3505d4562bc236d_9" [label="9: Call _fun_printf \n n$7=_fun_printf((char const *)\"(0)HELLO WORLD!\":char const *) [line 82, column 7]\n REMOVE_TEMPS(n$7); [line 82, column 7]\n APPLY_ABSTRACTION; [line 82, column 7]\n " shape="box"]
"test_switch4.70d4e6e8539e8d1ee3505d4562bc236d_9" -> "test_switch4.70d4e6e8539e8d1ee3505d4562bc236d_3" ;
@ -430,7 +430,7 @@ digraph cfg {
"test_switch5.1d93fcc376cd01517eabe22cb325bcfd_8" -> "test_switch5.1d93fcc376cd01517eabe22cb325bcfd_12" ;
"test_switch5.1d93fcc376cd01517eabe22cb325bcfd_8" -> "test_switch5.1d93fcc376cd01517eabe22cb325bcfd_13" ;
"test_switch5.1d93fcc376cd01517eabe22cb325bcfd_9" [label="9: Call _fun_printf \n n$3=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 109, column 9]\n REMOVE_TEMPS(n$3); [line 109, column 9]\n APPLY_ABSTRACTION; [line 109, column 9]\n " shape="box"]
"test_switch5.1d93fcc376cd01517eabe22cb325bcfd_9" [label="9: Call _fun_printf \n n$3=_fun_printf((char const *)\"(0)HELLO WORLD!\":char const *) [line 109, column 9]\n REMOVE_TEMPS(n$3); [line 109, column 9]\n APPLY_ABSTRACTION; [line 109, column 9]\n " shape="box"]
"test_switch5.1d93fcc376cd01517eabe22cb325bcfd_9" -> "test_switch5.1d93fcc376cd01517eabe22cb325bcfd_4" ;
@ -438,7 +438,7 @@ digraph cfg {
"test_switch5.1d93fcc376cd01517eabe22cb325bcfd_10" -> "test_switch5.1d93fcc376cd01517eabe22cb325bcfd_4" ;
"test_switch5.1d93fcc376cd01517eabe22cb325bcfd_11" [label="11: Call _fun_printf \n n$6=_fun_printf(\"(out)HELLO WORLD!\":char const *) [line 105, column 7]\n " shape="box"]
"test_switch5.1d93fcc376cd01517eabe22cb325bcfd_11" [label="11: Call _fun_printf \n n$6=_fun_printf((char const *)\"(out)HELLO WORLD!\":char const *) [line 105, column 7]\n " shape="box"]
"test_switch5.1d93fcc376cd01517eabe22cb325bcfd_11" -> "test_switch5.1d93fcc376cd01517eabe22cb325bcfd_10" ;
@ -507,7 +507,7 @@ digraph cfg {
"test_switch6.a23e54b3840073f4ece330ef3c560915_13" -> "test_switch6.a23e54b3840073f4ece330ef3c560915_12" ;
"test_switch6.a23e54b3840073f4ece330ef3c560915_14" [label="14: Call _fun_printf \n n$9=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 120, column 7]\n REMOVE_TEMPS(n$9); [line 120, column 7]\n APPLY_ABSTRACTION; [line 120, column 7]\n " shape="box"]
"test_switch6.a23e54b3840073f4ece330ef3c560915_14" [label="14: Call _fun_printf \n n$9=_fun_printf((char const *)\"(0)HELLO WORLD!\":char const *) [line 120, column 7]\n REMOVE_TEMPS(n$9); [line 120, column 7]\n APPLY_ABSTRACTION; [line 120, column 7]\n " shape="box"]
"test_switch6.a23e54b3840073f4ece330ef3c560915_14" -> "test_switch6.a23e54b3840073f4ece330ef3c560915_3" ;
@ -578,7 +578,7 @@ digraph cfg {
"test_switch7.8298274f5578f21bdddf71ffa79afcb8_7" -> "test_switch7.8298274f5578f21bdddf71ffa79afcb8_6" ;
"test_switch7.8298274f5578f21bdddf71ffa79afcb8_8" [label="8: Call _fun_printf \n n$7=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 140, column 7]\n REMOVE_TEMPS(n$7); [line 140, column 7]\n APPLY_ABSTRACTION; [line 140, column 7]\n " shape="box"]
"test_switch7.8298274f5578f21bdddf71ffa79afcb8_8" [label="8: Call _fun_printf \n n$7=_fun_printf((char const *)\"(0)HELLO WORLD!\":char const *) [line 140, column 7]\n REMOVE_TEMPS(n$7); [line 140, column 7]\n APPLY_ABSTRACTION; [line 140, column 7]\n " shape="box"]
"test_switch7.8298274f5578f21bdddf71ffa79afcb8_8" -> "test_switch7.8298274f5578f21bdddf71ffa79afcb8_3" ;
@ -699,7 +699,7 @@ digraph cfg {
"test_switch8.6a6653773b94c1bb3f3c90dc1790d1ed_19" -> "test_switch8.6a6653773b94c1bb3f3c90dc1790d1ed_2" ;
"test_switch8.6a6653773b94c1bb3f3c90dc1790d1ed_20" [label="20: Call _fun_printf \n n$11=_fun_printf(\"(0)HELLO WORLD!\":char const *) [line 159, column 9]\n REMOVE_TEMPS(n$11); [line 159, column 9]\n " shape="box"]
"test_switch8.6a6653773b94c1bb3f3c90dc1790d1ed_20" [label="20: Call _fun_printf \n n$11=_fun_printf((char const *)\"(0)HELLO WORLD!\":char const *) [line 159, column 9]\n REMOVE_TEMPS(n$11); [line 159, column 9]\n " shape="box"]
"test_switch8.6a6653773b94c1bb3f3c90dc1790d1ed_20" -> "test_switch8.6a6653773b94c1bb3f3c90dc1790d1ed_19" ;

@ -249,11 +249,17 @@ int init_capture6_ok() {
char* global;
void FP_assign_array_tricky_ok() {
void assign_array_tricky_ok() {
char arr[1];
global = arr;
*(int*)arr = 123; // think this is a bug in the frontend... this instruction
// looks like &arr:int = 123
*(int*)arr = 123;
}
// Currently the frontend does not translate the casting of pointers to float.
void FP_assign_array_tricky2_ok() {
char arr[1];
global = arr;
*(float*)arr = 1.0;
}
void placement_new_ok(int len, int* ptr) {

@ -1,7 +1,7 @@
codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::Exceptions_FP_read_in_catch_tricky_ok, 1, DEAD_STORE, no_bucket, ERROR, [Write of unused value]
codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::Exceptions_dead_in_catch_bad, 4, DEAD_STORE, no_bucket, ERROR, [Write of unused value]
codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::Exceptions_unreachable_catch_bad, 1, DEAD_STORE, no_bucket, ERROR, [Write of unused value]
codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::FP_assign_array_tricky_ok, 3, DEAD_STORE, no_bucket, ERROR, [Write of unused value]
codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::FP_assign_array_tricky2_ok, 3, DEAD_STORE, no_bucket, ERROR, [Write of unused value]
codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::capture_by_value_bad, 3, DEAD_STORE, no_bucket, ERROR, [Write of unused value]
codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::dead_pointer_bad, 2, DEAD_STORE, no_bucket, ERROR, [Write of unused value]
codetoanalyze/cpp/liveness/dead_stores.cpp, dead_stores::dead_store_before_capture_by_ref_bad, 1, DEAD_STORE, no_bucket, ERROR, [Write of unused value]

@ -90,11 +90,11 @@ digraph cfg {
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_2" [label="2: Exit Boxing_getS \n NULLIFY(&s); [line 43, column 1]\n " color=yellow style=filled]
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_3" [label="3: Return Stmt \n n$22=_fun_NSString_stringWithUTF8String:(\"hello world\":char const *) [line 41, column 10]\n *&return:NSString*=n$22 [line 41, column 3]\n REMOVE_TEMPS(n$22); [line 41, column 3]\n APPLY_ABSTRACTION; [line 41, column 3]\n " shape="box"]
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_3" [label="3: Return Stmt \n n$22=_fun_NSString_stringWithUTF8String:((char const *)\"hello world\":char const *) [line 41, column 10]\n *&return:NSString*=n$22 [line 41, column 3]\n REMOVE_TEMPS(n$22); [line 41, column 3]\n APPLY_ABSTRACTION; [line 41, column 3]\n " shape="box"]
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_3" -> "getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_2" ;
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_4" [label="4: DeclStmt \n n$25=_fun___variable_initialization(&s:NSString*) [line 40, column 3]\n n$23=_fun_strdup(\"hello world\":char const *) [line 40, column 19]\n n$24=_fun_NSString_stringWithUTF8String:(n$23:char const *) [line 40, column 17]\n *&s:NSString*=n$24 [line 40, column 3]\n REMOVE_TEMPS(n$23,n$24,n$25); [line 40, column 3]\n " shape="box"]
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_4" [label="4: DeclStmt \n n$25=_fun___variable_initialization(&s:NSString*) [line 40, column 3]\n n$23=_fun_strdup((char const *)\"hello world\":char const *) [line 40, column 19]\n n$24=_fun_NSString_stringWithUTF8String:((char const *)n$23:char const *) [line 40, column 17]\n *&s:NSString*=n$24 [line 40, column 3]\n REMOVE_TEMPS(n$23,n$24,n$25); [line 40, column 3]\n " shape="box"]
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_4" -> "getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_3" ;

@ -7,7 +7,7 @@ digraph cfg {
"get_string1.37988b3a9459aa3258beba816a2c79fc_2" [label="2: Exit get_string1 \n " color=yellow style=filled]
"get_string1.37988b3a9459aa3258beba816a2c79fc_3" [label="3: Return Stmt \n n$0=_fun_NSString_stringWithUTF8String:(\"Hello World!\":char const *) [line 12, column 10]\n *&return:NSString*=n$0 [line 12, column 3]\n REMOVE_TEMPS(n$0); [line 12, column 3]\n APPLY_ABSTRACTION; [line 12, column 3]\n " shape="box"]
"get_string1.37988b3a9459aa3258beba816a2c79fc_3" [label="3: Return Stmt \n n$0=_fun_NSString_stringWithUTF8String:((char const *)\"Hello World!\":char const *) [line 12, column 10]\n *&return:NSString*=n$0 [line 12, column 3]\n REMOVE_TEMPS(n$0); [line 12, column 3]\n APPLY_ABSTRACTION; [line 12, column 3]\n " shape="box"]
"get_string1.37988b3a9459aa3258beba816a2c79fc_3" -> "get_string1.37988b3a9459aa3258beba816a2c79fc_2" ;

@ -136,7 +136,7 @@ digraph cfg {
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_16" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_5" ;
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_17" [label="17: DeclStmt \n n$34=_fun___variable_initialization(&stop:_Bool*) [line 45, column 3]\n n$33=_fun_malloc_no_fail(sizeof(t=_Bool;nbytes=1):_Bool) [line 45, column 16]\n *&stop:_Bool*=n$33 [line 45, column 3]\n REMOVE_TEMPS(n$33,n$34); [line 45, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_17" [label="17: DeclStmt \n n$34=_fun___variable_initialization(&stop:_Bool*) [line 45, column 3]\n n$33=_fun_malloc_no_fail(sizeof(t=_Bool;nbytes=1):_Bool) [line 45, column 16]\n *&stop:_Bool*=(_Bool*)n$33 [line 45, column 3]\n REMOVE_TEMPS(n$33,n$34); [line 45, column 3]\n " shape="box"]
"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_17" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_16" ;

@ -11,7 +11,7 @@ digraph cfg {
"CategoryProcdescMain.ae2ee334c26ccbf8ee413efe5d896611_3" -> "CategoryProcdescMain.ae2ee334c26ccbf8ee413efe5d896611_2" ;
"CategoryProcdescMain.ae2ee334c26ccbf8ee413efe5d896611_4" [label="4: DeclStmt \n n$1=_fun___variable_initialization(&x:int*) [line 14, column 3]\n n$0=_fun_malloc_no_fail(sizeof(t=int;nbytes=4):int) [line 14, column 12]\n *&x:int*=n$0 [line 14, column 3]\n REMOVE_TEMPS(n$0,n$1); [line 14, column 3]\n " shape="box"]
"CategoryProcdescMain.ae2ee334c26ccbf8ee413efe5d896611_4" [label="4: DeclStmt \n n$1=_fun___variable_initialization(&x:int*) [line 14, column 3]\n n$0=_fun_malloc_no_fail(sizeof(t=int;nbytes=4):int) [line 14, column 12]\n *&x:int*=(int*)n$0 [line 14, column 3]\n REMOVE_TEMPS(n$0,n$1); [line 14, column 3]\n " shape="box"]
"CategoryProcdescMain.ae2ee334c26ccbf8ee413efe5d896611_4" -> "CategoryProcdescMain.ae2ee334c26ccbf8ee413efe5d896611_3" ;

@ -176,7 +176,7 @@ digraph cfg {
"blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_5" -> "blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_4" ;
"blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_6" [label="6: DeclStmt \n n$68=_fun___variable_initialization(&x:int*) [line 92, column 3]\n n$67=_fun_malloc_no_fail(sizeof(t=int;nbytes=4):int) [line 92, column 12]\n *&x:int*=n$67 [line 92, column 3]\n REMOVE_TEMPS(n$67,n$68); [line 92, column 3]\n " shape="box"]
"blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_6" [label="6: DeclStmt \n n$68=_fun___variable_initialization(&x:int*) [line 92, column 3]\n n$67=_fun_malloc_no_fail(sizeof(t=int;nbytes=4):int) [line 92, column 12]\n *&x:int*=(int*)n$67 [line 92, column 3]\n REMOVE_TEMPS(n$67,n$68); [line 92, column 3]\n " shape="box"]
"blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_6" -> "blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_5" ;
@ -199,7 +199,7 @@ digraph cfg {
"blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_5" -> "blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_4" ;
"blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_6" [label="6: DeclStmt \n n$81=_fun___variable_initialization(&x:int*) [line 101, column 3]\n n$80=_fun_malloc_no_fail(sizeof(t=int;nbytes=4):int) [line 101, column 12]\n *&x:int*=n$80 [line 101, column 3]\n REMOVE_TEMPS(n$80,n$81); [line 101, column 3]\n " shape="box"]
"blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_6" [label="6: DeclStmt \n n$81=_fun___variable_initialization(&x:int*) [line 101, column 3]\n n$80=_fun_malloc_no_fail(sizeof(t=int;nbytes=4):int) [line 101, column 12]\n *&x:int*=(int*)n$80 [line 101, column 3]\n REMOVE_TEMPS(n$80,n$81); [line 101, column 3]\n " shape="box"]
"blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_6" -> "blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_5" ;
@ -241,7 +241,7 @@ digraph cfg {
"regularLeak#MemoryLeakExample#instance.939a892cee505c3459f2d889292f218b_4" -> "regularLeak#MemoryLeakExample#instance.939a892cee505c3459f2d889292f218b_3" ;
"regularLeak#MemoryLeakExample#instance.939a892cee505c3459f2d889292f218b_5" [label="5: DeclStmt \n n$59=_fun___variable_initialization(&x:int*) [line 86, column 3]\n n$58=_fun_malloc_no_fail(sizeof(t=int;nbytes=4):int) [line 86, column 12]\n *&x:int*=n$58 [line 86, column 3]\n REMOVE_TEMPS(n$58,n$59); [line 86, column 3]\n " shape="box"]
"regularLeak#MemoryLeakExample#instance.939a892cee505c3459f2d889292f218b_5" [label="5: DeclStmt \n n$59=_fun___variable_initialization(&x:int*) [line 86, column 3]\n n$58=_fun_malloc_no_fail(sizeof(t=int;nbytes=4):int) [line 86, column 12]\n *&x:int*=(int*)n$58 [line 86, column 3]\n REMOVE_TEMPS(n$58,n$59); [line 86, column 3]\n " shape="box"]
"regularLeak#MemoryLeakExample#instance.939a892cee505c3459f2d889292f218b_5" -> "regularLeak#MemoryLeakExample#instance.939a892cee505c3459f2d889292f218b_4" ;

@ -22,7 +22,7 @@ digraph cfg {
"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 39, column 45]\n n$1=_fun_CTFontCreateWithName(n$0:__CFString const *,17.:double,null:CGAffineTransform const *) [line 39, column 24]\n n$2=_fun_CFAutorelease(n$1:void const *) [line 39, column 10]\n *&return:__CTFont const *=n$2 [line 39, column 3]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 39, column 3]\n APPLY_ABSTRACTION; [line 39, column 3]\n " shape="box"]
"cfautorelease_test.2ccea2233b65cd3828a2d5e2571ad69b_3" [label="3: Return Stmt \n n$0=_fun___builtin___CFStringMakeConstantString((char const *)\"Icon\":char const *) [line 39, column 45]\n n$1=_fun_CTFontCreateWithName(n$0:__CFString const *,17.:double,null:CGAffineTransform const *) [line 39, column 24]\n n$2=_fun_CFAutorelease(n$1:void const *) [line 39, column 10]\n *&return:__CTFont const *=n$2 [line 39, column 3]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 39, column 3]\n APPLY_ABSTRACTION; [line 39, column 3]\n " shape="box"]
"cfautorelease_test.2ccea2233b65cd3828a2d5e2571ad69b_3" -> "cfautorelease_test.2ccea2233b65cd3828a2d5e2571ad69b_2" ;

Loading…
Cancel
Save