Skip to content

Commit a75b931

Browse files
author
Simon Tietz
committed
forgot to pull
1 parent b55366c commit a75b931

File tree

4 files changed

+10
-20
lines changed

4 files changed

+10
-20
lines changed

src/analyses/accessAnalysis.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ struct
8080
let ins, outs = Analyses.asm_extract_ins_outs ctx in
8181
let handle_in exp = access_one_top ctx Read false exp in
8282
List.iter handle_in ins;
83-
let handle_out lval = access_one_top ~deref:true ctx Write false (AddrOf lval) in
83+
let handle_out lval = access_one_top ctx Write false (AddrOf lval) in
8484
List.iter handle_out outs;
8585
end;
8686
ctx.local

src/analyses/base.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,9 +1229,8 @@ struct
12291229
| JmpBuf (x, copied, invalid) ->
12301230
if copied then
12311231
M.warn ~category:(Behavior (Undefined Other)) "The jump buffer %a contains values that were copied here instead of being set by setjmp. This is Undefined Behavior." d_exp e;
1232-
(* M.warn ~category:(Behavior (Undefined Other)) "The jump buffer %a was modified by inline assembly. This is may lead to Undefined Behavior." d_exp e; *)
12331232
if invalid then
1234-
M.warn ~category:(Behavior (Undefined Other)) "The jump target %a may have been altered in an inline assembly block." d_exp e;
1233+
M.warn ~category:(Behavior (Undefined Other)) "The jump buffer %a was modified by inline assembly. This is may lead to Undefined Behavior." d_exp e;
12351234
x
12361235
| Top
12371236
| Bot ->

src/analyses/mallocFresh.ml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,13 @@ struct
2929
let assign ctx lval rval =
3030
assign_lval (Analyses.ask_of_ctx ctx) lval ctx.local
3131

32-
let is_relevant_variable v =
33-
(* Check if the variable is a global variable *)
34-
v.vglob
35-
36-
let event ctx e octx =
37-
match e with
38-
| Events.Invalidate {lvals} ->
39-
(* Perform invalidation for mallocFresh analysis *)
40-
let updated_locals = List.fold_left (fun acc lval ->
41-
(* Check if lval is relevant to mallocFresh analysis and update the domain accordingly *)
42-
match lval with
43-
| (Var v, _) when is_relevant_variable v -> D.remove v acc
44-
| _ -> acc
45-
) ctx.local lvals in
46-
updated_locals
47-
| _ -> ctx.local
32+
let event ctx e octx =
33+
match e with
34+
| Events.Invalidate {lvals} ->
35+
let ask = Analyses.ask_of_ctx ctx in
36+
let handle_lval local lval = assign_lval ask lval local in
37+
List.fold_left handle_lval ctx.local lvals
38+
| _ -> ctx.local
4839

4940
let combine_env ctx lval fexp f args fc au f_ask =
5041
ctx.local (* keep local as opposed to IdentitySpec *)

src/goblint.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ let main () =
6161
(* This is run independant of the autotuner being enabled or not be sound for programs with longjmp *)
6262
AutoTune.activateLongjmpAnalysesWhenRequired ();
6363
if get_bool "ana.autotune.enabled" then AutoTune.chooseConfig file;
64-
file |> do_analyze changeInfo;
64+
file |> do_analyze changeInfo;
6565
do_html_output ();
6666
do_gobview file;
6767
do_stats ();

0 commit comments

Comments
 (0)