diff --git a/src/plugins/alias/src/analysis.ml b/src/plugins/alias/src/analysis.ml index e0b01c009980cfd3c7618d67ffcb31c8a10f8029..6a53cab4388a82a2a66cda462806580525d62056 100644 --- a/src/plugins/alias/src/analysis.ml +++ b/src/plugins/alias/src/analysis.ml @@ -66,6 +66,9 @@ module Stmt_table = struct type value = data end +(* Abstract state after taking into account all global variable definitions *) +let initial_state = ref @@ Some Abstract_state.empty + let warn_unsupported_explicit_pointer pp_obj obj loc = Options.warning ~source:(fst loc) ~wkey:Options.Warn.unsupported_address "unsupported feature: explicit pointer address: %a; analysis may be unsound" pp_obj obj @@ -82,7 +85,31 @@ let rec do_init (lv:lval) (init:init) state = | CompoundInit (_, l) -> List.fold_left (fun state (o, init) -> do_init (Cil.addOffsetLval o lv) init state) state l -let doFunction f = !function_compute_ref f +let pp_abstract_state_opt ?(debug=false) fmt v = + match v with + | None -> Format.fprintf fmt "⊥" + | Some a -> Abstract_state.pretty ~debug fmt a + +let analyse_global_var v initinfo st = + match initinfo.init with + | None -> st + | Some init -> + Options.feedback ~level:3 + "@[analysing global variable definiton:@ @[%a@]@ =@ @[%a@];@]" + Printer.pp_varinfo v + Printer.pp_initinfo initinfo; + let result = do_init (Var v, NoOffset) init st in + Options.feedback ~level:3 + "@[May-aliases after global variable definition@;<2>@[%a@]@;<2>are@;<2>@[%a@]@]" + Printer.pp_varinfo v + (pp_abstract_state_opt ~debug:false) result; + Options.debug ~level:3 + "@[May-alias graph after global variable definition@;<2>@[%a@]@;<2>is@;<4>@[%a@]@]" + Printer.pp_varinfo v + (pp_abstract_state_opt ~debug:true) result; + result + +let analyse_function f = !function_compute_ref f let do_function_call (stmt:stmt) state (res : lval option) (ef : exp) (args: exp list) loc = let is_malloc (s:string) : bool = @@ -101,7 +128,9 @@ let do_function_call (stmt:stmt) state (res : lval option) (ef : exp) (args: exp Some a end | _ -> (* general case *) - let get_function kf = try Function_table.find kf with Not_found -> doFunction kf in + let get_function kf = + try Function_table.find kf + with Not_found -> analyse_function kf in let summaries = match Kernel_function.get_called ef with | Some kf when Kernel_function.is_main kf -> [] @@ -150,11 +179,6 @@ let analyse_instr (s:stmt) (i:instr) (a:Abstract_state.t option) : Abstract_stat "unsupported feature: assembler code; skipping"; a -let pp_abstract_state_opt ?(debug=false) fmt v = - match v with - | None -> Format.fprintf fmt "⊥" - | Some a -> Abstract_state.pretty ~debug fmt a - let do_instr (s:stmt) (i:instr) (a:Abstract_state.t option) : Abstract_state.t option = Options.feedback ~level:3 "@[analysing instruction:@ %a@]" Printer.pp_stmt s; let result = analyse_instr s i a in @@ -213,26 +237,27 @@ let do_stmt (a: Abstract_state.t) (s:stmt) : Abstract_state.t = | _ -> a let analyse_function (kf:kernel_function) = - if not @@ Kernel_function.has_definition kf then None else begin - Options.feedback ~level:2 "analysing function: %a" Kernel_function.pretty kf; - let first_stmt = - try Kernel_function.find_first_stmt kf - with Kernel_function.No_Statement -> assert false - in - T.StmtStartData.add first_stmt (Some Abstract_state.empty); - F.compute [first_stmt]; - let return_stmt = Kernel_function.find_return kf in - try Stmt_table.find return_stmt - with Not_found -> - let source, _ = Kernel_function.get_location kf in - Options.warning ~source ~wkey:Options.Warn.no_return_stmt - "function %a does not return; analysis may be unsound" - Kernel_function.pretty kf; - Some Abstract_state.empty - end - -let doFunction (kf:kernel_function) = - let final_state = analyse_function kf in + let final_state = + if not @@ Kernel_function.has_definition kf then None else + let () = + Options.feedback ~level:2 "analysing function: %a" + Kernel_function.pretty kf + in + let first_stmt = + try Kernel_function.find_first_stmt kf + with Kernel_function.No_Statement -> assert false + in + T.StmtStartData.add first_stmt !initial_state; + F.compute [first_stmt]; + let return_stmt = Kernel_function.find_return kf in + try Stmt_table.find return_stmt + with Not_found -> + let source, _ = Kernel_function.get_location kf in + Options.warning ~source ~wkey:Options.Warn.no_return_stmt + "function %a does not return; analysis may be unsound" + Kernel_function.pretty kf; + !initial_state + in let level = if Kernel_function.is_main kf then 1 else 2 in final_state |> Option.iter (fun s -> Options.feedback ~level "@[May-aliases at the end of function %a:@ @[%a@]" @@ -262,7 +287,7 @@ let doFunction (kf:kernel_function) = Function_table.add kf result; result -let () = function_compute_ref := doFunction +let () = function_compute_ref := analyse_function let make_summary (state:Abstract_state.t) (kf:kernel_function) = try begin match Function_table.find kf with @@ -270,7 +295,7 @@ let make_summary (state:Abstract_state.t) (kf:kernel_function) = | None -> Options.fatal "not implemented" end with Not_found -> - begin match doFunction kf with + begin match analyse_function kf with | Some s -> (state, s) | None -> Options.fatal "not implemented" end @@ -299,7 +324,8 @@ let print_function_table_elt fmt kf s : unit = let compute () = Ast.compute (); - Globals.Functions.iter (fun kf -> ignore @@ doFunction kf); + initial_state := Globals.Vars.fold_in_file_order analyse_global_var (Some Abstract_state.empty); + Globals.Functions.iter (fun kf -> ignore @@ analyse_function kf); computed_flag := true; if Options.ShowStmtTable.get () then Stmt_table.iter (print_stmt_table_elt Format.std_formatter); @@ -308,6 +334,7 @@ let compute () = let clear () = computed_flag := false; + initial_state := Some Abstract_state.empty; Stmt_table.clear () let get_state_before_stmt stmt = diff --git a/src/plugins/alias/tests/basic/assignment3.c b/src/plugins/alias/tests/basic/assignment3.c index 203e93650c145bd0ee2a10cf547852a24551c02f..d5a05286523dc157f8ebbf913161a4edadf6d542 100644 --- a/src/plugins/alias/tests/basic/assignment3.c +++ b/src/plugins/alias/tests/basic/assignment3.c @@ -1,10 +1,8 @@ // address assignment // {a, c} are aliased -int main () { +int b=0, *a=&b, *c=&b; - int *a=0, b=0, *c=0; - a = &b; - c = &b; +int main () { return 0; } diff --git a/src/plugins/alias/tests/basic/oracle/assignment3.res.oracle b/src/plugins/alias/tests/basic/oracle/assignment3.res.oracle index 22605c19af07f9a50a3b547c507b389718b4adec..1f13b24990ed91251f2212ff125f7ea6e664ee0d 100644 --- a/src/plugins/alias/tests/basic/oracle/assignment3.res.oracle +++ b/src/plugins/alias/tests/basic/oracle/assignment3.res.oracle @@ -1,21 +1,16 @@ [kernel] Parsing assignment3.c (with preprocessing) -[alias] analysing function: main -[alias] analysing instruction: int *a = (int *)0; -[alias] May-aliases after instruction int *a = (int *)0; are <none> -[alias] May-alias graph after instruction int *a = (int *)0; is <empty> -[alias] analysing instruction: int b = 0; -[alias] May-aliases after instruction int b = 0; are <none> -[alias] May-alias graph after instruction int b = 0; is <empty> -[alias] analysing instruction: int *c = (int *)0; -[alias] May-aliases after instruction int *c = (int *)0; are <none> -[alias] May-alias graph after instruction int *c = (int *)0; is <empty> -[alias] analysing instruction: a = & b; -[alias] May-aliases after instruction a = & b; are <none> -[alias] May-alias graph after instruction a = & b; is 0:{ a } → 1:{ b } -[alias] analysing instruction: c = & b; -[alias] May-aliases after instruction c = & b; are { a; c } -[alias] May-alias graph after instruction c = & b; is +[alias] analysing global variable definiton: b = 0; +[alias] May-aliases after global variable definition b are <none> +[alias] May-alias graph after global variable definition b is <empty> +[alias] analysing global variable definiton: a = & b; +[alias] May-aliases after global variable definition a are <none> +[alias] May-alias graph after global variable definition a is + 0:{ a } → 1:{ b } +[alias] analysing global variable definiton: c = & b; +[alias] May-aliases after global variable definition c are { a; c } +[alias] May-alias graph after global variable definition c is 0:{ a } → 5:{ b } 4:{ c } → 5:{ b } +[alias] analysing function: main [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are { a; c } [alias] May-alias graph after instruction __retres = 0; is diff --git a/src/plugins/alias/tests/basic/oracle/function2.res.oracle b/src/plugins/alias/tests/basic/oracle/function2.res.oracle index d7e607ebde164861b5db116e4a2157a97f9e278b..6fd6c29c30d1e8f5cc1a792ea69b1baa703f60c6 100644 --- a/src/plugins/alias/tests/basic/oracle/function2.res.oracle +++ b/src/plugins/alias/tests/basic/oracle/function2.res.oracle @@ -1,49 +1,84 @@ [kernel] Parsing function2.c (with preprocessing) +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are <none> +[alias] May-alias graph after global variable definition __fc_rand_max is + <empty> +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing function: main [alias] analysing instruction: int *a = (int *)0; -[alias] May-aliases after instruction int *a = (int *)0; are <none> -[alias] May-alias graph after instruction int *a = (int *)0; is <empty> +[alias] May-aliases after instruction int *a = (int *)0; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int *a = (int *)0; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: int *b = (int *)0; -[alias] May-aliases after instruction int *b = (int *)0; are <none> -[alias] May-alias graph after instruction int *b = (int *)0; is <empty> +[alias] May-aliases after instruction int *b = (int *)0; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int *b = (int *)0; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: a = my_malloc(2); [alias] analysing function: my_malloc [alias] analysing instruction: int *res = (int *)0; -[alias] May-aliases after instruction int *res = (int *)0; are <none> -[alias] May-alias graph after instruction int *res = (int *)0; is <empty> +[alias] May-aliases after instruction int *res = (int *)0; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int *res = (int *)0; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: res = (int *)malloc((size_t)size); [alias] May-aliases after instruction res = (int *)malloc((size_t)size); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction res = (int *)malloc((size_t)size); is - 0:{ res } → 1:{ } -[alias] May-aliases at the end of function my_malloc: <none> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ res } → 5:{ } +[alias] May-aliases at the end of function my_malloc: + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph at the end of function my_malloc: - 0:{ res } → 1:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ res } → 5:{ } [alias] Summary of function my_malloc: - formals: size returns: res state: <none> -[alias] May-aliases after instruction a = my_malloc(2); are <none> + formals: size returns: res + state: { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-aliases after instruction a = my_malloc(2); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a = my_malloc(2); is - 4:{ a } → 3:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 12:{ a } → 11:{ } [alias] analysing instruction: b = my_malloc(3); -[alias] May-aliases after instruction b = my_malloc(3); are <none> +[alias] May-aliases after instruction b = my_malloc(3); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction b = my_malloc(3); is - 4:{ a } → 3:{ } 8:{ b } → 7:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 12:{ a } → 11:{ } 20:{ b } → 19:{ } [alias] analysing instruction: __retres = 0; -[alias] May-aliases after instruction __retres = 0; are <none> +[alias] May-aliases after instruction __retres = 0; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction __retres = 0; is - 4:{ a } → 3:{ } 8:{ b } → 7:{ } -[alias] May-aliases at the end of function main: <none> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 12:{ a } → 11:{ } 20:{ b } → 19:{ } +[alias] May-aliases at the end of function main: + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph at the end of function main: - 4:{ a } → 3:{ } 8:{ b } → 7:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 12:{ a } → 11:{ } 20:{ b } → 19:{ } [alias] Summary of function main: - formals: returns: __retres state: <none> + formals: returns: __retres + state: { __fc_random48_counter; __fc_p_random48_counter } [alias] analysing function: my_malloc [alias] analysing instruction: int *res = (int *)0; -[alias] May-aliases after instruction int *res = (int *)0; are <none> -[alias] May-alias graph after instruction int *res = (int *)0; is <empty> -[alias] May-aliases at the end of function my_malloc: <none> +[alias] May-aliases after instruction int *res = (int *)0; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int *res = (int *)0; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } +[alias] May-aliases at the end of function my_malloc: + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph at the end of function my_malloc: - 0:{ res } → 1:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ res } → 5:{ } [alias] Summary of function my_malloc: - formals: size returns: res state: <none> + formals: size returns: res + state: { __fc_random48_counter; __fc_p_random48_counter } [alias] Analysis complete diff --git a/src/plugins/alias/tests/basic/oracle/while_for1.res.oracle b/src/plugins/alias/tests/basic/oracle/while_for1.res.oracle index 0db95fcf8a6756a1d61297dbfbf3436e506730e7..0a9d87b2242132299825a191c5a37044ec767f0b 100644 --- a/src/plugins/alias/tests/basic/oracle/while_for1.res.oracle +++ b/src/plugins/alias/tests/basic/oracle/while_for1.res.oracle @@ -1,28 +1,56 @@ [kernel] Parsing while_for1.c (with preprocessing) +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are <none> +[alias] May-alias graph after global variable definition __fc_rand_max is + <empty> +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing function: main [alias] analysing instruction: int *s = (int *)0; -[alias] May-aliases after instruction int *s = (int *)0; are <none> -[alias] May-alias graph after instruction int *s = (int *)0; is <empty> +[alias] May-aliases after instruction int *s = (int *)0; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int *s = (int *)0; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: int idx = 0; -[alias] May-aliases after instruction int idx = 0; are <none> -[alias] May-alias graph after instruction int idx = 0; is <empty> +[alias] May-aliases after instruction int idx = 0; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int idx = 0; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: s = (int *)malloc((size_t)idx); -[alias] May-aliases after instruction s = (int *)malloc((size_t)idx); are <none> +[alias] May-aliases after instruction s = (int *)malloc((size_t)idx); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction s = (int *)malloc((size_t)idx); is - 0:{ s } → 1:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ s } → 5:{ } [alias] analysing instruction: idx ++; -[alias] May-aliases after instruction idx ++; are <none> -[alias] May-alias graph after instruction idx ++; is 0:{ s } → 1:{ } +[alias] May-aliases after instruction idx ++; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction idx ++; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ s } → 5:{ } [alias] analysing instruction: s = (int *)malloc((size_t)idx); -[alias] May-aliases after instruction s = (int *)malloc((size_t)idx); are <none> +[alias] May-aliases after instruction s = (int *)malloc((size_t)idx); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction s = (int *)malloc((size_t)idx); is - 0:{ s } → 1:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ s } → 5:{ } [alias] analysing instruction: __retres = 0; -[alias] May-aliases after instruction __retres = 0; are <none> -[alias] May-alias graph after instruction __retres = 0; is 0:{ s } → 1:{ } -[alias] May-aliases at the end of function main: <none> +[alias] May-aliases after instruction __retres = 0; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction __retres = 0; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ s } → 5:{ } +[alias] May-aliases at the end of function main: + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph at the end of function main: - 0:{ s } → 1:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ s } → 5:{ } [alias] Summary of function main: - formals: returns: __retres state: <none> + formals: returns: __retres + state: { __fc_random48_counter; __fc_p_random48_counter } [alias] Analysis complete diff --git a/src/plugins/alias/tests/fixed_bugs/oracle/arrays.res.oracle b/src/plugins/alias/tests/fixed_bugs/oracle/arrays.res.oracle index dc03371929486375affbc2fdcb1da5e66a3b1e85..e098f51a1e1b2515b12ef19ecb4af314b6983531 100644 --- a/src/plugins/alias/tests/fixed_bugs/oracle/arrays.res.oracle +++ b/src/plugins/alias/tests/fixed_bugs/oracle/arrays.res.oracle @@ -1,49 +1,81 @@ [kernel] Parsing arrays.c (with preprocessing) +[alias] analysing global variable definiton: __fc_p_fopen = __fc_fopen; +[alias] May-aliases after global variable definition __fc_p_fopen are + { __fc_fopen; __fc_p_fopen } +[alias] May-alias graph after global variable definition __fc_p_fopen is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } +[alias] analysing global variable definiton: __fc_p_tmpnam = __fc_tmpnam; +[alias] May-aliases after global variable definition __fc_p_tmpnam are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after global variable definition __fc_p_tmpnam is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } [alias] analysing function: main [alias] analysing instruction: t[0] = a; -[alias] May-aliases after instruction t[0] = a; are { a; t[0..] } +[alias] May-aliases after instruction t[0] = a; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { a; t[0..] } [alias] May-alias graph after instruction t[0] = a; is - 0:{ t } → 1:{ a } 1:{ a } → 2:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 8:{ t } → 9:{ a } + 9:{ a } → 10:{ } [alias] analysing instruction: z = & t; [alias] May-aliases after instruction z = & t; are - { *z; t } { (*z)[0..]; a; t[0..] } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *z; t } + { (*z)[0..]; a; t[0..] } [alias] May-alias graph after instruction z = & t; is - 5:{ z } → 6:{ t } 6:{ t } → 7:{ a } 7:{ a } → 8:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 13:{ z } → 14:{ t } + 14:{ t } → 15:{ a } 15:{ a } → 16:{ } [alias] analysing instruction: q = z; [alias] May-aliases after instruction q = z; are - { z; q } { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; t[0..] } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; t[0..] } [alias] May-alias graph after instruction q = z; is - 10:{ z; q } → 11:{ t } 11:{ t } → 12:{ a } 12:{ a } → 13:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 18:{ z; q } → 19:{ t } + 19:{ t } → 20:{ a } 20:{ a } → 21:{ } [alias] analysing instruction: b = (*(z + 0))[0]; [alias] May-aliases after instruction b = (*(z + 0))[0]; are - { z; q } { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; t[0..] } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; t[0..] } [alias] May-alias graph after instruction b = (*(z + 0))[0]; is - 10:{ z; q } → 11:{ t } 11:{ t } → 14:{ a; b } 14:{ a; b } → 15:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 18:{ z; q } → 19:{ t } + 19:{ t } → 22:{ a; b } 22:{ a; b } → 23:{ } [alias] analysing instruction: n = (*(q + 0))[0]; [alias] May-aliases after instruction n = (*(q + 0))[0]; are - { z; q } { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; n; t[0..] } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; n; t[0..] } [alias] May-alias graph after instruction n = (*(q + 0))[0]; is - 10:{ z; q } → 11:{ t } 11:{ t } → 16:{ a; b; n } - 16:{ a; b; n } → 17:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 18:{ z; q } → 19:{ t } + 19:{ t } → 24:{ a; b; n } 24:{ a; b; n } → 25:{ } [alias] analysing instruction: printf("%d\n%d\n",a == b,a == n); [alias:undefined:fn] arrays.c:17: Warning: function printf has no definition [alias] May-aliases after instruction printf("%d\n%d\n",a == b,a == n); are - { z; q } { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; n; t[0..] } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; n; t[0..] } [alias] May-alias graph after instruction printf("%d\n%d\n",a == b,a == n); is - 10:{ z; q } → 11:{ t } 11:{ t } → 16:{ a; b; n } - 16:{ a; b; n } → 17:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 18:{ z; q } → 19:{ t } + 19:{ t } → 24:{ a; b; n } 24:{ a; b; n } → 25:{ } [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are - { z; q } { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; n; t[0..] } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; n; t[0..] } [alias] May-alias graph after instruction __retres = 0; is - 10:{ z; q } → 11:{ t } 11:{ t } → 16:{ a; b; n } - 16:{ a; b; n } → 17:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 18:{ z; q } → 19:{ t } + 19:{ t } → 24:{ a; b; n } 24:{ a; b; n } → 25:{ } [alias] May-aliases at the end of function main: - { z; q } { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; n; t[0..] } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; n; t[0..] } [alias] May-alias graph at the end of function main: - 10:{ z; q } → 11:{ t } 11:{ t } → 16:{ a; b; n } - 16:{ a; b; n } → 17:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 18:{ z; q } → 19:{ t } + 19:{ t } → 24:{ a; b; n } 24:{ a; b; n } → 25:{ } [alias] Summary of function main: formals: returns: __retres - state: { z; q } { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; n; t[0..] } + state: { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { z; q } { *z; *q; t } { (*z)[0..]; (*q)[0..]; a; b; n; t[0..] } [alias] Analysis complete diff --git a/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla.res.oracle b/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla.res.oracle index 96084ba3ad058fd772be8579c58ca1c1df4e0175..71054680039d0c59c764392effbaf9491998df16 100644 --- a/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla.res.oracle +++ b/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla.res.oracle @@ -1,176 +1,350 @@ [kernel] Parsing ex_jfla.c (with preprocessing) +[alias] analysing global variable definiton: __fc_p_fopen = __fc_fopen; +[alias] May-aliases after global variable definition __fc_p_fopen are + { __fc_fopen; __fc_p_fopen } +[alias] May-alias graph after global variable definition __fc_p_fopen is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } +[alias] analysing global variable definiton: __fc_p_tmpnam = __fc_tmpnam; +[alias] May-aliases after global variable definition __fc_p_tmpnam are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after global variable definition __fc_p_tmpnam is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after global variable definition __fc_rand_max is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } [alias] analysing function: create_str_t [alias] analysing instruction: str_t *res = malloc(sizeof(str_t)); [alias] May-aliases after instruction str_t *res = malloc(sizeof(str_t)); are - <none> + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction str_t *res = malloc(sizeof(str_t)); is - 0:{ res } → 1:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } [alias] analysing instruction: res->a = (int *)malloc(sizeof(int)); [alias] May-aliases after instruction res->a = (int *)malloc(sizeof(int)); are - <none> + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction res->a = (int *)malloc(sizeof(int)); - is 0:{ res } → 1:{ } 1:{ } -a→ 2:{ } 2:{ } → 3:{ } + is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } 13:{ } -a→ 14:{ } 14:{ } → 15:{ } [alias] analysing instruction: res->b = (int *)malloc(sizeof(int)); [alias] May-aliases after instruction res->b = (int *)malloc(sizeof(int)); are - <none> + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction res->b = (int *)malloc(sizeof(int)); is - 0:{ res } → 1:{ } 1:{ } -a→ 2:{ } 1:{ } -b→ 4:{ } - 2:{ } → 3:{ } 4:{ } → 5:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } 13:{ } -a→ 14:{ } 13:{ } -b→ 16:{ } + 14:{ } → 15:{ } 16:{ } → 17:{ } [alias] analysing instruction: *(res->a) = va; -[alias] May-aliases after instruction *(res->a) = va; are <none> +[alias] May-aliases after instruction *(res->a) = va; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *(res->a) = va; is - 0:{ res } → 1:{ } 1:{ } -a→ 2:{ } 1:{ } -b→ 4:{ } - 2:{ } → 3:{ } 4:{ } → 5:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } 13:{ } -a→ 14:{ } 13:{ } -b→ 16:{ } + 14:{ } → 15:{ } 16:{ } → 17:{ } [alias] analysing instruction: res->b = b; -[alias] May-aliases after instruction res->b = b; are { res->b; b } +[alias] May-aliases after instruction res->b = b; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { res->b; b } [alias] May-alias graph after instruction res->b = b; is - 0:{ res } → 1:{ } 1:{ } -a→ 2:{ } 1:{ } -b→ 4:{ b } - 2:{ } → 3:{ } 4:{ b } → 5:{ } -[alias] May-aliases at the end of function create_str_t: { res->b; b } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } 13:{ } -a→ 14:{ } 13:{ } -b→ 16:{ b } + 14:{ } → 15:{ } 16:{ b } → 17:{ } +[alias] May-aliases at the end of function create_str_t: + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { res->b; b } [alias] May-alias graph at the end of function create_str_t: - 0:{ res } → 1:{ } 1:{ } -a→ 2:{ } 1:{ } -b→ 4:{ b } - 2:{ } → 3:{ } 4:{ b } → 5:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } 13:{ } -a→ 14:{ } 13:{ } -b→ 16:{ b } + 14:{ } → 15:{ } 16:{ b } → 17:{ } [alias] Summary of function create_str_t: - formals: va b returns: res state: { res->b; b } + formals: va b returns: res + state: { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { res->b; b } [alias] analysing function: jfla [alias] analysing instruction: *(s->b) = *(s->a); -[alias] May-aliases after instruction *(s->b) = *(s->a); are <none> -[alias] May-alias graph after instruction *(s->b) = *(s->a); is <empty> +[alias] May-aliases after instruction *(s->b) = *(s->a); are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction *(s->b) = *(s->a); is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } [alias] analysing instruction: s->a = i1; -[alias] May-aliases after instruction s->a = i1; are { s->a; i1 } +[alias] May-aliases after instruction s->a = i1; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s->a; i1 } [alias] May-alias graph after instruction s->a = i1; is - 8:{ s } → 9:{ } 9:{ } -a→ 10:{ i1 } 10:{ i1 } → 12:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 20:{ s } → 21:{ } 21:{ } -a→ 22:{ i1 } 22:{ i1 } → 24:{ } [alias] analysing instruction: s->a = i2; -[alias] May-aliases after instruction s->a = i2; are { s->a; i2 } +[alias] May-aliases after instruction s->a = i2; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s->a; i2 } [alias] May-alias graph after instruction s->a = i2; is - 13:{ s } → 14:{ } 14:{ } -a→ 15:{ i2 } 15:{ i2 } → 17:{ } -[alias] May-aliases at the end of function jfla: { s->a; i1; i2 } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 25:{ s } → 26:{ } 26:{ } -a→ 27:{ i2 } 27:{ i2 } → 29:{ } +[alias] May-aliases at the end of function jfla: + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s->a; i1; i2 } [alias] May-alias graph at the end of function jfla: - 8:{ s } → 9:{ } 9:{ } -a→ 10:{ i1; i2 } 10:{ i1; i2 } → 12:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 20:{ s } → 21:{ } 21:{ } -a→ 22:{ i1; i2 } + 22:{ i1; i2 } → 24:{ } [alias] Summary of function jfla: - formals: s i1 i2 b returns: <none> state: { s->a; i1; i2 } + formals: s i1 i2 b returns: <none> + state: { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s->a; i1; i2 } [alias] analysing function: main [alias] analysing instruction: int u = 11; -[alias] May-aliases after instruction int u = 11; are <none> -[alias] May-alias graph after instruction int u = 11; is <empty> +[alias] May-aliases after instruction int u = 11; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int u = 11; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } [alias] analysing instruction: int v = 12; -[alias] May-aliases after instruction int v = 12; are <none> -[alias] May-alias graph after instruction int v = 12; is <empty> +[alias] May-aliases after instruction int v = 12; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int v = 12; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } [alias] analysing instruction: int t[3] = {0, 1, 2}; -[alias] May-aliases after instruction int t[3] = {0, 1, 2}; are <none> -[alias] May-alias graph after instruction int t[3] = {0, 1, 2}; is <empty> +[alias] May-aliases after instruction int t[3] = {0, 1, 2}; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int t[3] = {0, 1, 2}; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } [alias] analysing instruction: int *a = & t[1]; -[alias] May-aliases after instruction int *a = & t[1]; are { t; a } +[alias] May-aliases after instruction int *a = & t[1]; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { t; a } [alias] May-alias graph after instruction int *a = & t[1]; is - 18:{ a } → 19:{ } 20:{ t } → 19:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 30:{ a } → 31:{ } 32:{ t } → 31:{ } [alias] analysing instruction: int *b = & u; -[alias] May-aliases after instruction int *b = & u; are { t; a } +[alias] May-aliases after instruction int *b = & u; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { t; a } [alias] May-alias graph after instruction int *b = & u; is - 18:{ a } → 19:{ } 20:{ t } → 19:{ } 23:{ b } → 24:{ u } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 30:{ a } → 31:{ } 32:{ t } → 31:{ } 35:{ b } → 36:{ u } [alias] analysing instruction: int *c = & v; -[alias] May-aliases after instruction int *c = & v; are { t; a } +[alias] May-aliases after instruction int *c = & v; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { t; a } [alias] May-alias graph after instruction int *c = & v; is - 18:{ a } → 19:{ } 20:{ t } → 19:{ } 23:{ b } → 24:{ u } - 27:{ c } → 28:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 30:{ a } → 31:{ } 32:{ t } → 31:{ } 35:{ b } → 36:{ u } + 39:{ c } → 40:{ v } [alias] analysing instruction: int **w = & a; -[alias] May-aliases after instruction int **w = & a; are { *w; t; a } +[alias] May-aliases after instruction int **w = & a; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *w; t; a } [alias] May-alias graph after instruction int **w = & a; is - 20:{ t } → 33:{ } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 33:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 45:{ } [alias] analysing instruction: str_t *s1 = create_str_t(-1,b); [alias] May-aliases after instruction str_t *s1 = create_str_t(-1,b); are - { s1->b; b } { *w; t; a } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; t; a } [alias] May-alias graph after instruction str_t *s1 = create_str_t(-1,b); is - 20:{ t } → 33:{ } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 33:{ } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 38:{ } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 45:{ } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 62:{ } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } [alias] analysing instruction: printf("a=%d\n",*(s1->a)); [alias:undefined:fn] ex_jfla.c:42: Warning: function printf has no definition [alias] May-aliases after instruction printf("a=%d\n",*(s1->a)); are - { s1->b; b } { *w; t; a } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; t; a } [alias] May-alias graph after instruction printf("a=%d\n",*(s1->a)); is - 20:{ t } → 33:{ } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 33:{ } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 38:{ } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 45:{ } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 62:{ } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } [alias] analysing instruction: printf("b=%d\n",*(s1->b)); [alias:undefined:fn] ex_jfla.c:43: Warning: function printf has no definition [alias] May-aliases after instruction printf("b=%d\n",*(s1->b)); are - { s1->b; b } { *w; t; a } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; t; a } [alias] May-alias graph after instruction printf("b=%d\n",*(s1->b)); is - 20:{ t } → 33:{ } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 33:{ } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 38:{ } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 45:{ } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 62:{ } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } [alias] analysing instruction: jfla(s1,a,& t[2],1); [alias] May-aliases after instruction jfla(s1,a,& t[2],1); are - { s1->b; b } { *w; s1->a; t; a } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; s1->a; t; a } [alias] May-alias graph after instruction jfla(s1,a,& t[2],1); is - 20:{ t } → 33:{ } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 33:{ } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 33:{ } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } 48:{ } → 33:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 45:{ } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 45:{ } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } 92:{ } → 45:{ } [alias] analysing instruction: printf("a=%d\n",*(s1->a)); [alias:undefined:fn] ex_jfla.c:45: Warning: function printf has no definition [alias] May-aliases after instruction printf("a=%d\n",*(s1->a)); are - { s1->b; b } { *w; s1->a; t; a } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; s1->a; t; a } [alias] May-alias graph after instruction printf("a=%d\n",*(s1->a)); is - 20:{ t } → 33:{ } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 33:{ } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 33:{ } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } 48:{ } → 33:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 45:{ } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 45:{ } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } 92:{ } → 45:{ } [alias] analysing instruction: printf("b=%d\n",*(s1->b)); [alias:undefined:fn] ex_jfla.c:46: Warning: function printf has no definition [alias] May-aliases after instruction printf("b=%d\n",*(s1->b)); are - { s1->b; b } { *w; s1->a; t; a } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; s1->a; t; a } [alias] May-alias graph after instruction printf("b=%d\n",*(s1->b)); is - 20:{ t } → 33:{ } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 33:{ } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 33:{ } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } 48:{ } → 33:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 45:{ } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 45:{ } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } 92:{ } → 45:{ } [alias] analysing instruction: jfla(s1,t,c,0); [alias] May-aliases after instruction jfla(s1,t,c,0); are - { s1->b; b } { *w; s1->a; t; a; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; s1->a; t; a; c } [alias] May-alias graph after instruction jfla(s1,t,c,0); is - 20:{ t } → 28:{ v } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 28:{ v } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 28:{ v } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } 48:{ } → 28:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 40:{ v } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 40:{ v } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 40:{ v } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } 92:{ } → 40:{ v } [alias] analysing instruction: printf("a=%d\n",*(s1->a)); [alias:undefined:fn] ex_jfla.c:48: Warning: function printf has no definition [alias] May-aliases after instruction printf("a=%d\n",*(s1->a)); are - { s1->b; b } { *w; s1->a; t; a; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; s1->a; t; a; c } [alias] May-alias graph after instruction printf("a=%d\n",*(s1->a)); is - 20:{ t } → 28:{ v } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 28:{ v } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 28:{ v } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } 48:{ } → 28:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 40:{ v } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 40:{ v } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 40:{ v } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } 92:{ } → 40:{ v } [alias] analysing instruction: printf("b=%d\n",*(s1->b)); [alias:undefined:fn] ex_jfla.c:49: Warning: function printf has no definition [alias] May-aliases after instruction printf("b=%d\n",*(s1->b)); are - { s1->b; b } { *w; s1->a; t; a; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; s1->a; t; a; c } [alias] May-alias graph after instruction printf("b=%d\n",*(s1->b)); is - 20:{ t } → 28:{ v } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 28:{ v } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 28:{ v } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } 48:{ } → 28:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 40:{ v } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 40:{ v } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 40:{ v } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } 92:{ } → 40:{ v } [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are - { s1->b; b } { *w; s1->a; t; a; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; s1->a; t; a; c } [alias] May-alias graph after instruction __retres = 0; is - 20:{ t } → 28:{ v } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 28:{ v } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 28:{ v } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } 48:{ } → 28:{ v } -[alias] May-aliases at the end of function main: { s1->b; b } { *w; s1->a; t; a; c } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 40:{ v } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 40:{ v } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 40:{ v } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } 92:{ } → 40:{ v } +[alias] May-aliases at the end of function main: + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; s1->a; t; a; c } [alias] May-alias graph at the end of function main: - 20:{ t } → 28:{ v } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ w } → 32:{ a } 32:{ a } → 28:{ v } 36:{ } -a→ 37:{ } - 36:{ } -b→ 39:{ } 37:{ } → 28:{ v } 39:{ } → 24:{ u } - 41:{ s1 } → 36:{ } 48:{ } → 28:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 40:{ v } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ w } → 44:{ a } 44:{ a } → 40:{ v } 60:{ } -a→ 61:{ } + 60:{ } -b→ 63:{ } 61:{ } → 40:{ v } 63:{ } → 36:{ u } + 65:{ s1 } → 60:{ } 92:{ } → 40:{ v } [alias] Summary of function main: formals: returns: __retres - state: { s1->b; b } { *w; s1->a; t; a; c } + state: { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s1->b; b } + { *w; s1->a; t; a; c } [alias] Analysis complete diff --git a/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla_2.res.oracle b/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla_2.res.oracle index 769efeed723c2b2da1f61d3ca187a1aa52535647..e38290025d7bf5f861f70a96d7c1e8842e239f5e 100644 --- a/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla_2.res.oracle +++ b/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla_2.res.oracle @@ -1,219 +1,407 @@ [kernel] Parsing ex_jfla_2.c (with preprocessing) +[alias] analysing global variable definiton: __fc_p_fopen = __fc_fopen; +[alias] May-aliases after global variable definition __fc_p_fopen are + { __fc_fopen; __fc_p_fopen } +[alias] May-alias graph after global variable definition __fc_p_fopen is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } +[alias] analysing global variable definiton: __fc_p_tmpnam = __fc_tmpnam; +[alias] May-aliases after global variable definition __fc_p_tmpnam are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after global variable definition __fc_p_tmpnam is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after global variable definition __fc_rand_max is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } [alias] analysing function: create_str_t [alias] analysing instruction: str_t *res = malloc(sizeof(str_t)); [alias] May-aliases after instruction str_t *res = malloc(sizeof(str_t)); are - <none> + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction str_t *res = malloc(sizeof(str_t)); is - 0:{ res } → 1:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } [alias] analysing instruction: res->fst = (int *)malloc(sizeof(int)); [alias] May-aliases after instruction res->fst = (int *)malloc(sizeof(int)); are - <none> + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction res->fst = (int *)malloc(sizeof(int)); - is 0:{ res } → 1:{ } 1:{ } -fst→ 2:{ } 2:{ } → 3:{ } + is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } 13:{ } -fst→ 14:{ } 14:{ } → 15:{ } [alias] analysing instruction: res->snd = (int *)malloc(sizeof(int)); [alias] May-aliases after instruction res->snd = (int *)malloc(sizeof(int)); are - <none> + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction res->snd = (int *)malloc(sizeof(int)); is - 0:{ res } → 1:{ } 1:{ } -fst→ 2:{ } 1:{ } -snd→ 4:{ } - 2:{ } → 3:{ } 4:{ } → 5:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } 13:{ } -fst→ 14:{ } 13:{ } -snd→ 16:{ } + 14:{ } → 15:{ } 16:{ } → 17:{ } [alias] analysing instruction: *(res->fst) = va; -[alias] May-aliases after instruction *(res->fst) = va; are <none> +[alias] May-aliases after instruction *(res->fst) = va; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *(res->fst) = va; is - 0:{ res } → 1:{ } 1:{ } -fst→ 2:{ } 1:{ } -snd→ 4:{ } - 2:{ } → 3:{ } 4:{ } → 5:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } 13:{ } -fst→ 14:{ } 13:{ } -snd→ 16:{ } + 14:{ } → 15:{ } 16:{ } → 17:{ } [alias] analysing instruction: res->snd = b; -[alias] May-aliases after instruction res->snd = b; are { res->snd; b } +[alias] May-aliases after instruction res->snd = b; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { res->snd; b } [alias] May-alias graph after instruction res->snd = b; is - 0:{ res } → 1:{ } 1:{ } -fst→ 2:{ } 1:{ } -snd→ 4:{ b } - 2:{ } → 3:{ } 4:{ b } → 5:{ } -[alias] May-aliases at the end of function create_str_t: { res->snd; b } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } 13:{ } -fst→ 14:{ } 13:{ } -snd→ 16:{ b } + 14:{ } → 15:{ } 16:{ b } → 17:{ } +[alias] May-aliases at the end of function create_str_t: + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { res->snd; b } [alias] May-alias graph at the end of function create_str_t: - 0:{ res } → 1:{ } 1:{ } -fst→ 2:{ } 1:{ } -snd→ 4:{ b } - 2:{ } → 3:{ } 4:{ b } → 5:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 12:{ res } → 13:{ } 13:{ } -fst→ 14:{ } 13:{ } -snd→ 16:{ b } + 14:{ } → 15:{ } 16:{ b } → 17:{ } [alias] Summary of function create_str_t: - formals: va b returns: res state: { res->snd; b } + formals: va b returns: res + state: { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { res->snd; b } [alias] analysing function: jfla [alias] analysing instruction: *(s->snd) = *(s->fst); -[alias] May-aliases after instruction *(s->snd) = *(s->fst); are <none> -[alias] May-alias graph after instruction *(s->snd) = *(s->fst); is <empty> +[alias] May-aliases after instruction *(s->snd) = *(s->fst); are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction *(s->snd) = *(s->fst); is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } [alias] analysing instruction: s->fst = i1; -[alias] May-aliases after instruction s->fst = i1; are { s->fst; i1 } +[alias] May-aliases after instruction s->fst = i1; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s->fst; i1 } [alias] May-alias graph after instruction s->fst = i1; is - 8:{ s } → 9:{ } 9:{ } -fst→ 10:{ i1 } 10:{ i1 } → 12:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 20:{ s } → 21:{ } 21:{ } -fst→ 22:{ i1 } 22:{ i1 } → 24:{ } [alias] analysing instruction: s->fst = i2; -[alias] May-aliases after instruction s->fst = i2; are { s->fst; i2 } +[alias] May-aliases after instruction s->fst = i2; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s->fst; i2 } [alias] May-alias graph after instruction s->fst = i2; is - 13:{ s } → 14:{ } 14:{ } -fst→ 15:{ i2 } 15:{ i2 } → 17:{ } -[alias] May-aliases at the end of function jfla: { s->fst; i1; i2 } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 25:{ s } → 26:{ } 26:{ } -fst→ 27:{ i2 } 27:{ i2 } → 29:{ } +[alias] May-aliases at the end of function jfla: + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s->fst; i1; i2 } [alias] May-alias graph at the end of function jfla: - 8:{ s } → 9:{ } 9:{ } -fst→ 10:{ i1; i2 } 10:{ i1; i2 } → 12:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 20:{ s } → 21:{ } 21:{ } -fst→ 22:{ i1; i2 } + 22:{ i1; i2 } → 24:{ } [alias] Summary of function jfla: - formals: s i1 i2 b returns: <none> state: { s->fst; i1; i2 } + formals: s i1 i2 b returns: <none> + state: { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { s->fst; i1; i2 } [alias] analysing function: main [alias] analysing instruction: int u = 11; -[alias] May-aliases after instruction int u = 11; are <none> -[alias] May-alias graph after instruction int u = 11; is <empty> +[alias] May-aliases after instruction int u = 11; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int u = 11; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } [alias] analysing instruction: int v = 12; -[alias] May-aliases after instruction int v = 12; are <none> -[alias] May-alias graph after instruction int v = 12; is <empty> +[alias] May-aliases after instruction int v = 12; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int v = 12; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } [alias] analysing instruction: int t[3] = {0, 1, 2}; -[alias] May-aliases after instruction int t[3] = {0, 1, 2}; are <none> -[alias] May-alias graph after instruction int t[3] = {0, 1, 2}; is <empty> +[alias] May-aliases after instruction int t[3] = {0, 1, 2}; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction int t[3] = {0, 1, 2}; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } [alias] analysing instruction: int *a = & t[1]; -[alias] May-aliases after instruction int *a = & t[1]; are { t; a } +[alias] May-aliases after instruction int *a = & t[1]; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { t; a } [alias] May-alias graph after instruction int *a = & t[1]; is - 18:{ a } → 19:{ } 20:{ t } → 19:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 30:{ a } → 31:{ } 32:{ t } → 31:{ } [alias] analysing instruction: int *b = & u; -[alias] May-aliases after instruction int *b = & u; are { t; a } +[alias] May-aliases after instruction int *b = & u; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { t; a } [alias] May-alias graph after instruction int *b = & u; is - 18:{ a } → 19:{ } 20:{ t } → 19:{ } 23:{ b } → 24:{ u } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 30:{ a } → 31:{ } 32:{ t } → 31:{ } 35:{ b } → 36:{ u } [alias] analysing instruction: int *c = & v; -[alias] May-aliases after instruction int *c = & v; are { t; a } +[alias] May-aliases after instruction int *c = & v; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { t; a } [alias] May-alias graph after instruction int *c = & v; is - 18:{ a } → 19:{ } 20:{ t } → 19:{ } 23:{ b } → 24:{ u } - 27:{ c } → 28:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 30:{ a } → 31:{ } 32:{ t } → 31:{ } 35:{ b } → 36:{ u } + 39:{ c } → 40:{ v } [alias] analysing instruction: int **x = & a; -[alias] May-aliases after instruction int **x = & a; are { *x; t; a } +[alias] May-aliases after instruction int **x = & a; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; t; a } [alias] May-alias graph after instruction int **x = & a; is - 20:{ t } → 33:{ } 23:{ b } → 24:{ u } 27:{ c } → 28:{ v } - 31:{ x } → 32:{ a } 32:{ a } → 33:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 35:{ b } → 36:{ u } 39:{ c } → 40:{ v } + 43:{ x } → 44:{ a } 44:{ a } → 45:{ } [alias] analysing instruction: int **y = & b; -[alias] May-aliases after instruction int **y = & b; are { *x; t; a } { *y; b } +[alias] May-aliases after instruction int **y = & b; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; t; a } { *y; b } [alias] May-alias graph after instruction int **y = & b; is - 20:{ t } → 33:{ } 27:{ c } → 28:{ v } 31:{ x } → 32:{ a } - 32:{ a } → 33:{ } 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 39:{ c } → 40:{ v } 43:{ x } → 44:{ a } + 44:{ a } → 45:{ } 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } [alias] analysing instruction: int **z = & c; [alias] May-aliases after instruction int **z = & c; are - { *x; t; a } { *y; b } { *z; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; t; a } { *y; b } + { *z; c } [alias] May-alias graph after instruction int **z = & c; is - 20:{ t } → 33:{ } 31:{ x } → 32:{ a } 32:{ a } → 33:{ } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 41:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 43:{ x } → 44:{ a } 44:{ a } → 45:{ } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 53:{ v } [alias] analysing instruction: str_t *s1 = create_str_t(-1,b); [alias] May-aliases after instruction str_t *s1 = create_str_t(-1,b); are - { *x; t; a } { *y; s1->snd; b } { *z; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; t; a } + { *y; s1->snd; b } { *z; c } [alias] May-alias graph after instruction str_t *s1 = create_str_t(-1,b); is - 20:{ t } → 33:{ } 31:{ x } → 32:{ a } 32:{ a } → 33:{ } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 41:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 46:{ } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 43:{ x } → 44:{ a } 44:{ a } → 45:{ } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 53:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 70:{ } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } [alias] analysing instruction: str_t *s2 = create_str_t(-2,c); [alias] May-aliases after instruction str_t *s2 = create_str_t(-2,c); are - { *x; t; a } { *y; s1->snd; b } { *z; s2->snd; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; t; a } + { *y; s1->snd; b } { *z; s2->snd; c } [alias] May-alias graph after instruction str_t *s2 = create_str_t(-2,c); is - 20:{ t } → 33:{ } 31:{ x } → 32:{ a } 32:{ a } → 33:{ } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 41:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 46:{ } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 41:{ v } 57:{ s2 } → 52:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 43:{ x } → 44:{ a } 44:{ a } → 45:{ } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 53:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 70:{ } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 53:{ v } 93:{ s2 } → 88:{ } [alias] analysing instruction: printf("a=%d\n",*(s1->fst)); [alias:undefined:fn] ex_jfla_2.c:43: Warning: function printf has no definition [alias] May-aliases after instruction printf("a=%d\n",*(s1->fst)); are - { *x; t; a } { *y; s1->snd; b } { *z; s2->snd; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; t; a } + { *y; s1->snd; b } { *z; s2->snd; c } [alias] May-alias graph after instruction printf("a=%d\n",*(s1->fst)); is - 20:{ t } → 33:{ } 31:{ x } → 32:{ a } 32:{ a } → 33:{ } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 41:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 46:{ } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 41:{ v } 57:{ s2 } → 52:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 43:{ x } → 44:{ a } 44:{ a } → 45:{ } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 53:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 70:{ } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 53:{ v } 93:{ s2 } → 88:{ } [alias] analysing instruction: printf("b=%d\n",*(s1->snd)); [alias:undefined:fn] ex_jfla_2.c:44: Warning: function printf has no definition [alias] May-aliases after instruction printf("b=%d\n",*(s1->snd)); are - { *x; t; a } { *y; s1->snd; b } { *z; s2->snd; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; t; a } + { *y; s1->snd; b } { *z; s2->snd; c } [alias] May-alias graph after instruction printf("b=%d\n",*(s1->snd)); is - 20:{ t } → 33:{ } 31:{ x } → 32:{ a } 32:{ a } → 33:{ } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 41:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 46:{ } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 41:{ v } 57:{ s2 } → 52:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 43:{ x } → 44:{ a } 44:{ a } → 45:{ } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 53:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 70:{ } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 53:{ v } 93:{ s2 } → 88:{ } [alias] analysing instruction: jfla(s1,a,& t[2],1); [alias] May-aliases after instruction jfla(s1,a,& t[2],1); are - { *x; s1->fst; t; a } { *y; s1->snd; b } { *z; s2->snd; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; s1->fst; t; a } + { *y; s1->snd; b } { *z; s2->snd; c } [alias] May-alias graph after instruction jfla(s1,a,& t[2],1); is - 20:{ t } → 33:{ } 31:{ x } → 32:{ a } 32:{ a } → 33:{ } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 41:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 33:{ } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 41:{ v } 57:{ s2 } → 52:{ } 64:{ } → 33:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 43:{ x } → 44:{ a } 44:{ a } → 45:{ } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 53:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 45:{ } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 53:{ v } 93:{ s2 } → 88:{ } 120:{ } → 45:{ } [alias] analysing instruction: printf("a=%d\n",*(s1->fst)); [alias:undefined:fn] ex_jfla_2.c:46: Warning: function printf has no definition [alias] May-aliases after instruction printf("a=%d\n",*(s1->fst)); are - { *x; s1->fst; t; a } { *y; s1->snd; b } { *z; s2->snd; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; s1->fst; t; a } + { *y; s1->snd; b } { *z; s2->snd; c } [alias] May-alias graph after instruction printf("a=%d\n",*(s1->fst)); is - 20:{ t } → 33:{ } 31:{ x } → 32:{ a } 32:{ a } → 33:{ } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 41:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 33:{ } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 41:{ v } 57:{ s2 } → 52:{ } 64:{ } → 33:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 43:{ x } → 44:{ a } 44:{ a } → 45:{ } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 53:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 45:{ } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 53:{ v } 93:{ s2 } → 88:{ } 120:{ } → 45:{ } [alias] analysing instruction: printf("b=%d\n",*(s1->snd)); [alias:undefined:fn] ex_jfla_2.c:47: Warning: function printf has no definition [alias] May-aliases after instruction printf("b=%d\n",*(s1->snd)); are - { *x; s1->fst; t; a } { *y; s1->snd; b } { *z; s2->snd; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; s1->fst; t; a } + { *y; s1->snd; b } { *z; s2->snd; c } [alias] May-alias graph after instruction printf("b=%d\n",*(s1->snd)); is - 20:{ t } → 33:{ } 31:{ x } → 32:{ a } 32:{ a } → 33:{ } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 41:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 33:{ } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 41:{ v } 57:{ s2 } → 52:{ } 64:{ } → 33:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ } 43:{ x } → 44:{ a } 44:{ a } → 45:{ } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 53:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 45:{ } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 53:{ v } 93:{ s2 } → 88:{ } 120:{ } → 45:{ } [alias] analysing instruction: jfla(s1,t,s2->snd,0); [alias] May-aliases after instruction jfla(s1,t,s2->snd,0); are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; *z; s1->fst; s2->snd; t; a; c } { *y; s1->snd; b } [alias] May-alias graph after instruction jfla(s1,t,s2->snd,0); is - 20:{ t } → 33:{ v } 31:{ x } → 32:{ a } 32:{ a } → 33:{ v } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 33:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 33:{ v } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 33:{ v } 57:{ s2 } → 52:{ } 64:{ } → 33:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ v } 43:{ x } → 44:{ a } 44:{ a } → 45:{ v } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 45:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 45:{ v } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 45:{ v } 93:{ s2 } → 88:{ } 120:{ } → 45:{ v } [alias] analysing instruction: printf("a=%d\n",*(s1->fst)); [alias:undefined:fn] ex_jfla_2.c:49: Warning: function printf has no definition [alias] May-aliases after instruction printf("a=%d\n",*(s1->fst)); are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; *z; s1->fst; s2->snd; t; a; c } { *y; s1->snd; b } [alias] May-alias graph after instruction printf("a=%d\n",*(s1->fst)); is - 20:{ t } → 33:{ v } 31:{ x } → 32:{ a } 32:{ a } → 33:{ v } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 33:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 33:{ v } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 33:{ v } 57:{ s2 } → 52:{ } 64:{ } → 33:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ v } 43:{ x } → 44:{ a } 44:{ a } → 45:{ v } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 45:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 45:{ v } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 45:{ v } 93:{ s2 } → 88:{ } 120:{ } → 45:{ v } [alias] analysing instruction: printf("b=%d\n",*(s1->snd)); [alias:undefined:fn] ex_jfla_2.c:50: Warning: function printf has no definition [alias] May-aliases after instruction printf("b=%d\n",*(s1->snd)); are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; *z; s1->fst; s2->snd; t; a; c } { *y; s1->snd; b } [alias] May-alias graph after instruction printf("b=%d\n",*(s1->snd)); is - 20:{ t } → 33:{ v } 31:{ x } → 32:{ a } 32:{ a } → 33:{ v } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 33:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 33:{ v } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 33:{ v } 57:{ s2 } → 52:{ } 64:{ } → 33:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ v } 43:{ x } → 44:{ a } 44:{ a } → 45:{ v } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 45:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 45:{ v } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 45:{ v } 93:{ s2 } → 88:{ } 120:{ } → 45:{ v } [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; *z; s1->fst; s2->snd; t; a; c } { *y; s1->snd; b } [alias] May-alias graph after instruction __retres = 0; is - 20:{ t } → 33:{ v } 31:{ x } → 32:{ a } 32:{ a } → 33:{ v } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 33:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 33:{ v } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 33:{ v } 57:{ s2 } → 52:{ } 64:{ } → 33:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ v } 43:{ x } → 44:{ a } 44:{ a } → 45:{ v } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 45:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 45:{ v } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 45:{ v } 93:{ s2 } → 88:{ } 120:{ } → 45:{ v } [alias] May-aliases at the end of function main: + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } { *x; *z; s1->fst; s2->snd; t; a; c } { *y; s1->snd; b } [alias] May-alias graph at the end of function main: - 20:{ t } → 33:{ v } 31:{ x } → 32:{ a } 32:{ a } → 33:{ v } - 35:{ y } → 36:{ b } 36:{ b } → 37:{ u } 39:{ z } → 40:{ c } - 40:{ c } → 33:{ v } 44:{ } -fst→ 45:{ } 44:{ } -snd→ 47:{ } - 45:{ } → 33:{ v } 47:{ } → 37:{ u } 49:{ s1 } → 44:{ } - 52:{ } -fst→ 53:{ } 52:{ } -snd→ 55:{ } 53:{ } → 54:{ } - 55:{ } → 33:{ v } 57:{ s2 } → 52:{ } 64:{ } → 33:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ __fc_random48_counter; __fc_p_random48_counter } → 9:{ } + 32:{ t } → 45:{ v } 43:{ x } → 44:{ a } 44:{ a } → 45:{ v } + 47:{ y } → 48:{ b } 48:{ b } → 49:{ u } 51:{ z } → 52:{ c } + 52:{ c } → 45:{ v } 68:{ } -fst→ 69:{ } 68:{ } -snd→ 71:{ } + 69:{ } → 45:{ v } 71:{ } → 49:{ u } 73:{ s1 } → 68:{ } + 88:{ } -fst→ 89:{ } 88:{ } -snd→ 91:{ } 89:{ } → 90:{ } + 91:{ } → 45:{ v } 93:{ s2 } → 88:{ } 120:{ } → 45:{ v } [alias] Summary of function main: formals: returns: __retres - state: { *x; *z; s1->fst; s2->snd; t; a; c } { *y; s1->snd; b } + state: { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { __fc_random48_counter; __fc_p_random48_counter } + { *x; *z; s1->fst; s2->snd; t; a; c } { *y; s1->snd; b } [alias] Analysis complete diff --git a/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla_3.res.oracle b/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla_3.res.oracle index 5237ddd1cfe5950a50994b9475242ff8931d059f..1ebc83b4cfe2e8809390d13dcf05967c80da11dd 100644 --- a/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla_3.res.oracle +++ b/src/plugins/alias/tests/fixed_bugs/oracle/ex_jfla_3.res.oracle @@ -1,207 +1,296 @@ [kernel] Parsing ex_jfla_3.c (with preprocessing) +[alias] analysing global variable definiton: __fc_p_fopen = __fc_fopen; +[alias] May-aliases after global variable definition __fc_p_fopen are + { __fc_fopen; __fc_p_fopen } +[alias] May-alias graph after global variable definition __fc_p_fopen is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } +[alias] analysing global variable definiton: __fc_p_tmpnam = __fc_tmpnam; +[alias] May-aliases after global variable definition __fc_p_tmpnam are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after global variable definition __fc_p_tmpnam is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } [alias] analysing function: jfla [alias] analysing instruction: *snd = *fst; -[alias] May-aliases after instruction *snd = *fst; are <none> -[alias] May-alias graph after instruction *snd = *fst; is <empty> +[alias] May-aliases after instruction *snd = *fst; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after instruction *snd = *fst; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } [alias] analysing instruction: fst = *i1; -[alias] May-aliases after instruction fst = *i1; are { *i1; fst } +[alias] May-aliases after instruction fst = *i1; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *i1; fst } [alias] May-alias graph after instruction fst = *i1; is - 0:{ fst } → 1:{ } 2:{ i1 } → 0:{ fst } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 8:{ fst } → 9:{ } + 10:{ i1 } → 8:{ fst } [alias] analysing instruction: __retres = *i2; [alias] May-aliases after instruction __retres = *i2; are - { *i1; fst } { *i2; __retres } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *i1; fst } + { *i2; __retres } [alias] May-alias graph after instruction __retres = *i2; is - 0:{ fst } → 1:{ } 2:{ i1 } → 0:{ fst } 5:{ __retres } → 6:{ } - 7:{ i2 } → 5:{ __retres } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 8:{ fst } → 9:{ } + 10:{ i1 } → 8:{ fst } 13:{ __retres } → 14:{ } + 15:{ i2 } → 13:{ __retres } [alias] analysing instruction: fst = *i2; -[alias] May-aliases after instruction fst = *i2; are { *i2; fst } +[alias] May-aliases after instruction fst = *i2; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *i2; fst } [alias] May-alias graph after instruction fst = *i2; is - 10:{ fst } → 11:{ } 12:{ i2 } → 10:{ fst } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 18:{ fst } → 19:{ } + 20:{ i2 } → 18:{ fst } [alias] analysing instruction: __retres = *i1; [alias] May-aliases after instruction __retres = *i1; are - { *i2; fst } { *i1; __retres } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *i2; fst } + { *i1; __retres } [alias] May-alias graph after instruction __retres = *i1; is - 10:{ fst } → 11:{ } 12:{ i2 } → 10:{ fst } - 15:{ __retres } → 16:{ } 17:{ i1 } → 15:{ __retres } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 18:{ fst } → 19:{ } + 20:{ i2 } → 18:{ fst } 23:{ __retres } → 24:{ } + 25:{ i1 } → 23:{ __retres } [alias] May-aliases at the end of function jfla: - { i1; i2 } { *i1; *i2; fst; __retres } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { i1; i2 } + { *i1; *i2; fst; __retres } [alias] May-alias graph at the end of function jfla: - 0:{ fst; __retres } → 1:{ } 2:{ i1 } → 0:{ fst; __retres } - 7:{ i2 } → 0:{ fst; __retres } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } + 8:{ fst; __retres } → 9:{ } 10:{ i1 } → 8:{ fst; __retres } + 15:{ i2 } → 8:{ fst; __retres } [alias] Summary of function jfla: formals: fst snd i1→{ fst; __retres } i2→{ fst; __retres } bo - returns: __retres state: { i1; i2 } { *i1; *i2; fst; __retres } + returns: __retres + state: { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { i1; i2 } { *i1; *i2; fst; __retres } [alias] analysing function: main [alias] analysing instruction: int u = 11; -[alias] May-aliases after instruction int u = 11; are <none> -[alias] May-alias graph after instruction int u = 11; is <empty> +[alias] May-aliases after instruction int u = 11; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after instruction int u = 11; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } [alias] analysing instruction: int v = 12; -[alias] May-aliases after instruction int v = 12; are <none> -[alias] May-alias graph after instruction int v = 12; is <empty> +[alias] May-aliases after instruction int v = 12; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after instruction int v = 12; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } [alias] analysing instruction: int t[3] = {0, 1, 2}; -[alias] May-aliases after instruction int t[3] = {0, 1, 2}; are <none> -[alias] May-alias graph after instruction int t[3] = {0, 1, 2}; is <empty> +[alias] May-aliases after instruction int t[3] = {0, 1, 2}; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after instruction int t[3] = {0, 1, 2}; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } [alias] analysing instruction: int *a = & t[1]; -[alias] May-aliases after instruction int *a = & t[1]; are { t; a } +[alias] May-aliases after instruction int *a = & t[1]; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { t; a } [alias] May-alias graph after instruction int *a = & t[1]; is - 20:{ a } → 21:{ } 22:{ t } → 21:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 28:{ a } → 29:{ } + 30:{ t } → 29:{ } [alias] analysing instruction: int *b = & u; -[alias] May-aliases after instruction int *b = & u; are { t; a } +[alias] May-aliases after instruction int *b = & u; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { t; a } [alias] May-alias graph after instruction int *b = & u; is - 20:{ a } → 21:{ } 22:{ t } → 21:{ } 25:{ b } → 26:{ u } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 28:{ a } → 29:{ } + 30:{ t } → 29:{ } 33:{ b } → 34:{ u } [alias] analysing instruction: int *c = & v; -[alias] May-aliases after instruction int *c = & v; are { t; a } +[alias] May-aliases after instruction int *c = & v; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { t; a } [alias] May-alias graph after instruction int *c = & v; is - 20:{ a } → 21:{ } 22:{ t } → 21:{ } 25:{ b } → 26:{ u } - 29:{ c } → 30:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 28:{ a } → 29:{ } + 30:{ t } → 29:{ } 33:{ b } → 34:{ u } 37:{ c } → 38:{ v } [alias] analysing instruction: int **x = & a; -[alias] May-aliases after instruction int **x = & a; are { *x; t; a } +[alias] May-aliases after instruction int **x = & a; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *x; t; a } [alias] May-alias graph after instruction int **x = & a; is - 22:{ t } → 35:{ } 25:{ b } → 26:{ u } 29:{ c } → 30:{ v } - 33:{ x } → 34:{ a } 34:{ a } → 35:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 30:{ t } → 43:{ } + 33:{ b } → 34:{ u } 37:{ c } → 38:{ v } 41:{ x } → 42:{ a } + 42:{ a } → 43:{ } [alias] analysing instruction: int **y = & b; -[alias] May-aliases after instruction int **y = & b; are { *x; t; a } { *y; b } +[alias] May-aliases after instruction int **y = & b; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *x; t; a } + { *y; b } [alias] May-alias graph after instruction int **y = & b; is - 22:{ t } → 35:{ } 29:{ c } → 30:{ v } 33:{ x } → 34:{ a } - 34:{ a } → 35:{ } 37:{ y } → 38:{ b } 38:{ b } → 39:{ u } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 30:{ t } → 43:{ } + 37:{ c } → 38:{ v } 41:{ x } → 42:{ a } 42:{ a } → 43:{ } + 45:{ y } → 46:{ b } 46:{ b } → 47:{ u } [alias] analysing instruction: int **z = & c; [alias] May-aliases after instruction int **z = & c; are - { *x; t; a } { *y; b } { *z; c } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *x; t; a } + { *y; b } { *z; c } [alias] May-alias graph after instruction int **z = & c; is - 22:{ t } → 35:{ } 33:{ x } → 34:{ a } 34:{ a } → 35:{ } - 37:{ y } → 38:{ b } 38:{ b } → 39:{ u } 41:{ z } → 42:{ c } - 42:{ c } → 43:{ v } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 30:{ t } → 43:{ } + 41:{ x } → 42:{ a } 42:{ a } → 43:{ } 45:{ y } → 46:{ b } + 46:{ b } → 47:{ u } 49:{ z } → 50:{ c } 50:{ c } → 51:{ v } [alias] analysing instruction: struct str_t s = {.fst = c, .snd = t}; [alias] May-aliases after instruction struct str_t s = {.fst = c, .snd = t}; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *x; t; a; s.snd } { *y; b } { *z; c; s.fst } [alias] May-alias graph after instruction struct str_t s = {.fst = c, .snd = t}; is - 33:{ x } → 34:{ a } 34:{ a } → 35:{ } 37:{ y } → 38:{ b } - 38:{ b } → 39:{ u } 41:{ z } → 46:{ c } 45:{ s } -fst→ 46:{ c } - 45:{ s } -snd→ 47:{ t } 46:{ c } → 43:{ v } 47:{ t } → 35:{ } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a } + 42:{ a } → 43:{ } 45:{ y } → 46:{ b } 46:{ b } → 47:{ u } + 49:{ z } → 54:{ c } 53:{ s } -fst→ 54:{ c } + 53:{ s } -snd→ 55:{ t } 54:{ c } → 51:{ v } 55:{ t } → 43:{ } [alias] analysing instruction: struct str_t *s1 = & s; [alias] May-aliases after instruction struct str_t *s1 = & s; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *x; s1->snd; t; a; s.snd } { *y; b } { *z; s1->fst; c; s.fst } [alias] May-alias graph after instruction struct str_t *s1 = & s; is - 33:{ x } → 34:{ a } 34:{ a } → 35:{ } 37:{ y } → 38:{ b } - 38:{ b } → 39:{ u } 41:{ z } → 46:{ c } 46:{ c } → 43:{ v } - 47:{ t } → 35:{ } 48:{ s1 } → 49:{ s } 49:{ s } -fst→ 46:{ c } - 49:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a } + 42:{ a } → 43:{ } 45:{ y } → 46:{ b } 46:{ b } → 47:{ u } + 49:{ z } → 54:{ c } 54:{ c } → 51:{ v } 55:{ t } → 43:{ } + 56:{ s1 } → 57:{ s } 57:{ s } -fst→ 54:{ c } + 57:{ s } -snd→ 55:{ t } [alias] analysing instruction: struct str_t *s2 = & s; [alias] May-aliases after instruction struct str_t *s2 = & s; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *x; s1->snd; s2->snd; t; a; s.snd } { *y; b } { *z; s1->fst; s2->fst; c; s.fst } { s1; s2 } [alias] May-alias graph after instruction struct str_t *s2 = & s; is - 33:{ x } → 34:{ a } 34:{ a } → 35:{ } 37:{ y } → 38:{ b } - 38:{ b } → 39:{ u } 41:{ z } → 46:{ c } 46:{ c } → 43:{ v } - 47:{ t } → 35:{ } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 46:{ c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a } + 42:{ a } → 43:{ } 45:{ y } → 46:{ b } 46:{ b } → 47:{ u } + 49:{ z } → 54:{ c } 54:{ c } → 51:{ v } 55:{ t } → 43:{ } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } 60:{ s } -fst→ 54:{ c } + 60:{ s } -snd→ 55:{ t } [alias] analysing instruction: printf("a=%d\n",*(s1->fst)); [alias:undefined:fn] ex_jfla_3.c:32: Warning: function printf has no definition [alias] May-aliases after instruction printf("a=%d\n",*(s1->fst)); are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *x; s1->snd; s2->snd; t; a; s.snd } { *y; b } { *z; s1->fst; s2->fst; c; s.fst } { s1; s2 } [alias] May-alias graph after instruction printf("a=%d\n",*(s1->fst)); is - 33:{ x } → 34:{ a } 34:{ a } → 35:{ } 37:{ y } → 38:{ b } - 38:{ b } → 39:{ u } 41:{ z } → 46:{ c } 46:{ c } → 43:{ v } - 47:{ t } → 35:{ } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 46:{ c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a } + 42:{ a } → 43:{ } 45:{ y } → 46:{ b } 46:{ b } → 47:{ u } + 49:{ z } → 54:{ c } 54:{ c } → 51:{ v } 55:{ t } → 43:{ } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } 60:{ s } -fst→ 54:{ c } + 60:{ s } -snd→ 55:{ t } [alias] analysing instruction: printf("b=%d\n",*(s1->snd)); [alias:undefined:fn] ex_jfla_3.c:33: Warning: function printf has no definition [alias] May-aliases after instruction printf("b=%d\n",*(s1->snd)); are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { *x; s1->snd; s2->snd; t; a; s.snd } { *y; b } { *z; s1->fst; s2->fst; c; s.fst } { s1; s2 } [alias] May-alias graph after instruction printf("b=%d\n",*(s1->snd)); is - 33:{ x } → 34:{ a } 34:{ a } → 35:{ } 37:{ y } → 38:{ b } - 38:{ b } → 39:{ u } 41:{ z } → 46:{ c } 46:{ c } → 43:{ v } - 47:{ t } → 35:{ } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 46:{ c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a } + 42:{ a } → 43:{ } 45:{ y } → 46:{ b } 46:{ b } → 47:{ u } + 49:{ z } → 54:{ c } 54:{ c } → 51:{ v } 55:{ t } → 43:{ } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } 60:{ s } -fst→ 54:{ c } + 60:{ s } -snd→ 55:{ t } [alias] analysing instruction: c = jfla(s1->fst,s1->snd,x,y,0); [alias] May-aliases after instruction c = jfla(s1->fst,s1->snd,x,y,0); are - { x; y } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { x; y } { *x; *y; *z; s1->fst; s1->snd; s2->fst; s2->snd; t; a; b; c; s.fst; s.snd } { s1; s2 } [alias] May-alias graph after instruction c = jfla(s1->fst,s1->snd,x,y,0); is - 33:{ x } → 34:{ a; b } 34:{ a; b } → 35:{ u; v } - 37:{ y } → 34:{ a; b } 41:{ z } → 46:{ c } 46:{ c } → 35:{ u; v } - 47:{ t } → 35:{ u; v } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 46:{ c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a; b } + 42:{ a; b } → 43:{ u; v } 45:{ y } → 42:{ a; b } + 49:{ z } → 54:{ c } 54:{ c } → 43:{ u; v } 55:{ t } → 43:{ u; v } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } 60:{ s } -fst→ 54:{ c } + 60:{ s } -snd→ 55:{ t } [alias] analysing instruction: printf("a=%d\n",*(s1->fst)); [alias:undefined:fn] ex_jfla_3.c:35: Warning: function printf has no definition [alias] May-aliases after instruction printf("a=%d\n",*(s1->fst)); are - { x; y } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { x; y } { *x; *y; *z; s1->fst; s1->snd; s2->fst; s2->snd; t; a; b; c; s.fst; s.snd } { s1; s2 } [alias] May-alias graph after instruction printf("a=%d\n",*(s1->fst)); is - 33:{ x } → 34:{ a; b } 34:{ a; b } → 35:{ u; v } - 37:{ y } → 34:{ a; b } 41:{ z } → 46:{ c } 46:{ c } → 35:{ u; v } - 47:{ t } → 35:{ u; v } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 46:{ c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a; b } + 42:{ a; b } → 43:{ u; v } 45:{ y } → 42:{ a; b } + 49:{ z } → 54:{ c } 54:{ c } → 43:{ u; v } 55:{ t } → 43:{ u; v } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } 60:{ s } -fst→ 54:{ c } + 60:{ s } -snd→ 55:{ t } [alias] analysing instruction: printf("b=%d\n",*(s1->snd)); [alias:undefined:fn] ex_jfla_3.c:36: Warning: function printf has no definition [alias] May-aliases after instruction printf("b=%d\n",*(s1->snd)); are - { x; y } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { x; y } { *x; *y; *z; s1->fst; s1->snd; s2->fst; s2->snd; t; a; b; c; s.fst; s.snd } { s1; s2 } [alias] May-alias graph after instruction printf("b=%d\n",*(s1->snd)); is - 33:{ x } → 34:{ a; b } 34:{ a; b } → 35:{ u; v } - 37:{ y } → 34:{ a; b } 41:{ z } → 46:{ c } 46:{ c } → 35:{ u; v } - 47:{ t } → 35:{ u; v } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 46:{ c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a; b } + 42:{ a; b } → 43:{ u; v } 45:{ y } → 42:{ a; b } + 49:{ z } → 54:{ c } 54:{ c } → 43:{ u; v } 55:{ t } → 43:{ u; v } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } 60:{ s } -fst→ 54:{ c } + 60:{ s } -snd→ 55:{ t } [alias] analysing instruction: a = jfla(s2->fst,s2->snd,y,z,1); [alias] May-aliases after instruction a = jfla(s2->fst,s2->snd,y,z,1); are - { x; y; z } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { x; y; z } { *x; *y; *z; s1->fst; s1->snd; s2->fst; s2->snd; t; a; b; c; s.fst; s.snd } { s1; s2 } [alias] May-alias graph after instruction a = jfla(s2->fst,s2->snd,y,z,1); is - 33:{ x } → 34:{ a; b; c } 34:{ a; b; c } → 35:{ u; v } - 37:{ y } → 34:{ a; b; c } 41:{ z } → 34:{ a; b; c } - 47:{ t } → 35:{ u; v } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 34:{ a; b; c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a; b; c } + 42:{ a; b; c } → 43:{ u; v } 45:{ y } → 42:{ a; b; c } + 49:{ z } → 42:{ a; b; c } 55:{ t } → 43:{ u; v } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } + 60:{ s } -fst→ 42:{ a; b; c } 60:{ s } -snd→ 55:{ t } [alias] analysing instruction: printf("a=%d\n",*(s1->fst)); [alias:undefined:fn] ex_jfla_3.c:38: Warning: function printf has no definition [alias] May-aliases after instruction printf("a=%d\n",*(s1->fst)); are - { x; y; z } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { x; y; z } { *x; *y; *z; s1->fst; s1->snd; s2->fst; s2->snd; t; a; b; c; s.fst; s.snd } { s1; s2 } [alias] May-alias graph after instruction printf("a=%d\n",*(s1->fst)); is - 33:{ x } → 34:{ a; b; c } 34:{ a; b; c } → 35:{ u; v } - 37:{ y } → 34:{ a; b; c } 41:{ z } → 34:{ a; b; c } - 47:{ t } → 35:{ u; v } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 34:{ a; b; c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a; b; c } + 42:{ a; b; c } → 43:{ u; v } 45:{ y } → 42:{ a; b; c } + 49:{ z } → 42:{ a; b; c } 55:{ t } → 43:{ u; v } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } + 60:{ s } -fst→ 42:{ a; b; c } 60:{ s } -snd→ 55:{ t } [alias] analysing instruction: printf("b=%d\n",*(s1->snd)); [alias:undefined:fn] ex_jfla_3.c:39: Warning: function printf has no definition [alias] May-aliases after instruction printf("b=%d\n",*(s1->snd)); are - { x; y; z } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { x; y; z } { *x; *y; *z; s1->fst; s1->snd; s2->fst; s2->snd; t; a; b; c; s.fst; s.snd } { s1; s2 } [alias] May-alias graph after instruction printf("b=%d\n",*(s1->snd)); is - 33:{ x } → 34:{ a; b; c } 34:{ a; b; c } → 35:{ u; v } - 37:{ y } → 34:{ a; b; c } 41:{ z } → 34:{ a; b; c } - 47:{ t } → 35:{ u; v } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 34:{ a; b; c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a; b; c } + 42:{ a; b; c } → 43:{ u; v } 45:{ y } → 42:{ a; b; c } + 49:{ z } → 42:{ a; b; c } 55:{ t } → 43:{ u; v } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } + 60:{ s } -fst→ 42:{ a; b; c } 60:{ s } -snd→ 55:{ t } [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are - { x; y; z } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { x; y; z } { *x; *y; *z; s1->fst; s1->snd; s2->fst; s2->snd; t; a; b; c; s.fst; s.snd } { s1; s2 } [alias] May-alias graph after instruction __retres = 0; is - 33:{ x } → 34:{ a; b; c } 34:{ a; b; c } → 35:{ u; v } - 37:{ y } → 34:{ a; b; c } 41:{ z } → 34:{ a; b; c } - 47:{ t } → 35:{ u; v } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 34:{ a; b; c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a; b; c } + 42:{ a; b; c } → 43:{ u; v } 45:{ y } → 42:{ a; b; c } + 49:{ z } → 42:{ a; b; c } 55:{ t } → 43:{ u; v } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } + 60:{ s } -fst→ 42:{ a; b; c } 60:{ s } -snd→ 55:{ t } [alias] May-aliases at the end of function main: - { x; y; z } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { x; y; z } { *x; *y; *z; s1->fst; s1->snd; s2->fst; s2->snd; t; a; b; c; s.fst; s.snd } { s1; s2 } [alias] May-alias graph at the end of function main: - 33:{ x } → 34:{ a; b; c } 34:{ a; b; c } → 35:{ u; v } - 37:{ y } → 34:{ a; b; c } 41:{ z } → 34:{ a; b; c } - 47:{ t } → 35:{ u; v } 48:{ s1 } → 52:{ s } 51:{ s2 } → 52:{ s } - 52:{ s } -fst→ 34:{ a; b; c } 52:{ s } -snd→ 47:{ t } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 41:{ x } → 42:{ a; b; c } + 42:{ a; b; c } → 43:{ u; v } 45:{ y } → 42:{ a; b; c } + 49:{ z } → 42:{ a; b; c } 55:{ t } → 43:{ u; v } + 56:{ s1 } → 60:{ s } 59:{ s2 } → 60:{ s } + 60:{ s } -fst→ 42:{ a; b; c } 60:{ s } -snd→ 55:{ t } [alias] Summary of function main: formals: returns: __retres - state: { x; y; z } + state: { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { x; y; z } { *x; *y; *z; s1->fst; s1->snd; s2->fst; s2->snd; t; a; b; c; s.fst; s.snd } { s1; s2 } diff --git a/src/plugins/alias/tests/fixed_bugs/oracle/records.res.oracle b/src/plugins/alias/tests/fixed_bugs/oracle/records.res.oracle index af00a8c8d9577a3453f8fa8e8d6e22ba8b0a37bb..0b4d38b6f09cd245cfc729eb9f698391449f4343 100644 --- a/src/plugins/alias/tests/fixed_bugs/oracle/records.res.oracle +++ b/src/plugins/alias/tests/fixed_bugs/oracle/records.res.oracle @@ -1,52 +1,87 @@ [kernel] Parsing records.c (with preprocessing) +[alias] analysing global variable definiton: __fc_p_fopen = __fc_fopen; +[alias] May-aliases after global variable definition __fc_p_fopen are + { __fc_fopen; __fc_p_fopen } +[alias] May-alias graph after global variable definition __fc_p_fopen is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } +[alias] analysing global variable definiton: __fc_p_tmpnam = __fc_tmpnam; +[alias] May-aliases after global variable definition __fc_p_tmpnam are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after global variable definition __fc_p_tmpnam is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } [alias] analysing function: main [alias] analysing instruction: a = & x; -[alias] May-aliases after instruction a = & x; are <none> -[alias] May-alias graph after instruction a = & x; is 0:{ a } → 1:{ x } +[alias] May-aliases after instruction a = & x; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } +[alias] May-alias graph after instruction a = & x; is + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 8:{ a } → 9:{ x } [alias] analysing instruction: t.field = a; -[alias] May-aliases after instruction t.field = a; are { a; t.field } +[alias] May-aliases after instruction t.field = a; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { a; t.field } [alias] May-alias graph after instruction t.field = a; is - 4:{ t } -field→ 5:{ a } 5:{ a } → 1:{ x } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 12:{ t } -field→ 13:{ a } + 13:{ a } → 9:{ x } [alias] analysing instruction: z = & t; -[alias] May-aliases after instruction z = & t; are { z->field; a; t.field } +[alias] May-aliases after instruction z = & t; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { z->field; a; t.field } [alias] May-alias graph after instruction z = & t; is - 5:{ a } → 1:{ x } 6:{ z } → 7:{ t } 7:{ t } -field→ 5:{ a } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 13:{ a } → 9:{ x } + 14:{ z } → 15:{ t } 15:{ t } -field→ 13:{ a } [alias] analysing instruction: q = z; [alias] May-aliases after instruction q = z; are + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z->field; q->field; a; t.field } { z; q } [alias] May-alias graph after instruction q = z; is - 5:{ a } → 1:{ x } 9:{ z; q } → 10:{ t } 10:{ t } -field→ 5:{ a } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 13:{ a } → 9:{ x } + 17:{ z; q } → 18:{ t } 18:{ t } -field→ 13:{ a } [alias] analysing instruction: b = z->field; [alias] May-aliases after instruction b = z->field; are - { z; q } { z->field; q->field; a; b; t.field } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { z->field; q->field; a; b; t.field } [alias] May-alias graph after instruction b = z->field; is - 9:{ z; q } → 10:{ t } 10:{ t } -field→ 11:{ a; b } - 11:{ a; b } → 12:{ x } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 17:{ z; q } → 18:{ t } + 18:{ t } -field→ 19:{ a; b } 19:{ a; b } → 20:{ x } [alias] analysing instruction: n = q->field; [alias] May-aliases after instruction n = q->field; are - { z; q } { z->field; q->field; a; b; n; t.field } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { z->field; q->field; a; b; n; t.field } [alias] May-alias graph after instruction n = q->field; is - 9:{ z; q } → 10:{ t } 10:{ t } -field→ 13:{ a; b; n } - 13:{ a; b; n } → 14:{ x } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 17:{ z; q } → 18:{ t } + 18:{ t } -field→ 21:{ a; b; n } 21:{ a; b; n } → 22:{ x } [alias] analysing instruction: printf("%d\n%d\n",a == b,a == n); [alias:undefined:fn] records.c:21: Warning: function printf has no definition [alias] May-aliases after instruction printf("%d\n%d\n",a == b,a == n); are - { z; q } { z->field; q->field; a; b; n; t.field } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { z->field; q->field; a; b; n; t.field } [alias] May-alias graph after instruction printf("%d\n%d\n",a == b,a == n); is - 9:{ z; q } → 10:{ t } 10:{ t } -field→ 13:{ a; b; n } - 13:{ a; b; n } → 14:{ x } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 17:{ z; q } → 18:{ t } + 18:{ t } -field→ 21:{ a; b; n } 21:{ a; b; n } → 22:{ x } [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are - { z; q } { z->field; q->field; a; b; n; t.field } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { z->field; q->field; a; b; n; t.field } [alias] May-alias graph after instruction __retres = 0; is - 9:{ z; q } → 10:{ t } 10:{ t } -field→ 13:{ a; b; n } - 13:{ a; b; n } → 14:{ x } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 17:{ z; q } → 18:{ t } + 18:{ t } -field→ 21:{ a; b; n } 21:{ a; b; n } → 22:{ x } [alias] May-aliases at the end of function main: - { z; q } { z->field; q->field; a; b; n; t.field } + { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } { z; q } + { z->field; q->field; a; b; n; t.field } [alias] May-alias graph at the end of function main: - 9:{ z; q } → 10:{ t } 10:{ t } -field→ 13:{ a; b; n } - 13:{ a; b; n } → 14:{ x } + 0:{ __fc_fopen; __fc_p_fopen } → 1:{ } + 4:{ __fc_tmpnam; __fc_p_tmpnam } → 5:{ } 17:{ z; q } → 18:{ t } + 18:{ t } -field→ 21:{ a; b; n } 21:{ a; b; n } → 22:{ x } [alias] Summary of function main: formals: returns: __retres - state: { z; q } { z->field; q->field; a; b; n; t.field } + state: { __fc_fopen; __fc_p_fopen } { __fc_tmpnam; __fc_p_tmpnam } + { z; q } { z->field; q->field; a; b; n; t.field } [alias] Analysis complete diff --git a/src/plugins/alias/tests/offsets/oracle/array3.res.oracle b/src/plugins/alias/tests/offsets/oracle/array3.res.oracle index 6a9db912e09ad8e8ccbb8adc25f7b7adbd51f77b..ad3eb428eb3186a208f64024292f816485242620 100644 --- a/src/plugins/alias/tests/offsets/oracle/array3.res.oracle +++ b/src/plugins/alias/tests/offsets/oracle/array3.res.oracle @@ -1,31 +1,56 @@ [kernel] Parsing array3.c (with preprocessing) +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are <none> +[alias] May-alias graph after global variable definition __fc_rand_max is + <empty> +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing function: main [alias] analysing instruction: int *x = malloc((unsigned long)4 * sizeof(int)); [alias] May-aliases after instruction - int *x = malloc((unsigned long)4 * sizeof(int)); are <none> + int *x = malloc((unsigned long)4 * sizeof(int)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction - int *x = malloc((unsigned long)4 * sizeof(int)); is 0:{ x } → 1:{ } + int *x = malloc((unsigned long)4 * sizeof(int)); is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x } → 5:{ } [alias] analysing instruction: int *y = malloc((unsigned long)4 * sizeof(int)); [alias] May-aliases after instruction - int *y = malloc((unsigned long)4 * sizeof(int)); are <none> + int *y = malloc((unsigned long)4 * sizeof(int)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction int *y = malloc((unsigned long)4 * sizeof(int)); is - 0:{ x } → 1:{ } 2:{ y } → 3:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x } → 5:{ } 6:{ y } → 7:{ } [alias] analysing instruction: x = mat[0]; -[alias] May-aliases after instruction x = mat[0]; are { mat[0..]; x } +[alias] May-aliases after instruction x = mat[0]; are + { __fc_random48_counter; __fc_p_random48_counter } { mat[0..]; x } [alias] May-alias graph after instruction x = mat[0]; is - 0:{ x } → 1:{ } 2:{ y } → 3:{ } 4:{ mat } → 0:{ x } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x } → 5:{ } 6:{ y } → 7:{ } 8:{ mat } → 4:{ x } [alias] analysing instruction: y = mat[1]; -[alias] May-aliases after instruction y = mat[1]; are { mat[0..]; x; y } +[alias] May-aliases after instruction y = mat[1]; are + { __fc_random48_counter; __fc_p_random48_counter } { mat[0..]; x; y } [alias] May-alias graph after instruction y = mat[1]; is - 2:{ x; y } → 3:{ } 4:{ mat } → 2:{ x; y } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 6:{ x; y } → 7:{ } 8:{ mat } → 6:{ x; y } [alias] analysing instruction: __retres = 0; -[alias] May-aliases after instruction __retres = 0; are { mat[0..]; x; y } +[alias] May-aliases after instruction __retres = 0; are + { __fc_random48_counter; __fc_p_random48_counter } { mat[0..]; x; y } [alias] May-alias graph after instruction __retres = 0; is - 2:{ x; y } → 3:{ } 4:{ mat } → 2:{ x; y } -[alias] May-aliases at the end of function main: { mat[0..]; x; y } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 6:{ x; y } → 7:{ } 8:{ mat } → 6:{ x; y } +[alias] May-aliases at the end of function main: + { __fc_random48_counter; __fc_p_random48_counter } { mat[0..]; x; y } [alias] May-alias graph at the end of function main: - 2:{ x; y } → 3:{ } 4:{ mat } → 2:{ x; y } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 6:{ x; y } → 7:{ } 8:{ mat } → 6:{ x; y } [alias] Summary of function main: - formals: returns: __retres state: { mat[0..]; x; y } + formals: returns: __retres + state: { __fc_random48_counter; __fc_p_random48_counter } { mat[0..]; x; y } [alias] Analysis complete diff --git a/src/plugins/alias/tests/offsets/oracle/nested1.res.oracle b/src/plugins/alias/tests/offsets/oracle/nested1.res.oracle index 2affa633b02404a8cd5408b036c878b46d3dbb70..6be72e91cd5f5f82da8f20a47f34f0f02df4b574 100644 --- a/src/plugins/alias/tests/offsets/oracle/nested1.res.oracle +++ b/src/plugins/alias/tests/offsets/oracle/nested1.res.oracle @@ -1,134 +1,179 @@ [kernel] Parsing nested1.c (with preprocessing) +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are <none> +[alias] May-alias graph after global variable definition __fc_rand_max is + <empty> +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing function: main [alias] analysing instruction: st_1_t x1 = {.a = 0, .b = 1}; -[alias] May-aliases after instruction st_1_t x1 = {.a = 0, .b = 1}; are <none> +[alias] May-aliases after instruction st_1_t x1 = {.a = 0, .b = 1}; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_1_t x1 = {.a = 0, .b = 1}; is - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: st_1_t x2 = {.a = 1, .b = 2}; -[alias] May-aliases after instruction st_1_t x2 = {.a = 1, .b = 2}; are <none> +[alias] May-aliases after instruction st_1_t x2 = {.a = 1, .b = 2}; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_1_t x2 = {.a = 1, .b = 2}; is - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: tab_y[0] = & x1; -[alias] May-aliases after instruction tab_y[0] = & x1; are <none> +[alias] May-aliases after instruction tab_y[0] = & x1; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction tab_y[0] = & x1; is - 0:{ tab_y } → 1:{ } 1:{ } → 2:{ x1 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 5:{ } 5:{ } → 6:{ x1 } [alias] analysing instruction: tab_y[1] = & x2; -[alias] May-aliases after instruction tab_y[1] = & x2; are <none> +[alias] May-aliases after instruction tab_y[1] = & x2; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction tab_y[1] = & x2; is - 0:{ tab_y } → 1:{ } 1:{ } → 2:{ x1; x2 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 5:{ } 5:{ } → 6:{ x1; x2 } [alias] analysing instruction: st_2_t *z1 = malloc(sizeof(st_2_t)); [alias] May-aliases after instruction st_2_t *z1 = malloc(sizeof(st_2_t)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_2_t *z1 = malloc(sizeof(st_2_t)); - is 0:{ tab_y } → 1:{ } 1:{ } → 2:{ x1; x2 } 7:{ z1 } → 8:{ } + is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 5:{ } 5:{ } → 6:{ x1; x2 } 11:{ z1 } → 12:{ } [alias] analysing instruction: st_2_t *z2 = malloc(sizeof(st_2_t)); [alias] May-aliases after instruction st_2_t *z2 = malloc(sizeof(st_2_t)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_2_t *z2 = malloc(sizeof(st_2_t)); is - 0:{ tab_y } → 1:{ } 1:{ } → 2:{ x1; x2 } 7:{ z1 } → 8:{ } - 9:{ z2 } → 10:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 5:{ } 5:{ } → 6:{ x1; x2 } 11:{ z1 } → 12:{ } + 13:{ z2 } → 14:{ } [alias] analysing instruction: st_3_t *t = malloc(sizeof(st_3_t)); [alias] May-aliases after instruction st_3_t *t = malloc(sizeof(st_3_t)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_3_t *t = malloc(sizeof(st_3_t)); is - 0:{ tab_y } → 1:{ } 1:{ } → 2:{ x1; x2 } 7:{ z1 } → 8:{ } - 9:{ z2 } → 10:{ } 11:{ t } → 12:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 5:{ } 5:{ } → 6:{ x1; x2 } 11:{ z1 } → 12:{ } + 13:{ z2 } → 14:{ } 15:{ t } → 16:{ } [alias] analysing instruction: int *a = malloc(sizeof(int)); -[alias] May-aliases after instruction int *a = malloc(sizeof(int)); are <none> +[alias] May-aliases after instruction int *a = malloc(sizeof(int)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction int *a = malloc(sizeof(int)); is - 0:{ tab_y } → 1:{ } 1:{ } → 2:{ x1; x2 } 7:{ z1 } → 8:{ } - 9:{ z2 } → 10:{ } 11:{ t } → 12:{ } 13:{ a } → 14:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 5:{ } 5:{ } → 6:{ x1; x2 } 11:{ z1 } → 12:{ } + 13:{ z2 } → 14:{ } 15:{ t } → 16:{ } 17:{ a } → 18:{ } [alias] analysing instruction: int *b = malloc(sizeof(int)); -[alias] May-aliases after instruction int *b = malloc(sizeof(int)); are <none> +[alias] May-aliases after instruction int *b = malloc(sizeof(int)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction int *b = malloc(sizeof(int)); is - 0:{ tab_y } → 1:{ } 1:{ } → 2:{ x1; x2 } 7:{ z1 } → 8:{ } - 9:{ z2 } → 10:{ } 11:{ t } → 12:{ } 13:{ a } → 14:{ } - 15:{ b } → 16:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 5:{ } 5:{ } → 6:{ x1; x2 } 11:{ z1 } → 12:{ } + 13:{ z2 } → 14:{ } 15:{ t } → 16:{ } 17:{ a } → 18:{ } + 19:{ b } → 20:{ } [alias] analysing instruction: *a = 0; -[alias] May-aliases after instruction *a = 0; are <none> +[alias] May-aliases after instruction *a = 0; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *a = 0; is - 0:{ tab_y } → 1:{ } 1:{ } → 2:{ x1; x2 } 7:{ z1 } → 8:{ } - 9:{ z2 } → 10:{ } 11:{ t } → 12:{ } 13:{ a } → 14:{ } - 15:{ b } → 16:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 5:{ } 5:{ } → 6:{ x1; x2 } 11:{ z1 } → 12:{ } + 13:{ z2 } → 14:{ } 15:{ t } → 16:{ } 17:{ a } → 18:{ } + 19:{ b } → 20:{ } [alias] analysing instruction: *b = 5; -[alias] May-aliases after instruction *b = 5; are <none> +[alias] May-aliases after instruction *b = 5; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *b = 5; is - 0:{ tab_y } → 1:{ } 1:{ } → 2:{ x1; x2 } 7:{ z1 } → 8:{ } - 9:{ z2 } → 10:{ } 11:{ t } → 12:{ } 13:{ a } → 14:{ } - 15:{ b } → 16:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 5:{ } 5:{ } → 6:{ x1; x2 } 11:{ z1 } → 12:{ } + 13:{ z2 } → 14:{ } 15:{ t } → 16:{ } 17:{ a } → 18:{ } + 19:{ b } → 20:{ } [alias] analysing instruction: z1->s = (struct struct_1_t *)tab_y[0]; [alias] May-aliases after instruction z1->s = (struct struct_1_t *)tab_y[0]; are - { z1->s; tab_y[0..] } + { __fc_random48_counter; __fc_p_random48_counter } { z1->s; tab_y[0..] } [alias] May-alias graph after instruction z1->s = (struct struct_1_t *)tab_y[0]; is - 0:{ tab_y } → 17:{ } 7:{ z1 } → 8:{ } 8:{ } -s→ 17:{ } - 9:{ z2 } → 10:{ } 11:{ t } → 12:{ } 13:{ a } → 14:{ } - 15:{ b } → 16:{ } 17:{ } → 2:{ x1; x2 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 21:{ } 11:{ z1 } → 12:{ } 12:{ } -s→ 21:{ } + 13:{ z2 } → 14:{ } 15:{ t } → 16:{ } 17:{ a } → 18:{ } + 19:{ b } → 20:{ } 21:{ } → 6:{ x1; x2 } [alias] analysing instruction: z2->s = (struct struct_1_t *)tab_y[1]; [alias] May-aliases after instruction z2->s = (struct struct_1_t *)tab_y[1]; are + { __fc_random48_counter; __fc_p_random48_counter } { z1->s; z2->s; tab_y[0..] } [alias] May-alias graph after instruction z2->s = (struct struct_1_t *)tab_y[1]; is - 0:{ tab_y } → 18:{ } 7:{ z1 } → 8:{ } 8:{ } -s→ 18:{ } - 9:{ z2 } → 10:{ } 10:{ } -s→ 18:{ } 11:{ t } → 12:{ } - 13:{ a } → 14:{ } 15:{ b } → 16:{ } 18:{ } → 2:{ x1; x2 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 22:{ } 11:{ z1 } → 12:{ } 12:{ } -s→ 22:{ } + 13:{ z2 } → 14:{ } 14:{ } -s→ 22:{ } 15:{ t } → 16:{ } + 17:{ a } → 18:{ } 19:{ b } → 20:{ } 22:{ } → 6:{ x1; x2 } [alias] analysing instruction: z1->c = a; [alias] May-aliases after instruction z1->c = a; are + { __fc_random48_counter; __fc_p_random48_counter } { z1->s; z2->s; tab_y[0..] } { z1->c; a } [alias] May-alias graph after instruction z1->c = a; is - 0:{ tab_y } → 18:{ } 7:{ z1 } → 8:{ } 8:{ } -s→ 18:{ } - 8:{ } -c→ 19:{ a } 9:{ z2 } → 10:{ } 10:{ } -s→ 18:{ } - 11:{ t } → 12:{ } 15:{ b } → 16:{ } 18:{ } → 2:{ x1; x2 } - 19:{ a } → 14:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 22:{ } 11:{ z1 } → 12:{ } 12:{ } -s→ 22:{ } + 12:{ } -c→ 23:{ a } 13:{ z2 } → 14:{ } 14:{ } -s→ 22:{ } + 15:{ t } → 16:{ } 19:{ b } → 20:{ } 22:{ } → 6:{ x1; x2 } + 23:{ a } → 18:{ } [alias] analysing instruction: z2->c = b; [alias] May-aliases after instruction z2->c = b; are + { __fc_random48_counter; __fc_p_random48_counter } { z1->s; z2->s; tab_y[0..] } { z1->c; a } { z2->c; b } [alias] May-alias graph after instruction z2->c = b; is - 0:{ tab_y } → 18:{ } 7:{ z1 } → 8:{ } 8:{ } -s→ 18:{ } - 8:{ } -c→ 19:{ a } 9:{ z2 } → 10:{ } 10:{ } -s→ 18:{ } - 10:{ } -c→ 20:{ b } 11:{ t } → 12:{ } 18:{ } → 2:{ x1; x2 } - 19:{ a } → 14:{ } 20:{ b } → 16:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 22:{ } 11:{ z1 } → 12:{ } 12:{ } -s→ 22:{ } + 12:{ } -c→ 23:{ a } 13:{ z2 } → 14:{ } 14:{ } -s→ 22:{ } + 14:{ } -c→ 24:{ b } 15:{ t } → 16:{ } 22:{ } → 6:{ x1; x2 } + 23:{ a } → 18:{ } 24:{ b } → 20:{ } [alias] analysing instruction: t->t = (struct struct_2_t *)z1; [alias] May-aliases after instruction t->t = (struct struct_2_t *)z1; are + { __fc_random48_counter; __fc_p_random48_counter } { (t->t)->s; z1->s; z2->s; tab_y[0..] } { t->t; z1 } { (t->t)->c; z1->c; a } { z2->c; b } [alias] May-alias graph after instruction t->t = (struct struct_2_t *)z1; is - 0:{ tab_y } → 18:{ } 8:{ } -s→ 18:{ } 8:{ } -c→ 19:{ a } - 9:{ z2 } → 10:{ } 10:{ } -s→ 18:{ } 10:{ } -c→ 20:{ b } - 11:{ t } → 12:{ } 12:{ } -t→ 21:{ z1 } 18:{ } → 2:{ x1; x2 } - 19:{ a } → 14:{ } 20:{ b } → 16:{ } 21:{ z1 } → 8:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 22:{ } 12:{ } -s→ 22:{ } 12:{ } -c→ 23:{ a } + 13:{ z2 } → 14:{ } 14:{ } -s→ 22:{ } 14:{ } -c→ 24:{ b } + 15:{ t } → 16:{ } 16:{ } -t→ 25:{ z1 } 22:{ } → 6:{ x1; x2 } + 23:{ a } → 18:{ } 24:{ b } → 20:{ } 25:{ z1 } → 12:{ } [alias] analysing instruction: t->d = a; [alias] May-aliases after instruction t->d = a; are + { __fc_random48_counter; __fc_p_random48_counter } { (t->t)->s; z1->s; z2->s; tab_y[0..] } { t->t; z1 } { (t->t)->c; z1->c; t->d; a } { z2->c; b } [alias] May-alias graph after instruction t->d = a; is - 0:{ tab_y } → 18:{ } 8:{ } -s→ 18:{ } 8:{ } -c→ 22:{ a } - 9:{ z2 } → 10:{ } 10:{ } -s→ 18:{ } 10:{ } -c→ 20:{ b } - 11:{ t } → 12:{ } 12:{ } -t→ 21:{ z1 } 12:{ } -d→ 22:{ a } - 18:{ } → 2:{ x1; x2 } 20:{ b } → 16:{ } 21:{ z1 } → 8:{ } - 22:{ a } → 14:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 22:{ } 12:{ } -s→ 22:{ } 12:{ } -c→ 26:{ a } + 13:{ z2 } → 14:{ } 14:{ } -s→ 22:{ } 14:{ } -c→ 24:{ b } + 15:{ t } → 16:{ } 16:{ } -t→ 25:{ z1 } 16:{ } -d→ 26:{ a } + 22:{ } → 6:{ x1; x2 } 24:{ b } → 20:{ } 25:{ z1 } → 12:{ } + 26:{ a } → 18:{ } [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are + { __fc_random48_counter; __fc_p_random48_counter } { (t->t)->s; z1->s; z2->s; tab_y[0..] } { t->t; z1 } { (t->t)->c; z1->c; t->d; a } { z2->c; b } [alias] May-alias graph after instruction __retres = 0; is - 0:{ tab_y } → 18:{ } 8:{ } -s→ 18:{ } 8:{ } -c→ 22:{ a } - 9:{ z2 } → 10:{ } 10:{ } -s→ 18:{ } 10:{ } -c→ 20:{ b } - 11:{ t } → 12:{ } 12:{ } -t→ 21:{ z1 } 12:{ } -d→ 22:{ a } - 18:{ } → 2:{ x1; x2 } 20:{ b } → 16:{ } 21:{ z1 } → 8:{ } - 22:{ a } → 14:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 22:{ } 12:{ } -s→ 22:{ } 12:{ } -c→ 26:{ a } + 13:{ z2 } → 14:{ } 14:{ } -s→ 22:{ } 14:{ } -c→ 24:{ b } + 15:{ t } → 16:{ } 16:{ } -t→ 25:{ z1 } 16:{ } -d→ 26:{ a } + 22:{ } → 6:{ x1; x2 } 24:{ b } → 20:{ } 25:{ z1 } → 12:{ } + 26:{ a } → 18:{ } [alias] May-aliases at the end of function main: + { __fc_random48_counter; __fc_p_random48_counter } { (t->t)->s; z1->s; z2->s; tab_y[0..] } { t->t; z1 } { (t->t)->c; z1->c; t->d; a } { z2->c; b } [alias] May-alias graph at the end of function main: - 0:{ tab_y } → 18:{ } 8:{ } -s→ 18:{ } 8:{ } -c→ 22:{ a } - 9:{ z2 } → 10:{ } 10:{ } -s→ 18:{ } 10:{ } -c→ 20:{ b } - 11:{ t } → 12:{ } 12:{ } -t→ 21:{ z1 } 12:{ } -d→ 22:{ a } - 18:{ } → 2:{ x1; x2 } 20:{ b } → 16:{ } 21:{ z1 } → 8:{ } - 22:{ a } → 14:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ tab_y } → 22:{ } 12:{ } -s→ 22:{ } 12:{ } -c→ 26:{ a } + 13:{ z2 } → 14:{ } 14:{ } -s→ 22:{ } 14:{ } -c→ 24:{ b } + 15:{ t } → 16:{ } 16:{ } -t→ 25:{ z1 } 16:{ } -d→ 26:{ a } + 22:{ } → 6:{ x1; x2 } 24:{ b } → 20:{ } 25:{ z1 } → 12:{ } + 26:{ a } → 18:{ } [alias] Summary of function main: formals: returns: __retres - state: { (t->t)->s; z1->s; z2->s; tab_y[0..] } { t->t; z1 } + state: { __fc_random48_counter; __fc_p_random48_counter } + { (t->t)->s; z1->s; z2->s; tab_y[0..] } { t->t; z1 } { (t->t)->c; z1->c; t->d; a } { z2->c; b } [alias] Analysis complete diff --git a/src/plugins/alias/tests/offsets/oracle/nested2.res.oracle b/src/plugins/alias/tests/offsets/oracle/nested2.res.oracle index c8228e82bb78b6e4676ca12d9336313bb122f853..190bcfa5118281cc6701048da3bbd42aa1f6e53f 100644 --- a/src/plugins/alias/tests/offsets/oracle/nested2.res.oracle +++ b/src/plugins/alias/tests/offsets/oracle/nested2.res.oracle @@ -1,84 +1,116 @@ [kernel] Parsing nested2.c (with preprocessing) +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are <none> +[alias] May-alias graph after global variable definition __fc_rand_max is + <empty> +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing function: main [alias] analysing instruction: st_1_t x1 = {.a = 0, .b = 1}; -[alias] May-aliases after instruction st_1_t x1 = {.a = 0, .b = 1}; are <none> +[alias] May-aliases after instruction st_1_t x1 = {.a = 0, .b = 1}; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_1_t x1 = {.a = 0, .b = 1}; is - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: st_1_t x2 = {.a = 2, .b = 3}; -[alias] May-aliases after instruction st_1_t x2 = {.a = 2, .b = 3}; are <none> +[alias] May-aliases after instruction st_1_t x2 = {.a = 2, .b = 3}; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_1_t x2 = {.a = 2, .b = 3}; is - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: st_2_t *z1 = malloc(sizeof(st_2_t)); [alias] May-aliases after instruction st_2_t *z1 = malloc(sizeof(st_2_t)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_2_t *z1 = malloc(sizeof(st_2_t)); - is 0:{ z1 } → 1:{ } + is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ z1 } → 5:{ } [alias] analysing instruction: st_3_t *t = malloc(sizeof(st_3_t)); [alias] May-aliases after instruction st_3_t *t = malloc(sizeof(st_3_t)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_3_t *t = malloc(sizeof(st_3_t)); is - 0:{ z1 } → 1:{ } 2:{ t } → 3:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ z1 } → 5:{ } 6:{ t } → 7:{ } [alias] analysing instruction: int *a = malloc(sizeof(int)); -[alias] May-aliases after instruction int *a = malloc(sizeof(int)); are <none> +[alias] May-aliases after instruction int *a = malloc(sizeof(int)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction int *a = malloc(sizeof(int)); is - 0:{ z1 } → 1:{ } 2:{ t } → 3:{ } 4:{ a } → 5:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ z1 } → 5:{ } 6:{ t } → 7:{ } 8:{ a } → 9:{ } [alias] analysing instruction: *a = 0; -[alias] May-aliases after instruction *a = 0; are <none> +[alias] May-aliases after instruction *a = 0; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *a = 0; is - 0:{ z1 } → 1:{ } 2:{ t } → 3:{ } 4:{ a } → 5:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ z1 } → 5:{ } 6:{ t } → 7:{ } 8:{ a } → 9:{ } [alias] analysing instruction: z1->s[0] = (struct struct_1_t *)(& x1); [alias] May-aliases after instruction z1->s[0] = (struct struct_1_t *)(& x1); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction z1->s[0] = (struct struct_1_t *)(& x1); is - 0:{ z1 } → 1:{ } 1:{ } -s→ 6:{ } 2:{ t } → 3:{ } - 4:{ a } → 5:{ } 6:{ } → 7:{ } 7:{ } → 8:{ x1 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ z1 } → 5:{ } 5:{ } -s→ 10:{ } 6:{ t } → 7:{ } + 8:{ a } → 9:{ } 10:{ } → 11:{ } 11:{ } → 12:{ x1 } [alias] analysing instruction: z1->s[1] = (struct struct_1_t *)(& x2); [alias] May-aliases after instruction z1->s[1] = (struct struct_1_t *)(& x2); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction z1->s[1] = (struct struct_1_t *)(& x2); is - 0:{ z1 } → 1:{ } 1:{ } -s→ 6:{ } 2:{ t } → 3:{ } - 4:{ a } → 5:{ } 6:{ } → 7:{ } 7:{ } → 8:{ x1; x2 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ z1 } → 5:{ } 5:{ } -s→ 10:{ } 6:{ t } → 7:{ } + 8:{ a } → 9:{ } 10:{ } → 11:{ } 11:{ } → 12:{ x1; x2 } [alias] analysing instruction: z1->c = a; -[alias] May-aliases after instruction z1->c = a; are { z1->c; a } +[alias] May-aliases after instruction z1->c = a; are + { __fc_random48_counter; __fc_p_random48_counter } { z1->c; a } [alias] May-alias graph after instruction z1->c = a; is - 0:{ z1 } → 1:{ } 1:{ } -s→ 6:{ } 1:{ } -c→ 12:{ a } - 2:{ t } → 3:{ } 6:{ } → 7:{ } 7:{ } → 8:{ x1; x2 } - 12:{ a } → 5:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ z1 } → 5:{ } 5:{ } -s→ 10:{ } 5:{ } -c→ 16:{ a } + 6:{ t } → 7:{ } 10:{ } → 11:{ } 11:{ } → 12:{ x1; x2 } + 16:{ a } → 9:{ } [alias] analysing instruction: t->t = (struct struct_2_t *)z1; [alias] May-aliases after instruction t->t = (struct struct_2_t *)z1; are - { t->t; z1 } { (t->t)->c; z1->c; a } { (t->t)->s; z1->s } - { (t->t)->s[0..]; z1->s[0..] } + { __fc_random48_counter; __fc_p_random48_counter } { t->t; z1 } + { (t->t)->c; z1->c; a } { (t->t)->s; z1->s } { (t->t)->s[0..]; z1->s[0..] } [alias] May-alias graph after instruction t->t = (struct struct_2_t *)z1; is - 1:{ } -s→ 6:{ } 1:{ } -c→ 12:{ a } 2:{ t } → 3:{ } - 3:{ } -t→ 13:{ z1 } 6:{ } → 7:{ } 7:{ } → 8:{ x1; x2 } - 12:{ a } → 5:{ } 13:{ z1 } → 1:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 5:{ } -s→ 10:{ } 5:{ } -c→ 16:{ a } 6:{ t } → 7:{ } + 7:{ } -t→ 17:{ z1 } 10:{ } → 11:{ } 11:{ } → 12:{ x1; x2 } + 16:{ a } → 9:{ } 17:{ z1 } → 5:{ } [alias] analysing instruction: t->d = a; [alias] May-aliases after instruction t->d = a; are - { t->t; z1 } { (t->t)->c; z1->c; t->d; a } { (t->t)->s; z1->s } + { __fc_random48_counter; __fc_p_random48_counter } { t->t; z1 } + { (t->t)->c; z1->c; t->d; a } { (t->t)->s; z1->s } { (t->t)->s[0..]; z1->s[0..] } [alias] May-alias graph after instruction t->d = a; is - 1:{ } -s→ 6:{ } 1:{ } -c→ 14:{ a } 2:{ t } → 3:{ } - 3:{ } -t→ 13:{ z1 } 3:{ } -d→ 14:{ a } 6:{ } → 7:{ } - 7:{ } → 8:{ x1; x2 } 13:{ z1 } → 1:{ } 14:{ a } → 5:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 5:{ } -s→ 10:{ } 5:{ } -c→ 18:{ a } 6:{ t } → 7:{ } + 7:{ } -t→ 17:{ z1 } 7:{ } -d→ 18:{ a } 10:{ } → 11:{ } + 11:{ } → 12:{ x1; x2 } 17:{ z1 } → 5:{ } 18:{ a } → 9:{ } [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are - { t->t; z1 } { (t->t)->c; z1->c; t->d; a } { (t->t)->s; z1->s } + { __fc_random48_counter; __fc_p_random48_counter } { t->t; z1 } + { (t->t)->c; z1->c; t->d; a } { (t->t)->s; z1->s } { (t->t)->s[0..]; z1->s[0..] } [alias] May-alias graph after instruction __retres = 0; is - 1:{ } -s→ 6:{ } 1:{ } -c→ 14:{ a } 2:{ t } → 3:{ } - 3:{ } -t→ 13:{ z1 } 3:{ } -d→ 14:{ a } 6:{ } → 7:{ } - 7:{ } → 8:{ x1; x2 } 13:{ z1 } → 1:{ } 14:{ a } → 5:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 5:{ } -s→ 10:{ } 5:{ } -c→ 18:{ a } 6:{ t } → 7:{ } + 7:{ } -t→ 17:{ z1 } 7:{ } -d→ 18:{ a } 10:{ } → 11:{ } + 11:{ } → 12:{ x1; x2 } 17:{ z1 } → 5:{ } 18:{ a } → 9:{ } [alias] May-aliases at the end of function main: - { t->t; z1 } { (t->t)->c; z1->c; t->d; a } { (t->t)->s; z1->s } + { __fc_random48_counter; __fc_p_random48_counter } { t->t; z1 } + { (t->t)->c; z1->c; t->d; a } { (t->t)->s; z1->s } { (t->t)->s[0..]; z1->s[0..] } [alias] May-alias graph at the end of function main: - 1:{ } -s→ 6:{ } 1:{ } -c→ 14:{ a } 2:{ t } → 3:{ } - 3:{ } -t→ 13:{ z1 } 3:{ } -d→ 14:{ a } 6:{ } → 7:{ } - 7:{ } → 8:{ x1; x2 } 13:{ z1 } → 1:{ } 14:{ a } → 5:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 5:{ } -s→ 10:{ } 5:{ } -c→ 18:{ a } 6:{ t } → 7:{ } + 7:{ } -t→ 17:{ z1 } 7:{ } -d→ 18:{ a } 10:{ } → 11:{ } + 11:{ } → 12:{ x1; x2 } 17:{ z1 } → 5:{ } 18:{ a } → 9:{ } [alias] Summary of function main: formals: returns: __retres - state: { t->t; z1 } { (t->t)->c; z1->c; t->d; a } { (t->t)->s; z1->s } + state: { __fc_random48_counter; __fc_p_random48_counter } { t->t; z1 } + { (t->t)->c; z1->c; t->d; a } { (t->t)->s; z1->s } { (t->t)->s[0..]; z1->s[0..] } [alias] Analysis complete diff --git a/src/plugins/alias/tests/offsets/oracle/structure4.res.oracle b/src/plugins/alias/tests/offsets/oracle/structure4.res.oracle index 5202212a7ef9f6fbe6eabf5f896035c85a7d45eb..8f1124c89d2326c5d0c2f1ce1c583171e0792bc7 100644 --- a/src/plugins/alias/tests/offsets/oracle/structure4.res.oracle +++ b/src/plugins/alias/tests/offsets/oracle/structure4.res.oracle @@ -1,43 +1,69 @@ [kernel] Parsing structure4.c (with preprocessing) +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are <none> +[alias] May-alias graph after global variable definition __fc_rand_max is + <empty> +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing function: main [alias] analysing instruction: st_1_t x1 = {.a = 0, .b = 1}; -[alias] May-aliases after instruction st_1_t x1 = {.a = 0, .b = 1}; are <none> +[alias] May-aliases after instruction st_1_t x1 = {.a = 0, .b = 1}; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_1_t x1 = {.a = 0, .b = 1}; is - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: st_1_t x2 = {.a = 1, .b = 2}; -[alias] May-aliases after instruction st_1_t x2 = {.a = 1, .b = 2}; are <none> +[alias] May-aliases after instruction st_1_t x2 = {.a = 1, .b = 2}; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_1_t x2 = {.a = 1, .b = 2}; is - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: st_1_t *y1 = malloc(sizeof(st_1_t)); [alias] May-aliases after instruction st_1_t *y1 = malloc(sizeof(st_1_t)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_1_t *y1 = malloc(sizeof(st_1_t)); - is 0:{ y1 } → 1:{ } + is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ y1 } → 5:{ } [alias] analysing instruction: st_2_t *z = malloc(sizeof(st_2_t)); [alias] May-aliases after instruction st_2_t *z = malloc(sizeof(st_2_t)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_2_t *z = malloc(sizeof(st_2_t)); is - 0:{ y1 } → 1:{ } 2:{ z } → 3:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ y1 } → 5:{ } 6:{ z } → 7:{ } [alias] analysing instruction: y1 = & x1; -[alias] May-aliases after instruction y1 = & x1; are <none> +[alias] May-aliases after instruction y1 = & x1; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction y1 = & x1; is - 0:{ y1 } → 1:{ x1 } 2:{ z } → 3:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ y1 } → 5:{ x1 } 6:{ z } → 7:{ } [alias] analysing instruction: z->s = (struct struct_1_t *)y1; [alias] May-aliases after instruction z->s = (struct struct_1_t *)y1; are - { z->s; y1 } + { __fc_random48_counter; __fc_p_random48_counter } { z->s; y1 } [alias] May-alias graph after instruction z->s = (struct struct_1_t *)y1; is - 2:{ z } → 3:{ } 3:{ } -s→ 6:{ y1 } 6:{ y1 } → 1:{ x1 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 6:{ z } → 7:{ } 7:{ } -s→ 10:{ y1 } 10:{ y1 } → 5:{ x1 } [alias] analysing instruction: z->c = 6; -[alias] May-aliases after instruction z->c = 6; are { z->s; y1 } +[alias] May-aliases after instruction z->c = 6; are + { __fc_random48_counter; __fc_p_random48_counter } { z->s; y1 } [alias] May-alias graph after instruction z->c = 6; is - 2:{ z } → 3:{ } 3:{ } -s→ 6:{ y1 } 6:{ y1 } → 1:{ x1 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 6:{ z } → 7:{ } 7:{ } -s→ 10:{ y1 } 10:{ y1 } → 5:{ x1 } [alias] analysing instruction: __retres = 0; -[alias] May-aliases after instruction __retres = 0; are { z->s; y1 } +[alias] May-aliases after instruction __retres = 0; are + { __fc_random48_counter; __fc_p_random48_counter } { z->s; y1 } [alias] May-alias graph after instruction __retres = 0; is - 2:{ z } → 3:{ } 3:{ } -s→ 6:{ y1 } 6:{ y1 } → 1:{ x1 } -[alias] May-aliases at the end of function main: { z->s; y1 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 6:{ z } → 7:{ } 7:{ } -s→ 10:{ y1 } 10:{ y1 } → 5:{ x1 } +[alias] May-aliases at the end of function main: + { __fc_random48_counter; __fc_p_random48_counter } { z->s; y1 } [alias] May-alias graph at the end of function main: - 2:{ z } → 3:{ } 3:{ } -s→ 6:{ y1 } 6:{ y1 } → 1:{ x1 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 6:{ z } → 7:{ } 7:{ } -s→ 10:{ y1 } 10:{ y1 } → 5:{ x1 } [alias] Summary of function main: - formals: returns: __retres state: { z->s; y1 } + formals: returns: __retres + state: { __fc_random48_counter; __fc_p_random48_counter } { z->s; y1 } [alias] Analysis complete diff --git a/src/plugins/alias/tests/offsets/oracle/structure5.res.oracle b/src/plugins/alias/tests/offsets/oracle/structure5.res.oracle index 971bf53b27bdb82c90533b39d350d004e10ebf78..b64101588703b9f4c03cd9c5bd96a4f9209af8b5 100644 --- a/src/plugins/alias/tests/offsets/oracle/structure5.res.oracle +++ b/src/plugins/alias/tests/offsets/oracle/structure5.res.oracle @@ -1,82 +1,117 @@ [kernel] Parsing structure5.c (with preprocessing) +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are <none> +[alias] May-alias graph after global variable definition __fc_rand_max is + <empty> +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing function: main [alias] analysing instruction: st_1_t x1 = {.a = 0, .b = 1}; -[alias] May-aliases after instruction st_1_t x1 = {.a = 0, .b = 1}; are <none> +[alias] May-aliases after instruction st_1_t x1 = {.a = 0, .b = 1}; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_1_t x1 = {.a = 0, .b = 1}; is - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: st_1_t x2 = {.a = 1, .b = 2}; -[alias] May-aliases after instruction st_1_t x2 = {.a = 1, .b = 2}; are <none> +[alias] May-aliases after instruction st_1_t x2 = {.a = 1, .b = 2}; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_1_t x2 = {.a = 1, .b = 2}; is - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: st_1_t *y1 = malloc(sizeof(st_1_t)); [alias] May-aliases after instruction st_1_t *y1 = malloc(sizeof(st_1_t)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_1_t *y1 = malloc(sizeof(st_1_t)); - is 0:{ y1 } → 1:{ } + is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ y1 } → 5:{ } [alias] analysing instruction: st_2_t *z = malloc(sizeof(st_2_t)); [alias] May-aliases after instruction st_2_t *z = malloc(sizeof(st_2_t)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_2_t *z = malloc(sizeof(st_2_t)); is - 0:{ y1 } → 1:{ } 2:{ z } → 3:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ y1 } → 5:{ } 6:{ z } → 7:{ } [alias] analysing instruction: st_3_t *t = malloc(sizeof(st_3_t)); [alias] May-aliases after instruction st_3_t *t = malloc(sizeof(st_3_t)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction st_3_t *t = malloc(sizeof(st_3_t)); is - 0:{ y1 } → 1:{ } 2:{ z } → 3:{ } 4:{ t } → 5:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ y1 } → 5:{ } 6:{ z } → 7:{ } 8:{ t } → 9:{ } [alias] analysing instruction: int *a = malloc(sizeof(int)); -[alias] May-aliases after instruction int *a = malloc(sizeof(int)); are <none> +[alias] May-aliases after instruction int *a = malloc(sizeof(int)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction int *a = malloc(sizeof(int)); is - 0:{ y1 } → 1:{ } 2:{ z } → 3:{ } 4:{ t } → 5:{ } - 6:{ a } → 7:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ y1 } → 5:{ } 6:{ z } → 7:{ } 8:{ t } → 9:{ } + 10:{ a } → 11:{ } [alias] analysing instruction: *a = 0; -[alias] May-aliases after instruction *a = 0; are <none> +[alias] May-aliases after instruction *a = 0; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *a = 0; is - 0:{ y1 } → 1:{ } 2:{ z } → 3:{ } 4:{ t } → 5:{ } - 6:{ a } → 7:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ y1 } → 5:{ } 6:{ z } → 7:{ } 8:{ t } → 9:{ } + 10:{ a } → 11:{ } [alias] analysing instruction: y1 = & x1; -[alias] May-aliases after instruction y1 = & x1; are <none> +[alias] May-aliases after instruction y1 = & x1; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction y1 = & x1; is - 0:{ y1 } → 1:{ x1 } 2:{ z } → 3:{ } 4:{ t } → 5:{ } - 6:{ a } → 7:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ y1 } → 5:{ x1 } 6:{ z } → 7:{ } 8:{ t } → 9:{ } + 10:{ a } → 11:{ } [alias] analysing instruction: z->s = (struct struct_1_t *)y1; [alias] May-aliases after instruction z->s = (struct struct_1_t *)y1; are - { z->s; y1 } + { __fc_random48_counter; __fc_p_random48_counter } { z->s; y1 } [alias] May-alias graph after instruction z->s = (struct struct_1_t *)y1; is - 2:{ z } → 3:{ } 3:{ } -s→ 10:{ y1 } 4:{ t } → 5:{ } - 6:{ a } → 7:{ } 10:{ y1 } → 1:{ x1 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 6:{ z } → 7:{ } 7:{ } -s→ 14:{ y1 } 8:{ t } → 9:{ } + 10:{ a } → 11:{ } 14:{ y1 } → 5:{ x1 } [alias] analysing instruction: z->c = a; -[alias] May-aliases after instruction z->c = a; are { z->s; y1 } { z->c; a } +[alias] May-aliases after instruction z->c = a; are + { __fc_random48_counter; __fc_p_random48_counter } { z->s; y1 } { z->c; a } [alias] May-alias graph after instruction z->c = a; is - 2:{ z } → 3:{ } 3:{ } -s→ 10:{ y1 } 3:{ } -c→ 11:{ a } - 4:{ t } → 5:{ } 10:{ y1 } → 1:{ x1 } 11:{ a } → 7:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 6:{ z } → 7:{ } 7:{ } -s→ 14:{ y1 } 7:{ } -c→ 15:{ a } + 8:{ t } → 9:{ } 14:{ y1 } → 5:{ x1 } 15:{ a } → 11:{ } [alias] analysing instruction: t->t = (struct struct_2_t *)z; [alias] May-aliases after instruction t->t = (struct struct_2_t *)z; are - { (t->t)->s; z->s; y1 } { t->t; z } { (t->t)->c; z->c; a } + { __fc_random48_counter; __fc_p_random48_counter } { (t->t)->s; z->s; y1 } + { t->t; z } { (t->t)->c; z->c; a } [alias] May-alias graph after instruction t->t = (struct struct_2_t *)z; is - 3:{ } -s→ 10:{ y1 } 3:{ } -c→ 11:{ a } 4:{ t } → 5:{ } - 5:{ } -t→ 12:{ z } 10:{ y1 } → 1:{ x1 } 11:{ a } → 7:{ } - 12:{ z } → 3:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 7:{ } -s→ 14:{ y1 } 7:{ } -c→ 15:{ a } 8:{ t } → 9:{ } + 9:{ } -t→ 16:{ z } 14:{ y1 } → 5:{ x1 } 15:{ a } → 11:{ } + 16:{ z } → 7:{ } [alias] analysing instruction: t->d = a; [alias] May-aliases after instruction t->d = a; are - { (t->t)->s; z->s; y1 } { t->t; z } { (t->t)->c; z->c; t->d; a } + { __fc_random48_counter; __fc_p_random48_counter } { (t->t)->s; z->s; y1 } + { t->t; z } { (t->t)->c; z->c; t->d; a } [alias] May-alias graph after instruction t->d = a; is - 3:{ } -s→ 10:{ y1 } 3:{ } -c→ 13:{ a } 4:{ t } → 5:{ } - 5:{ } -t→ 12:{ z } 5:{ } -d→ 13:{ a } 10:{ y1 } → 1:{ x1 } - 12:{ z } → 3:{ } 13:{ a } → 7:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 7:{ } -s→ 14:{ y1 } 7:{ } -c→ 17:{ a } 8:{ t } → 9:{ } + 9:{ } -t→ 16:{ z } 9:{ } -d→ 17:{ a } 14:{ y1 } → 5:{ x1 } + 16:{ z } → 7:{ } 17:{ a } → 11:{ } [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are - { (t->t)->s; z->s; y1 } { t->t; z } { (t->t)->c; z->c; t->d; a } + { __fc_random48_counter; __fc_p_random48_counter } { (t->t)->s; z->s; y1 } + { t->t; z } { (t->t)->c; z->c; t->d; a } [alias] May-alias graph after instruction __retres = 0; is - 3:{ } -s→ 10:{ y1 } 3:{ } -c→ 13:{ a } 4:{ t } → 5:{ } - 5:{ } -t→ 12:{ z } 5:{ } -d→ 13:{ a } 10:{ y1 } → 1:{ x1 } - 12:{ z } → 3:{ } 13:{ a } → 7:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 7:{ } -s→ 14:{ y1 } 7:{ } -c→ 17:{ a } 8:{ t } → 9:{ } + 9:{ } -t→ 16:{ z } 9:{ } -d→ 17:{ a } 14:{ y1 } → 5:{ x1 } + 16:{ z } → 7:{ } 17:{ a } → 11:{ } [alias] May-aliases at the end of function main: - { (t->t)->s; z->s; y1 } { t->t; z } { (t->t)->c; z->c; t->d; a } + { __fc_random48_counter; __fc_p_random48_counter } { (t->t)->s; z->s; y1 } + { t->t; z } { (t->t)->c; z->c; t->d; a } [alias] May-alias graph at the end of function main: - 3:{ } -s→ 10:{ y1 } 3:{ } -c→ 13:{ a } 4:{ t } → 5:{ } - 5:{ } -t→ 12:{ z } 5:{ } -d→ 13:{ a } 10:{ y1 } → 1:{ x1 } - 12:{ z } → 3:{ } 13:{ a } → 7:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 7:{ } -s→ 14:{ y1 } 7:{ } -c→ 17:{ a } 8:{ t } → 9:{ } + 9:{ } -t→ 16:{ z } 9:{ } -d→ 17:{ a } 14:{ y1 } → 5:{ x1 } + 16:{ z } → 7:{ } 17:{ a } → 11:{ } [alias] Summary of function main: formals: returns: __retres - state: { (t->t)->s; z->s; y1 } { t->t; z } { (t->t)->c; z->c; t->d; a } + state: { __fc_random48_counter; __fc_p_random48_counter } + { (t->t)->s; z->s; y1 } { t->t; z } { (t->t)->c; z->c; t->d; a } [alias] Analysis complete diff --git a/src/plugins/alias/tests/real_world/oracle/example1.res.oracle b/src/plugins/alias/tests/real_world/oracle/example1.res.oracle index 3adc34389ba645190b0b6bedee1fe44d73c660a3..10e663b8599010f08808c04ab0e7e2b0dd1a866d 100644 --- a/src/plugins/alias/tests/real_world/oracle/example1.res.oracle +++ b/src/plugins/alias/tests/real_world/oracle/example1.res.oracle @@ -1,324 +1,429 @@ [kernel] Parsing example1.c (with preprocessing) +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are <none> +[alias] May-alias graph after global variable definition __fc_rand_max is + <empty> +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing function: f1 [alias] analysing instruction: ty *tmp = x; -[alias] May-aliases after instruction ty *tmp = x; are { x; tmp } +[alias] May-aliases after instruction ty *tmp = x; are + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } [alias] May-alias graph after instruction ty *tmp = x; is - 0:{ x; tmp } → 1:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } [alias] analysing instruction: idata = (double *)malloc((unsigned long)10 * sizeof(double)); [alias] May-aliases after instruction idata = (double *)malloc((unsigned long)10 * sizeof(double)); are - { x; tmp } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } [alias] May-alias graph after instruction idata = (double *)malloc((unsigned long)10 * sizeof(double)); is - 0:{ x; tmp } → 1:{ } 4:{ idata } → 5:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 8:{ idata } → 9:{ } [alias] analysing instruction: idata = tmp->t2[*(tmp->n2)]; [alias] May-aliases after instruction idata = tmp->t2[*(tmp->n2)]; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } [alias] May-alias graph after instruction idata = tmp->t2[*(tmp->n2)]; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 4:{ idata } → 5:{ } - 6:{ } → 4:{ idata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 8:{ idata } → 9:{ } + 10:{ } → 8:{ idata } [alias] analysing instruction: odata = tmp->t1[*(tmp->n1)]; [alias] May-aliases after instruction odata = tmp->t1[*(tmp->n1)]; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction odata = tmp->t1[*(tmp->n1)]; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: idx = 0; [alias] May-aliases after instruction idx = 0; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction idx = 0; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: tmp_1 = sin(*(idata + idx)); [alias:undefined:fn] example1.c:45: Warning: function sin has no definition [alias] May-aliases after instruction tmp_1 = sin(*(idata + idx)); are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction tmp_1 = sin(*(idata + idx)); is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: *(odata + idx) = 0.5 * tmp_1; [alias] May-aliases after instruction *(odata + idx) = 0.5 * tmp_1; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction *(odata + idx) = 0.5 * tmp_1; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: idx ++; [alias] May-aliases after instruction idx ++; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction idx ++; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: swap(tmp->n1); [alias] analysing function: swap [alias] analysing instruction: *n = 0; -[alias] May-aliases after instruction *n = 0; are <none> -[alias] May-alias graph after instruction *n = 0; is <empty> +[alias] May-aliases after instruction *n = 0; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction *n = 0; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: (*n) ++; -[alias] May-aliases after instruction (*n) ++; are <none> -[alias] May-alias graph after instruction (*n) ++; is <empty> -[alias] May-aliases at the end of function swap: <none> +[alias] May-aliases after instruction (*n) ++; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction (*n) ++; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } +[alias] May-aliases at the end of function swap: + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph at the end of function swap: - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] Summary of function swap: + formals: n returns: <none> + state: { __fc_random48_counter; __fc_p_random48_counter } [alias] May-aliases after instruction swap(tmp->n1); are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction swap(tmp->n1); is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: idata = tmp->t2[*(tmp->n2)]; [alias] May-aliases after instruction idata = tmp->t2[*(tmp->n2)]; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction idata = tmp->t2[*(tmp->n2)]; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: odata = tmp->t1[*(tmp->n1)]; [alias] May-aliases after instruction odata = tmp->t1[*(tmp->n1)]; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction odata = tmp->t1[*(tmp->n1)]; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias:no-return] example1.c:29: Warning: function f1 does not return; analysis may be unsound -[alias] May-aliases at the end of function f1: <none> +[alias] May-aliases at the end of function f1: + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph at the end of function f1: - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] Summary of function f1: - formals: x returns: __retres state: <none> + formals: x returns: __retres + state: { __fc_random48_counter; __fc_p_random48_counter } [alias] analysing function: f2 [alias] analysing instruction: ty *tmp = x; -[alias] May-aliases after instruction ty *tmp = x; are { x; tmp } +[alias] May-aliases after instruction ty *tmp = x; are + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } [alias] May-alias graph after instruction ty *tmp = x; is - 14:{ x; tmp } → 15:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } [alias] analysing instruction: idata = (double *)malloc((unsigned long)10 * sizeof(double)); [alias] May-aliases after instruction idata = (double *)malloc((unsigned long)10 * sizeof(double)); are - { x; tmp } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } [alias] May-alias graph after instruction idata = (double *)malloc((unsigned long)10 * sizeof(double)); is - 14:{ x; tmp } → 15:{ } 18:{ idata } → 19:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 24:{ idata } → 25:{ } [alias] analysing instruction: idata = tmp->t1[*(tmp->n1)]; [alias] May-aliases after instruction idata = tmp->t1[*(tmp->n1)]; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } [alias] May-alias graph after instruction idata = tmp->t1[*(tmp->n1)]; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } [alias] analysing instruction: odata = tmp->t2[*(tmp->n2)]; [alias] May-aliases after instruction odata = tmp->t2[*(tmp->n2)]; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction odata = tmp->t2[*(tmp->n2)]; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: idx = 0; [alias] May-aliases after instruction idx = 0; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction idx = 0; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: *(odata + idx) = (double)3 * *(idata + idx) + (double)1; [alias] May-aliases after instruction *(odata + idx) = (double)3 * *(idata + idx) + (double)1; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction *(odata + idx) = (double)3 * *(idata + idx) + (double)1; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: idx ++; [alias] May-aliases after instruction idx ++; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction idx ++; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: swap(tmp->n2); [alias] May-aliases after instruction swap(tmp->n2); are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction swap(tmp->n2); is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: idata = tmp->t1[*(tmp->n1)]; [alias] May-aliases after instruction idata = tmp->t1[*(tmp->n1)]; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction idata = tmp->t1[*(tmp->n1)]; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: odata = tmp->t2[*(tmp->n2)]; [alias] May-aliases after instruction odata = tmp->t2[*(tmp->n2)]; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction odata = tmp->t2[*(tmp->n2)]; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias:no-return] example1.c:53: Warning: function f2 does not return; analysis may be unsound -[alias] May-aliases at the end of function f2: <none> +[alias] May-aliases at the end of function f2: + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph at the end of function f2: - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] Summary of function f2: - formals: x returns: __retres state: <none> + formals: x returns: __retres + state: { __fc_random48_counter; __fc_p_random48_counter } [alias] analysing function: main [alias] analysing instruction: a = (ty *)malloc(sizeof(ty)); -[alias] May-aliases after instruction a = (ty *)malloc(sizeof(ty)); are <none> +[alias] May-aliases after instruction a = (ty *)malloc(sizeof(ty)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a = (ty *)malloc(sizeof(ty)); is - 28:{ a } → 29:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } [alias] analysing instruction: b = (ty *)malloc(sizeof(ty)); -[alias] May-aliases after instruction b = (ty *)malloc(sizeof(ty)); are <none> +[alias] May-aliases after instruction b = (ty *)malloc(sizeof(ty)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction b = (ty *)malloc(sizeof(ty)); is - 28:{ a } → 29:{ } 30:{ b } → 31:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 38:{ b } → 39:{ } [alias] analysing instruction: i = 0; -[alias] May-aliases after instruction i = 0; are <none> +[alias] May-aliases after instruction i = 0; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction i = 0; is - 28:{ a } → 29:{ } 30:{ b } → 31:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 38:{ b } → 39:{ } [alias] analysing instruction: a->t1[i] = (double *)malloc((unsigned long)10 * sizeof(double)); [alias] May-aliases after instruction - a->t1[i] = (double *)malloc((unsigned long)10 * sizeof(double)); are - <none> + a->t1[i] = (double *)malloc((unsigned long)10 * sizeof(double)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a->t1[i] = (double *)malloc((unsigned long)10 * sizeof(double)); is - 28:{ a } → 29:{ } 29:{ } -t1→ 32:{ } 30:{ b } → 31:{ } - 32:{ } → 33:{ } 33:{ } → 34:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -t1→ 40:{ } 38:{ b } → 39:{ } + 40:{ } → 41:{ } 41:{ } → 42:{ } [alias] analysing instruction: a->t2[i] = (double *)malloc((unsigned long)10 * sizeof(double)); [alias] May-aliases after instruction - a->t2[i] = (double *)malloc((unsigned long)10 * sizeof(double)); are - <none> + a->t2[i] = (double *)malloc((unsigned long)10 * sizeof(double)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a->t2[i] = (double *)malloc((unsigned long)10 * sizeof(double)); is - 28:{ a } → 29:{ } 29:{ } -t1→ 32:{ } 29:{ } -t2→ 35:{ } - 30:{ b } → 31:{ } 32:{ } → 33:{ } 33:{ } → 34:{ } - 35:{ } → 36:{ } 36:{ } → 37:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -t1→ 40:{ } 37:{ } -t2→ 43:{ } + 38:{ b } → 39:{ } 40:{ } → 41:{ } 41:{ } → 42:{ } + 43:{ } → 44:{ } 44:{ } → 45:{ } [alias] analysing instruction: i ++; -[alias] May-aliases after instruction i ++; are <none> +[alias] May-aliases after instruction i ++; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction i ++; is - 28:{ a } → 29:{ } 29:{ } -t1→ 32:{ } 29:{ } -t2→ 35:{ } - 30:{ b } → 31:{ } 32:{ } → 33:{ } 33:{ } → 34:{ } - 35:{ } → 36:{ } 36:{ } → 37:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -t1→ 40:{ } 37:{ } -t2→ 43:{ } + 38:{ b } → 39:{ } 40:{ } → 41:{ } 41:{ } → 42:{ } + 43:{ } → 44:{ } 44:{ } → 45:{ } [alias] analysing instruction: a->n1 = (int *)malloc(sizeof(int)); [alias] May-aliases after instruction a->n1 = (int *)malloc(sizeof(int)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a->n1 = (int *)malloc(sizeof(int)); is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 30:{ b } → 31:{ } - 38:{ } → 39:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 38:{ b } → 39:{ } + 46:{ } → 47:{ } [alias] analysing instruction: a->n2 = (int *)malloc(sizeof(int)); [alias] May-aliases after instruction a->n2 = (int *)malloc(sizeof(int)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a->n2 = (int *)malloc(sizeof(int)); is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 30:{ b } → 31:{ } 38:{ } → 39:{ } 40:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 38:{ b } → 39:{ } 46:{ } → 47:{ } 48:{ } → 49:{ } [alias] analysing instruction: *(a->n1) = 1; -[alias] May-aliases after instruction *(a->n1) = 1; are <none> +[alias] May-aliases after instruction *(a->n1) = 1; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *(a->n1) = 1; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 30:{ b } → 31:{ } 38:{ } → 39:{ } 40:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 38:{ b } → 39:{ } 46:{ } → 47:{ } 48:{ } → 49:{ } [alias] analysing instruction: *(a->n2) = 1; -[alias] May-aliases after instruction *(a->n2) = 1; are <none> +[alias] May-aliases after instruction *(a->n2) = 1; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *(a->n2) = 1; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 30:{ b } → 31:{ } 38:{ } → 39:{ } 40:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 38:{ b } → 39:{ } 46:{ } → 47:{ } 48:{ } → 49:{ } [alias] analysing instruction: i = 0; -[alias] May-aliases after instruction i = 0; are <none> +[alias] May-aliases after instruction i = 0; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction i = 0; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 30:{ b } → 31:{ } 38:{ } → 39:{ } 40:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 38:{ b } → 39:{ } 46:{ } → 47:{ } 48:{ } → 49:{ } [alias] analysing instruction: b->t1[i] = a->t1[i]; -[alias] May-aliases after instruction b->t1[i] = a->t1[i]; are { a->t1; b->t1 } +[alias] May-aliases after instruction b->t1[i] = a->t1[i]; are + { __fc_random48_counter; __fc_p_random48_counter } { a->t1; b->t1 } [alias] May-alias graph after instruction b->t1[i] = a->t1[i]; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 29:{ } -t1→ 44:{ } 30:{ b } → 31:{ } 31:{ } -t1→ 42:{ } - 38:{ } → 39:{ } 40:{ } → 41:{ } 42:{ } → 43:{ } - 44:{ } → 43:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 37:{ } -t1→ 52:{ } 38:{ b } → 39:{ } 39:{ } -t1→ 50:{ } + 46:{ } → 47:{ } 48:{ } → 49:{ } 50:{ } → 51:{ } + 52:{ } → 51:{ } [alias] analysing instruction: b->t2[i] = a->t2[i]; [alias] May-aliases after instruction b->t2[i] = a->t2[i]; are - { a->t1; b->t1 } { a->t2; b->t2 } + { __fc_random48_counter; __fc_p_random48_counter } { a->t1; b->t1 } + { a->t2; b->t2 } [alias] May-alias graph after instruction b->t2[i] = a->t2[i]; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 29:{ } -t1→ 44:{ } 29:{ } -t2→ 48:{ } 30:{ b } → 31:{ } - 31:{ } -t1→ 42:{ } 31:{ } -t2→ 46:{ } 38:{ } → 39:{ } - 40:{ } → 41:{ } 42:{ } → 43:{ } 44:{ } → 43:{ } - 46:{ } → 47:{ } 48:{ } → 47:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 37:{ } -t1→ 52:{ } 37:{ } -t2→ 56:{ } 38:{ b } → 39:{ } + 39:{ } -t1→ 50:{ } 39:{ } -t2→ 54:{ } 46:{ } → 47:{ } + 48:{ } → 49:{ } 50:{ } → 51:{ } 52:{ } → 51:{ } + 54:{ } → 55:{ } 56:{ } → 55:{ } [alias] analysing instruction: i ++; -[alias] May-aliases after instruction i ++; are { a->t1; b->t1 } { a->t2; b->t2 } +[alias] May-aliases after instruction i ++; are + { __fc_random48_counter; __fc_p_random48_counter } { a->t1; b->t1 } + { a->t2; b->t2 } [alias] May-alias graph after instruction i ++; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 29:{ } -t1→ 44:{ } 29:{ } -t2→ 48:{ } 30:{ b } → 31:{ } - 31:{ } -t1→ 42:{ } 31:{ } -t2→ 46:{ } 38:{ } → 39:{ } - 40:{ } → 41:{ } 42:{ } → 43:{ } 44:{ } → 43:{ } - 46:{ } → 47:{ } 48:{ } → 47:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 37:{ } -t1→ 52:{ } 37:{ } -t2→ 56:{ } 38:{ b } → 39:{ } + 39:{ } -t1→ 50:{ } 39:{ } -t2→ 54:{ } 46:{ } → 47:{ } + 48:{ } → 49:{ } 50:{ } → 51:{ } 52:{ } → 51:{ } + 54:{ } → 55:{ } 56:{ } → 55:{ } [alias] analysing instruction: b->n1 = a->n1; -[alias] May-aliases after instruction b->n1 = a->n1; are { a->n1; b->n1 } +[alias] May-aliases after instruction b->n1 = a->n1; are + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } [alias] May-alias graph after instruction b->n1 = a->n1; is - 28:{ a } → 29:{ } 29:{ } -n2→ 40:{ } 29:{ } -n1→ 50:{ } - 30:{ b } → 31:{ } 31:{ } -n1→ 50:{ } 40:{ } → 41:{ } - 50:{ } → 39:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n2→ 48:{ } 37:{ } -n1→ 58:{ } + 38:{ b } → 39:{ } 39:{ } -n1→ 58:{ } 48:{ } → 49:{ } + 58:{ } → 47:{ } [alias] analysing instruction: b->n2 = a->n2; [alias] May-aliases after instruction b->n2 = a->n2; are - { a->n1; b->n1 } { a->n2; b->n2 } + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] May-alias graph after instruction b->n2 = a->n2; is - 28:{ a } → 29:{ } 29:{ } -n1→ 50:{ } 29:{ } -n2→ 51:{ } - 30:{ b } → 31:{ } 31:{ } -n1→ 50:{ } 31:{ } -n2→ 51:{ } - 50:{ } → 39:{ } 51:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 58:{ } 37:{ } -n2→ 59:{ } + 38:{ b } → 39:{ } 39:{ } -n1→ 58:{ } 39:{ } -n2→ 59:{ } + 58:{ } → 47:{ } 59:{ } → 49:{ } [alias] analysing instruction: f1(a); [alias] May-aliases after instruction f1(a); are - { a->n1; b->n1 } { a->n2; b->n2 } + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] May-alias graph after instruction f1(a); is - 28:{ a } → 29:{ } 29:{ } -n1→ 50:{ } 29:{ } -n2→ 51:{ } - 30:{ b } → 31:{ } 31:{ } -n1→ 50:{ } 31:{ } -n2→ 51:{ } - 50:{ } → 39:{ } 51:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 58:{ } 37:{ } -n2→ 59:{ } + 38:{ b } → 39:{ } 39:{ } -n1→ 58:{ } 39:{ } -n2→ 59:{ } + 58:{ } → 47:{ } 59:{ } → 49:{ } [alias] analysing instruction: f2(b); [alias] May-aliases after instruction f2(b); are - { a->n1; b->n1 } { a->n2; b->n2 } + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] May-alias graph after instruction f2(b); is - 28:{ a } → 29:{ } 29:{ } -n1→ 50:{ } 29:{ } -n2→ 51:{ } - 30:{ b } → 31:{ } 31:{ } -n1→ 50:{ } 31:{ } -n2→ 51:{ } - 50:{ } → 39:{ } 51:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 58:{ } 37:{ } -n2→ 59:{ } + 38:{ b } → 39:{ } 39:{ } -n1→ 58:{ } 39:{ } -n2→ 59:{ } + 58:{ } → 47:{ } 59:{ } → 49:{ } [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are - { a->n1; b->n1 } { a->n2; b->n2 } + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] May-alias graph after instruction __retres = 0; is - 28:{ a } → 29:{ } 29:{ } -n1→ 50:{ } 29:{ } -n2→ 51:{ } - 30:{ b } → 31:{ } 31:{ } -n1→ 50:{ } 31:{ } -n2→ 51:{ } - 50:{ } → 39:{ } 51:{ } → 41:{ } -[alias] May-aliases at the end of function main: { a->n1; b->n1 } { a->n2; b->n2 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 58:{ } 37:{ } -n2→ 59:{ } + 38:{ b } → 39:{ } 39:{ } -n1→ 58:{ } 39:{ } -n2→ 59:{ } + 58:{ } → 47:{ } 59:{ } → 49:{ } +[alias] May-aliases at the end of function main: + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] May-alias graph at the end of function main: - 28:{ a } → 29:{ } 29:{ } -n1→ 50:{ } 29:{ } -n2→ 51:{ } - 30:{ b } → 31:{ } 31:{ } -n1→ 50:{ } 31:{ } -n2→ 51:{ } - 50:{ } → 39:{ } 51:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 58:{ } 37:{ } -n2→ 59:{ } + 38:{ b } → 39:{ } 39:{ } -n1→ 58:{ } 39:{ } -n2→ 59:{ } + 58:{ } → 47:{ } 59:{ } → 49:{ } [alias] Summary of function main: - formals: returns: __retres state: { a->n1; b->n1 } { a->n2; b->n2 } + formals: returns: __retres + state: { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] analysing function: swap -[alias] May-aliases at the end of function swap: <none> +[alias] May-aliases at the end of function swap: + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph at the end of function swap: - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] Summary of function swap: + formals: n returns: <none> + state: { __fc_random48_counter; __fc_p_random48_counter } [alias] Analysis complete diff --git a/src/plugins/alias/tests/real_world/oracle/example2.res.oracle b/src/plugins/alias/tests/real_world/oracle/example2.res.oracle index 0ef06bd90acc8ce5bb80ae121d8bc442f832ab25..d2942f743e71e505d5e7e79f9e3d889433286c87 100644 --- a/src/plugins/alias/tests/real_world/oracle/example2.res.oracle +++ b/src/plugins/alias/tests/real_world/oracle/example2.res.oracle @@ -1,386 +1,505 @@ [kernel] Parsing example2.c (with preprocessing) +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are <none> +[alias] May-alias graph after global variable definition __fc_rand_max is + <empty> +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing function: f1 [alias] analysing instruction: ty *tmp = x; -[alias] May-aliases after instruction ty *tmp = x; are { x; tmp } +[alias] May-aliases after instruction ty *tmp = x; are + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } [alias] May-alias graph after instruction ty *tmp = x; is - 0:{ x; tmp } → 1:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } [alias] analysing instruction: idata = (double *)malloc((unsigned long)10 * sizeof(double)); [alias] May-aliases after instruction idata = (double *)malloc((unsigned long)10 * sizeof(double)); are - { x; tmp } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } [alias] May-alias graph after instruction idata = (double *)malloc((unsigned long)10 * sizeof(double)); is - 0:{ x; tmp } → 1:{ } 4:{ idata } → 5:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 8:{ idata } → 9:{ } [alias] analysing instruction: int i = 0; -[alias] May-aliases after instruction int i = 0; are { x; tmp } +[alias] May-aliases after instruction int i = 0; are + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } [alias] May-alias graph after instruction int i = 0; is - 0:{ x; tmp } → 1:{ } 4:{ idata } → 5:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 8:{ idata } → 9:{ } [alias] analysing instruction: idata = tmp->t2[*(tmp->n2)]; [alias] May-aliases after instruction idata = tmp->t2[*(tmp->n2)]; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } [alias] May-alias graph after instruction idata = tmp->t2[*(tmp->n2)]; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 4:{ idata } → 5:{ } - 6:{ } → 4:{ idata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 8:{ idata } → 9:{ } + 10:{ } → 8:{ idata } [alias] analysing instruction: odata = tmp->t1[*(tmp->n1)]; [alias] May-aliases after instruction odata = tmp->t1[*(tmp->n1)]; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction odata = tmp->t1[*(tmp->n1)]; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: idx = 0; [alias] May-aliases after instruction idx = 0; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction idx = 0; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: tmp_1 = sin(*(idata + idx)); [alias:undefined:fn] example2.c:45: Warning: function sin has no definition [alias] May-aliases after instruction tmp_1 = sin(*(idata + idx)); are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction tmp_1 = sin(*(idata + idx)); is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: *(odata + idx) = 0.5 * tmp_1; [alias] May-aliases after instruction *(odata + idx) = 0.5 * tmp_1; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction *(odata + idx) = 0.5 * tmp_1; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: idx ++; [alias] May-aliases after instruction idx ++; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction idx ++; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: swap(tmp->n1); [alias] analysing function: swap [alias] analysing instruction: *n = 0; -[alias] May-aliases after instruction *n = 0; are <none> -[alias] May-alias graph after instruction *n = 0; is <empty> +[alias] May-aliases after instruction *n = 0; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction *n = 0; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing instruction: (*n) ++; -[alias] May-aliases after instruction (*n) ++; are <none> -[alias] May-alias graph after instruction (*n) ++; is <empty> -[alias] May-aliases at the end of function swap: <none> +[alias] May-aliases after instruction (*n) ++; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction (*n) ++; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } +[alias] May-aliases at the end of function swap: + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph at the end of function swap: - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] Summary of function swap: + formals: n returns: <none> + state: { __fc_random48_counter; __fc_p_random48_counter } [alias] May-aliases after instruction swap(tmp->n1); are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction swap(tmp->n1); is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: i ++; [alias] May-aliases after instruction i ++; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction i ++; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: idata = tmp->t2[*(tmp->n2)]; [alias] May-aliases after instruction idata = tmp->t2[*(tmp->n2)]; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction idata = tmp->t2[*(tmp->n2)]; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: odata = tmp->t1[*(tmp->n1)]; [alias] May-aliases after instruction odata = tmp->t1[*(tmp->n1)]; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction odata = tmp->t1[*(tmp->n1)]; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] analysing instruction: __retres = (void *)0; [alias] May-aliases after instruction __retres = (void *)0; are - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph after instruction __retres = (void *)0; is - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] May-aliases at the end of function f1: - { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } - { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } + { x->t1[0..]; tmp->t1[0..]; odata } [alias] May-alias graph at the end of function f1: - 0:{ x; tmp } → 1:{ } 1:{ } -t2→ 6:{ } 1:{ } -t1→ 10:{ } - 4:{ idata } → 5:{ } 6:{ } → 4:{ idata } 8:{ odata } → 9:{ } - 10:{ } → 8:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x; tmp } → 5:{ } 5:{ } -t2→ 10:{ } 5:{ } -t1→ 14:{ } + 8:{ idata } → 9:{ } 10:{ } → 8:{ idata } 12:{ odata } → 13:{ } + 14:{ } → 12:{ odata } [alias] Summary of function f1: formals: x returns: __retres - state: { x; tmp } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } + state: { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; idata } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; odata } [alias] analysing function: f2 [alias] analysing instruction: ty *tmp = x; -[alias] May-aliases after instruction ty *tmp = x; are { x; tmp } +[alias] May-aliases after instruction ty *tmp = x; are + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } [alias] May-alias graph after instruction ty *tmp = x; is - 14:{ x; tmp } → 15:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } [alias] analysing instruction: idata = (double *)malloc((unsigned long)10 * sizeof(double)); [alias] May-aliases after instruction idata = (double *)malloc((unsigned long)10 * sizeof(double)); are - { x; tmp } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } [alias] May-alias graph after instruction idata = (double *)malloc((unsigned long)10 * sizeof(double)); is - 14:{ x; tmp } → 15:{ } 18:{ idata } → 19:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 24:{ idata } → 25:{ } [alias] analysing instruction: int i = 0; -[alias] May-aliases after instruction int i = 0; are { x; tmp } +[alias] May-aliases after instruction int i = 0; are + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } [alias] May-alias graph after instruction int i = 0; is - 14:{ x; tmp } → 15:{ } 18:{ idata } → 19:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 24:{ idata } → 25:{ } [alias] analysing instruction: idata = tmp->t1[*(tmp->n1)]; [alias] May-aliases after instruction idata = tmp->t1[*(tmp->n1)]; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } [alias] May-alias graph after instruction idata = tmp->t1[*(tmp->n1)]; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } [alias] analysing instruction: odata = tmp->t2[*(tmp->n2)]; [alias] May-aliases after instruction odata = tmp->t2[*(tmp->n2)]; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction odata = tmp->t2[*(tmp->n2)]; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: idx = 0; [alias] May-aliases after instruction idx = 0; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction idx = 0; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: *(odata + idx) = (double)3 * *(idata + idx) + (double)1; [alias] May-aliases after instruction *(odata + idx) = (double)3 * *(idata + idx) + (double)1; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction *(odata + idx) = (double)3 * *(idata + idx) + (double)1; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: idx ++; [alias] May-aliases after instruction idx ++; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction idx ++; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: swap(tmp->n2); [alias] May-aliases after instruction swap(tmp->n2); are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction swap(tmp->n2); is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: i ++; [alias] May-aliases after instruction i ++; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction i ++; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: idata = tmp->t1[*(tmp->n1)]; [alias] May-aliases after instruction idata = tmp->t1[*(tmp->n1)]; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction idata = tmp->t1[*(tmp->n1)]; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: odata = tmp->t2[*(tmp->n2)]; [alias] May-aliases after instruction odata = tmp->t2[*(tmp->n2)]; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction odata = tmp->t2[*(tmp->n2)]; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] analysing instruction: __retres = (void *)0; [alias] May-aliases after instruction __retres = (void *)0; are - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph after instruction __retres = (void *)0; is - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] May-aliases at the end of function f2: - { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } - { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } + { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } + { x->t2[0..]; tmp->t2[0..]; odata } [alias] May-alias graph at the end of function f2: - 14:{ x; tmp } → 15:{ } 15:{ } -t1→ 20:{ } 15:{ } -t2→ 24:{ } - 18:{ idata } → 19:{ } 20:{ } → 18:{ idata } - 22:{ odata } → 23:{ } 24:{ } → 22:{ odata } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 20:{ x; tmp } → 21:{ } 21:{ } -t1→ 26:{ } 21:{ } -t2→ 30:{ } + 24:{ idata } → 25:{ } 26:{ } → 24:{ idata } + 28:{ odata } → 29:{ } 30:{ } → 28:{ odata } [alias] Summary of function f2: formals: x returns: __retres - state: { x; tmp } { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } + state: { __fc_random48_counter; __fc_p_random48_counter } { x; tmp } + { x->t1; tmp->t1 } { x->t1[0..]; tmp->t1[0..]; idata } { x->t2; tmp->t2 } { x->t2[0..]; tmp->t2[0..]; odata } [alias] analysing function: main [alias] analysing instruction: a = (ty *)malloc(sizeof(ty)); -[alias] May-aliases after instruction a = (ty *)malloc(sizeof(ty)); are <none> +[alias] May-aliases after instruction a = (ty *)malloc(sizeof(ty)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a = (ty *)malloc(sizeof(ty)); is - 28:{ a } → 29:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } [alias] analysing instruction: b = (ty *)malloc(sizeof(ty)); -[alias] May-aliases after instruction b = (ty *)malloc(sizeof(ty)); are <none> +[alias] May-aliases after instruction b = (ty *)malloc(sizeof(ty)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction b = (ty *)malloc(sizeof(ty)); is - 28:{ a } → 29:{ } 30:{ b } → 31:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 38:{ b } → 39:{ } [alias] analysing instruction: i = 0; -[alias] May-aliases after instruction i = 0; are <none> +[alias] May-aliases after instruction i = 0; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction i = 0; is - 28:{ a } → 29:{ } 30:{ b } → 31:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 38:{ b } → 39:{ } [alias] analysing instruction: a->t1[i] = (double *)malloc((unsigned long)10 * sizeof(double)); [alias] May-aliases after instruction - a->t1[i] = (double *)malloc((unsigned long)10 * sizeof(double)); are - <none> + a->t1[i] = (double *)malloc((unsigned long)10 * sizeof(double)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a->t1[i] = (double *)malloc((unsigned long)10 * sizeof(double)); is - 28:{ a } → 29:{ } 29:{ } -t1→ 32:{ } 30:{ b } → 31:{ } - 32:{ } → 33:{ } 33:{ } → 34:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -t1→ 40:{ } 38:{ b } → 39:{ } + 40:{ } → 41:{ } 41:{ } → 42:{ } [alias] analysing instruction: a->t2[i] = (double *)malloc((unsigned long)10 * sizeof(double)); [alias] May-aliases after instruction - a->t2[i] = (double *)malloc((unsigned long)10 * sizeof(double)); are - <none> + a->t2[i] = (double *)malloc((unsigned long)10 * sizeof(double)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a->t2[i] = (double *)malloc((unsigned long)10 * sizeof(double)); is - 28:{ a } → 29:{ } 29:{ } -t1→ 32:{ } 29:{ } -t2→ 35:{ } - 30:{ b } → 31:{ } 32:{ } → 33:{ } 33:{ } → 34:{ } - 35:{ } → 36:{ } 36:{ } → 37:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -t1→ 40:{ } 37:{ } -t2→ 43:{ } + 38:{ b } → 39:{ } 40:{ } → 41:{ } 41:{ } → 42:{ } + 43:{ } → 44:{ } 44:{ } → 45:{ } [alias] analysing instruction: i ++; -[alias] May-aliases after instruction i ++; are <none> +[alias] May-aliases after instruction i ++; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction i ++; is - 28:{ a } → 29:{ } 29:{ } -t1→ 32:{ } 29:{ } -t2→ 35:{ } - 30:{ b } → 31:{ } 32:{ } → 33:{ } 33:{ } → 34:{ } - 35:{ } → 36:{ } 36:{ } → 37:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -t1→ 40:{ } 37:{ } -t2→ 43:{ } + 38:{ b } → 39:{ } 40:{ } → 41:{ } 41:{ } → 42:{ } + 43:{ } → 44:{ } 44:{ } → 45:{ } [alias] analysing instruction: a->n1 = (int *)malloc(sizeof(int)); [alias] May-aliases after instruction a->n1 = (int *)malloc(sizeof(int)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a->n1 = (int *)malloc(sizeof(int)); is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 30:{ b } → 31:{ } - 38:{ } → 39:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 38:{ b } → 39:{ } + 46:{ } → 47:{ } [alias] analysing instruction: a->n2 = (int *)malloc(sizeof(int)); [alias] May-aliases after instruction a->n2 = (int *)malloc(sizeof(int)); are - <none> + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction a->n2 = (int *)malloc(sizeof(int)); is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 30:{ b } → 31:{ } 38:{ } → 39:{ } 40:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 38:{ b } → 39:{ } 46:{ } → 47:{ } 48:{ } → 49:{ } [alias] analysing instruction: *(a->n1) = 1; -[alias] May-aliases after instruction *(a->n1) = 1; are <none> +[alias] May-aliases after instruction *(a->n1) = 1; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *(a->n1) = 1; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 30:{ b } → 31:{ } 38:{ } → 39:{ } 40:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 38:{ b } → 39:{ } 46:{ } → 47:{ } 48:{ } → 49:{ } [alias] analysing instruction: *(a->n2) = 1; -[alias] May-aliases after instruction *(a->n2) = 1; are <none> +[alias] May-aliases after instruction *(a->n2) = 1; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *(a->n2) = 1; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 30:{ b } → 31:{ } 38:{ } → 39:{ } 40:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 38:{ b } → 39:{ } 46:{ } → 47:{ } 48:{ } → 49:{ } [alias] analysing instruction: i = 0; -[alias] May-aliases after instruction i = 0; are <none> +[alias] May-aliases after instruction i = 0; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction i = 0; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 30:{ b } → 31:{ } 38:{ } → 39:{ } 40:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 38:{ b } → 39:{ } 46:{ } → 47:{ } 48:{ } → 49:{ } [alias] analysing instruction: b->t1[i] = a->t1[i]; -[alias] May-aliases after instruction b->t1[i] = a->t1[i]; are { a->t1; b->t1 } +[alias] May-aliases after instruction b->t1[i] = a->t1[i]; are + { __fc_random48_counter; __fc_p_random48_counter } { a->t1; b->t1 } [alias] May-alias graph after instruction b->t1[i] = a->t1[i]; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 29:{ } -t1→ 44:{ } 30:{ b } → 31:{ } 31:{ } -t1→ 42:{ } - 38:{ } → 39:{ } 40:{ } → 41:{ } 42:{ } → 43:{ } - 44:{ } → 43:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 37:{ } -t1→ 52:{ } 38:{ b } → 39:{ } 39:{ } -t1→ 50:{ } + 46:{ } → 47:{ } 48:{ } → 49:{ } 50:{ } → 51:{ } + 52:{ } → 51:{ } [alias] analysing instruction: b->t2[i] = a->t2[i]; [alias] May-aliases after instruction b->t2[i] = a->t2[i]; are - { a->t1; b->t1 } { a->t2; b->t2 } + { __fc_random48_counter; __fc_p_random48_counter } { a->t1; b->t1 } + { a->t2; b->t2 } [alias] May-alias graph after instruction b->t2[i] = a->t2[i]; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 29:{ } -t1→ 44:{ } 29:{ } -t2→ 48:{ } 30:{ b } → 31:{ } - 31:{ } -t1→ 42:{ } 31:{ } -t2→ 46:{ } 38:{ } → 39:{ } - 40:{ } → 41:{ } 42:{ } → 43:{ } 44:{ } → 43:{ } - 46:{ } → 47:{ } 48:{ } → 47:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 37:{ } -t1→ 52:{ } 37:{ } -t2→ 56:{ } 38:{ b } → 39:{ } + 39:{ } -t1→ 50:{ } 39:{ } -t2→ 54:{ } 46:{ } → 47:{ } + 48:{ } → 49:{ } 50:{ } → 51:{ } 52:{ } → 51:{ } + 54:{ } → 55:{ } 56:{ } → 55:{ } [alias] analysing instruction: i ++; -[alias] May-aliases after instruction i ++; are { a->t1; b->t1 } { a->t2; b->t2 } +[alias] May-aliases after instruction i ++; are + { __fc_random48_counter; __fc_p_random48_counter } { a->t1; b->t1 } + { a->t2; b->t2 } [alias] May-alias graph after instruction i ++; is - 28:{ a } → 29:{ } 29:{ } -n1→ 38:{ } 29:{ } -n2→ 40:{ } - 29:{ } -t1→ 44:{ } 29:{ } -t2→ 48:{ } 30:{ b } → 31:{ } - 31:{ } -t1→ 42:{ } 31:{ } -t2→ 46:{ } 38:{ } → 39:{ } - 40:{ } → 41:{ } 42:{ } → 43:{ } 44:{ } → 43:{ } - 46:{ } → 47:{ } 48:{ } → 47:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 46:{ } 37:{ } -n2→ 48:{ } + 37:{ } -t1→ 52:{ } 37:{ } -t2→ 56:{ } 38:{ b } → 39:{ } + 39:{ } -t1→ 50:{ } 39:{ } -t2→ 54:{ } 46:{ } → 47:{ } + 48:{ } → 49:{ } 50:{ } → 51:{ } 52:{ } → 51:{ } + 54:{ } → 55:{ } 56:{ } → 55:{ } [alias] analysing instruction: b->n1 = a->n1; -[alias] May-aliases after instruction b->n1 = a->n1; are { a->n1; b->n1 } +[alias] May-aliases after instruction b->n1 = a->n1; are + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } [alias] May-alias graph after instruction b->n1 = a->n1; is - 28:{ a } → 29:{ } 29:{ } -n2→ 40:{ } 29:{ } -n1→ 50:{ } - 30:{ b } → 31:{ } 31:{ } -n1→ 50:{ } 40:{ } → 41:{ } - 50:{ } → 39:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n2→ 48:{ } 37:{ } -n1→ 58:{ } + 38:{ b } → 39:{ } 39:{ } -n1→ 58:{ } 48:{ } → 49:{ } + 58:{ } → 47:{ } [alias] analysing instruction: b->n2 = a->n2; [alias] May-aliases after instruction b->n2 = a->n2; are - { a->n1; b->n1 } { a->n2; b->n2 } + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] May-alias graph after instruction b->n2 = a->n2; is - 28:{ a } → 29:{ } 29:{ } -n1→ 50:{ } 29:{ } -n2→ 51:{ } - 30:{ b } → 31:{ } 31:{ } -n1→ 50:{ } 31:{ } -n2→ 51:{ } - 50:{ } → 39:{ } 51:{ } → 41:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 58:{ } 37:{ } -n2→ 59:{ } + 38:{ b } → 39:{ } 39:{ } -n1→ 58:{ } 39:{ } -n2→ 59:{ } + 58:{ } → 47:{ } 59:{ } → 49:{ } [alias] analysing instruction: f1(a); [alias] May-aliases after instruction f1(a); are - { a->n1; b->n1 } { a->n2; b->n2 } + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] May-alias graph after instruction f1(a); is - 28:{ a } → 29:{ } 29:{ } -n1→ 50:{ } 29:{ } -n2→ 51:{ } - 29:{ } -t2→ 58:{ } 29:{ } -t1→ 62:{ } 30:{ b } → 31:{ } - 31:{ } -n1→ 50:{ } 31:{ } -n2→ 51:{ } 50:{ } → 39:{ } - 51:{ } → 41:{ } 56:{ } → 57:{ } 58:{ } → 56:{ } - 60:{ } → 61:{ } 62:{ } → 60:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 58:{ } 37:{ } -n2→ 59:{ } + 37:{ } -t2→ 70:{ } 37:{ } -t1→ 74:{ } 38:{ b } → 39:{ } + 39:{ } -n1→ 58:{ } 39:{ } -n2→ 59:{ } 58:{ } → 47:{ } + 59:{ } → 49:{ } 68:{ } → 69:{ } 70:{ } → 68:{ } + 72:{ } → 73:{ } 74:{ } → 72:{ } [alias] analysing instruction: f2(b); [alias] May-aliases after instruction f2(b); are - { a->n1; b->n1 } { a->n2; b->n2 } + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] May-alias graph after instruction f2(b); is - 28:{ a } → 29:{ } 29:{ } -n1→ 50:{ } 29:{ } -n2→ 51:{ } - 29:{ } -t2→ 58:{ } 29:{ } -t1→ 62:{ } 30:{ b } → 31:{ } - 31:{ } -n1→ 50:{ } 31:{ } -n2→ 51:{ } 31:{ } -t1→ 72:{ } - 31:{ } -t2→ 76:{ } 50:{ } → 39:{ } 51:{ } → 41:{ } - 56:{ } → 57:{ } 58:{ } → 56:{ } 60:{ } → 61:{ } - 62:{ } → 60:{ } 70:{ } → 71:{ } 72:{ } → 70:{ } - 74:{ } → 75:{ } 76:{ } → 74:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 58:{ } 37:{ } -n2→ 59:{ } + 37:{ } -t2→ 70:{ } 37:{ } -t1→ 74:{ } 38:{ b } → 39:{ } + 39:{ } -n1→ 58:{ } 39:{ } -n2→ 59:{ } 39:{ } -t1→ 106:{ } + 39:{ } -t2→ 110:{ } 58:{ } → 47:{ } 59:{ } → 49:{ } + 68:{ } → 69:{ } 70:{ } → 68:{ } 72:{ } → 73:{ } + 74:{ } → 72:{ } 104:{ } → 105:{ } 106:{ } → 104:{ } + 108:{ } → 109:{ } 110:{ } → 108:{ } [alias] analysing instruction: __retres = 0; [alias] May-aliases after instruction __retres = 0; are - { a->n1; b->n1 } { a->n2; b->n2 } + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] May-alias graph after instruction __retres = 0; is - 28:{ a } → 29:{ } 29:{ } -n1→ 50:{ } 29:{ } -n2→ 51:{ } - 29:{ } -t2→ 58:{ } 29:{ } -t1→ 62:{ } 30:{ b } → 31:{ } - 31:{ } -n1→ 50:{ } 31:{ } -n2→ 51:{ } 31:{ } -t1→ 72:{ } - 31:{ } -t2→ 76:{ } 50:{ } → 39:{ } 51:{ } → 41:{ } - 56:{ } → 57:{ } 58:{ } → 56:{ } 60:{ } → 61:{ } - 62:{ } → 60:{ } 70:{ } → 71:{ } 72:{ } → 70:{ } - 74:{ } → 75:{ } 76:{ } → 74:{ } -[alias] May-aliases at the end of function main: { a->n1; b->n1 } { a->n2; b->n2 } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 58:{ } 37:{ } -n2→ 59:{ } + 37:{ } -t2→ 70:{ } 37:{ } -t1→ 74:{ } 38:{ b } → 39:{ } + 39:{ } -n1→ 58:{ } 39:{ } -n2→ 59:{ } 39:{ } -t1→ 106:{ } + 39:{ } -t2→ 110:{ } 58:{ } → 47:{ } 59:{ } → 49:{ } + 68:{ } → 69:{ } 70:{ } → 68:{ } 72:{ } → 73:{ } + 74:{ } → 72:{ } 104:{ } → 105:{ } 106:{ } → 104:{ } + 108:{ } → 109:{ } 110:{ } → 108:{ } +[alias] May-aliases at the end of function main: + { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] May-alias graph at the end of function main: - 28:{ a } → 29:{ } 29:{ } -n1→ 50:{ } 29:{ } -n2→ 51:{ } - 29:{ } -t2→ 58:{ } 29:{ } -t1→ 62:{ } 30:{ b } → 31:{ } - 31:{ } -n1→ 50:{ } 31:{ } -n2→ 51:{ } 31:{ } -t1→ 72:{ } - 31:{ } -t2→ 76:{ } 50:{ } → 39:{ } 51:{ } → 41:{ } - 56:{ } → 57:{ } 58:{ } → 56:{ } 60:{ } → 61:{ } - 62:{ } → 60:{ } 70:{ } → 71:{ } 72:{ } → 70:{ } - 74:{ } → 75:{ } 76:{ } → 74:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 36:{ a } → 37:{ } 37:{ } -n1→ 58:{ } 37:{ } -n2→ 59:{ } + 37:{ } -t2→ 70:{ } 37:{ } -t1→ 74:{ } 38:{ b } → 39:{ } + 39:{ } -n1→ 58:{ } 39:{ } -n2→ 59:{ } 39:{ } -t1→ 106:{ } + 39:{ } -t2→ 110:{ } 58:{ } → 47:{ } 59:{ } → 49:{ } + 68:{ } → 69:{ } 70:{ } → 68:{ } 72:{ } → 73:{ } + 74:{ } → 72:{ } 104:{ } → 105:{ } 106:{ } → 104:{ } + 108:{ } → 109:{ } 110:{ } → 108:{ } [alias] Summary of function main: - formals: returns: __retres state: { a->n1; b->n1 } { a->n2; b->n2 } + formals: returns: __retres + state: { __fc_random48_counter; __fc_p_random48_counter } { a->n1; b->n1 } + { a->n2; b->n2 } [alias] analysing function: swap -[alias] May-aliases at the end of function swap: <none> +[alias] May-aliases at the end of function swap: + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph at the end of function swap: - <empty> + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] Summary of function swap: + formals: n returns: <none> + state: { __fc_random48_counter; __fc_p_random48_counter } [alias] Analysis complete diff --git a/src/plugins/alias/tests/real_world/oracle/function1_v2.res.oracle b/src/plugins/alias/tests/real_world/oracle/function1_v2.res.oracle index 23d94fe8cb7ae6d16a7ca4ab9535253349a572cf..d624b1c04f1ce6465a794408afa623386734cca9 100644 --- a/src/plugins/alias/tests/real_world/oracle/function1_v2.res.oracle +++ b/src/plugins/alias/tests/real_world/oracle/function1_v2.res.oracle @@ -1,45 +1,80 @@ [kernel] Parsing function1_v2.c (with preprocessing) +[alias] analysing global variable definiton: __fc_rand_max = + (unsigned long)2147483647; +[alias] May-aliases after global variable definition __fc_rand_max are <none> +[alias] May-alias graph after global variable definition __fc_rand_max is + <empty> +[alias] analysing global variable definiton: __fc_p_random48_counter = + __fc_random48_counter; +[alias] May-aliases after global variable definition __fc_p_random48_counter are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after global variable definition __fc_p_random48_counter + is 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } [alias] analysing function: alias [alias] analysing instruction: *x = *y; -[alias] May-aliases after instruction *x = *y; are { x; y } { *x; *y } +[alias] May-aliases after instruction *x = *y; are + { __fc_random48_counter; __fc_p_random48_counter } { x; y } { *x; *y } [alias] May-alias graph after instruction *x = *y; is - 0:{ x } → 1:{ } 1:{ } → 2:{ } 3:{ y } → 1:{ } -[alias] May-aliases at the end of function alias: { x; y } { *x; *y } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x } → 5:{ } 5:{ } → 6:{ } 7:{ y } → 5:{ } +[alias] May-aliases at the end of function alias: + { __fc_random48_counter; __fc_p_random48_counter } { x; y } { *x; *y } [alias] May-alias graph at the end of function alias: - 0:{ x } → 1:{ } 1:{ } → 2:{ } 3:{ y } → 1:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 4:{ x } → 5:{ } 5:{ } → 6:{ } 7:{ y } → 5:{ } [alias] Summary of function alias: - formals: x y returns: <none> state: { x; y } { *x; *y } + formals: x y returns: <none> + state: { __fc_random48_counter; __fc_p_random48_counter } { x; y } + { *x; *y } [alias] analysing function: main [alias] analysing instruction: int *a = malloc(sizeof(int)); -[alias] May-aliases after instruction int *a = malloc(sizeof(int)); are <none> +[alias] May-aliases after instruction int *a = malloc(sizeof(int)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction int *a = malloc(sizeof(int)); is - 6:{ a } → 7:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 10:{ a } → 11:{ } [alias] analysing instruction: *a = 0; -[alias] May-aliases after instruction *a = 0; are <none> -[alias] May-alias graph after instruction *a = 0; is 6:{ a } → 7:{ } +[alias] May-aliases after instruction *a = 0; are + { __fc_random48_counter; __fc_p_random48_counter } +[alias] May-alias graph after instruction *a = 0; is + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 10:{ a } → 11:{ } [alias] analysing instruction: int *b = malloc(sizeof(int)); -[alias] May-aliases after instruction int *b = malloc(sizeof(int)); are <none> +[alias] May-aliases after instruction int *b = malloc(sizeof(int)); are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction int *b = malloc(sizeof(int)); is - 6:{ a } → 7:{ } 8:{ b } → 9:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 10:{ a } → 11:{ } 12:{ b } → 13:{ } [alias] analysing instruction: *b = 42; -[alias] May-aliases after instruction *b = 42; are <none> +[alias] May-aliases after instruction *b = 42; are + { __fc_random48_counter; __fc_p_random48_counter } [alias] May-alias graph after instruction *b = 42; is - 6:{ a } → 7:{ } 8:{ b } → 9:{ } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 10:{ a } → 11:{ } 12:{ b } → 13:{ } [alias] analysing instruction: alias(& a,& b); -[alias] May-aliases after instruction alias(& a,& b); are { a; b } +[alias] May-aliases after instruction alias(& a,& b); are + { __fc_random48_counter; __fc_p_random48_counter } { a; b } [alias] May-alias graph after instruction alias(& a,& b); is - 6:{ a; b } → 7:{ } 14:{ } → 6:{ a; b } 15:{ } → 6:{ a; b } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 10:{ a; b } → 11:{ } 22:{ } → 10:{ a; b } 23:{ } → 10:{ a; b } [alias] analysing instruction: *a = 7; -[alias] May-aliases after instruction *a = 7; are { a; b } +[alias] May-aliases after instruction *a = 7; are + { __fc_random48_counter; __fc_p_random48_counter } { a; b } [alias] May-alias graph after instruction *a = 7; is - 6:{ a; b } → 7:{ } 14:{ } → 6:{ a; b } 15:{ } → 6:{ a; b } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 10:{ a; b } → 11:{ } 22:{ } → 10:{ a; b } 23:{ } → 10:{ a; b } [alias] analysing instruction: __retres = 0; -[alias] May-aliases after instruction __retres = 0; are { a; b } +[alias] May-aliases after instruction __retres = 0; are + { __fc_random48_counter; __fc_p_random48_counter } { a; b } [alias] May-alias graph after instruction __retres = 0; is - 6:{ a; b } → 7:{ } 14:{ } → 6:{ a; b } 15:{ } → 6:{ a; b } -[alias] May-aliases at the end of function main: { a; b } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 10:{ a; b } → 11:{ } 22:{ } → 10:{ a; b } 23:{ } → 10:{ a; b } +[alias] May-aliases at the end of function main: + { __fc_random48_counter; __fc_p_random48_counter } { a; b } [alias] May-alias graph at the end of function main: - 6:{ a; b } → 7:{ } 14:{ } → 6:{ a; b } 15:{ } → 6:{ a; b } + 0:{ __fc_random48_counter; __fc_p_random48_counter } → 1:{ } + 10:{ a; b } → 11:{ } 22:{ } → 10:{ a; b } 23:{ } → 10:{ a; b } [alias] Summary of function main: - formals: returns: __retres state: { a; b } + formals: returns: __retres + state: { __fc_random48_counter; __fc_p_random48_counter } { a; b } [alias] Analysis complete