|
|
@ -795,6 +795,7 @@ type inst =
|
|
|
|
| Itaint
|
|
|
|
| Itaint
|
|
|
|
| Iupdate of zero_flag * null_case_flag * int * path_pos
|
|
|
|
| Iupdate of zero_flag * null_case_flag * int * path_pos
|
|
|
|
| Ireturn_from_call of int
|
|
|
|
| Ireturn_from_call of int
|
|
|
|
|
|
|
|
| Ireturn_from_pointer_wrapper_call of int
|
|
|
|
|
|
|
|
|
|
|
|
(** structured expressions represent a value of structured type, such as an array or a struct. *)
|
|
|
|
(** structured expressions represent a value of structured type, such as an array or a struct. *)
|
|
|
|
type strexp =
|
|
|
|
type strexp =
|
|
|
@ -2456,6 +2457,7 @@ let inst_new_loc loc inst = match inst with
|
|
|
|
| Itaint -> inst
|
|
|
|
| Itaint -> inst
|
|
|
|
| Iupdate (zf, ncf, _, pos) -> Iupdate (zf, ncf, loc.Location.line, pos)
|
|
|
|
| Iupdate (zf, ncf, _, pos) -> Iupdate (zf, ncf, loc.Location.line, pos)
|
|
|
|
| Ireturn_from_call _ -> Ireturn_from_call loc.Location.line
|
|
|
|
| Ireturn_from_call _ -> Ireturn_from_call loc.Location.line
|
|
|
|
|
|
|
|
| Ireturn_from_pointer_wrapper_call _ -> Ireturn_from_pointer_wrapper_call loc.Location.line
|
|
|
|
|
|
|
|
|
|
|
|
(** return a string representing the inst *)
|
|
|
|
(** return a string representing the inst *)
|
|
|
|
let inst_to_string inst =
|
|
|
|
let inst_to_string inst =
|
|
|
@ -2480,6 +2482,7 @@ let inst_to_string inst =
|
|
|
|
| Iupdate (zf, ncf, n, _) ->
|
|
|
|
| Iupdate (zf, ncf, n, _) ->
|
|
|
|
"update:" ^ zero_flag_to_string zf ^ null_case_flag_to_string ncf ^ string_of_int n
|
|
|
|
"update:" ^ zero_flag_to_string zf ^ null_case_flag_to_string ncf ^ string_of_int n
|
|
|
|
| Ireturn_from_call n -> "return_from_call: " ^ string_of_int n
|
|
|
|
| Ireturn_from_call n -> "return_from_call: " ^ string_of_int n
|
|
|
|
|
|
|
|
| Ireturn_from_pointer_wrapper_call n -> "Ireturn_from_pointer_wrapper_call: " ^ string_of_int n
|
|
|
|
|
|
|
|
|
|
|
|
(** join of instrumentations *)
|
|
|
|
(** join of instrumentations *)
|
|
|
|
let inst_partial_join inst1 inst2 =
|
|
|
|
let inst_partial_join inst1 inst2 =
|
|
|
@ -2511,7 +2514,8 @@ let inst_zero_flag = function
|
|
|
|
| Irearrange (zf, _, _, _) -> zf
|
|
|
|
| Irearrange (zf, _, _, _) -> zf
|
|
|
|
| Itaint -> None
|
|
|
|
| Itaint -> None
|
|
|
|
| Iupdate (zf, _, _, _) -> zf
|
|
|
|
| Iupdate (zf, _, _, _) -> zf
|
|
|
|
| Ireturn_from_call _ -> None
|
|
|
|
| Ireturn_from_call _
|
|
|
|
|
|
|
|
| Ireturn_from_pointer_wrapper_call _ -> None
|
|
|
|
|
|
|
|
|
|
|
|
(** Set the null case flag of the inst. *)
|
|
|
|
(** Set the null case flag of the inst. *)
|
|
|
|
let inst_set_null_case_flag = function
|
|
|
|
let inst_set_null_case_flag = function
|
|
|
@ -2554,6 +2558,7 @@ let update_inst inst_old inst_new =
|
|
|
|
let zf' = combine_zero_flags (inst_zero_flag inst_old) zf in
|
|
|
|
let zf' = combine_zero_flags (inst_zero_flag inst_old) zf in
|
|
|
|
Iupdate (zf', ncf, n, pos)
|
|
|
|
Iupdate (zf', ncf, n, pos)
|
|
|
|
| Ireturn_from_call _ -> inst_new
|
|
|
|
| Ireturn_from_call _ -> inst_new
|
|
|
|
|
|
|
|
| Ireturn_from_pointer_wrapper_call _ -> inst_new
|
|
|
|
|
|
|
|
|
|
|
|
(** describe an instrumentation with a string *)
|
|
|
|
(** describe an instrumentation with a string *)
|
|
|
|
let pp_inst pe f inst =
|
|
|
|
let pp_inst pe f inst =
|
|
|
|