You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Cleanup `option` related code
* relationAnalysis: Drastically simplify `pass_to_callee`
* Simplify some things in `relationAnalysis`
* Remove custom `default` function from `arrayDomain`
* Simplification in `addressDomain`
* Further cleanup
* Some further obvious cases
* Undo eta expansion
Co-authored-by: Simmo Saan <simmo.saan@gmail.com>
* Indentation
Co-authored-by: Simmo Saan <simmo.saan@gmail.com>
* Indentation
* Add TODO back
* Add comment back
* Indentation
---------
Co-authored-by: Simmo Saan <simmo.saan@gmail.com>
ifRD.Tracked.type_tracked (Cilfacade.fundec_return_type f) then (
360
+
ifRD.Tracked.type_tracked (Cilfacade.fundec_return_type f) then
363
361
let rel' =RD.add_vars st.rel [RV.return] in
364
-
match e with
365
-
|Somee ->
362
+
Option.map_default (fune ->
366
363
assign_from_globals_wrapper ask man.global {st with rel = rel'} e (funrel'e' ->
367
364
RD.assign_exp ask rel' RV.return e' (no_overflow ask e)
368
-
)
369
-
|None ->
370
-
rel' (* leaves V.return unconstrained *)
371
-
)
365
+
)
366
+
) rel' e
367
+
(* default value rel' leaves V.return unconstrained *)
372
368
else
373
369
RD.copy st.rel
374
370
in
@@ -426,7 +422,7 @@ struct
426
422
let tainted_vars =TaintPartialContexts.conv_varset tainted in
427
423
let new_rel =RD.keep_filter st.rel (funvar ->
428
424
matchRV.find_metadata var with
429
-
|Some (Local _) whennot (pass_to_callee fundec any_local_reachable var) -> true(* keep caller locals, provided they were not passed to the function *)
425
+
|Some (Local_) whennot (belongs_to_fundec fundec var|| any_local_reachable) -> true(* keep caller locals, provided they were not passed to the function *)
430
426
|Some (Arg _) -> true(* keep caller args *)
431
427
|Some ((Local_ | Global_)) whennot (RD.mem_var new_fun_rel var) -> false(* remove locals and globals, for which no record exists in the new_fun_apr *)
432
428
|Some ((Localv | Globalv)) whennot (TaintPartialContexts.VS.mem v tainted_vars) -> true(* keep locals and globals, which have not been touched by the call *)
0 commit comments