Skip to content

Commit cc6efe6

Browse files
committed
Fix lval type in base globals initialization
The bot_value is constructed for the variable, but update_offset goes deeper into fields.
1 parent 01ac79a commit cc6efe6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/analyses/base.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2002,7 +2002,7 @@ struct
20022002
let t = v.vtype in
20032003
let iv = VD.bot_value ~varAttr:v.vattr t in (* correct bottom value for top level variable *)
20042004
if M.tracing then M.tracel "set" "init bot value (%a): %a" d_plaintype t VD.pretty iv;
2005-
let nv = VD.update_offset (Queries.to_value_domain_ask (Analyses.ask_of_man man)) iv offs rval_val (Some (Lval lval)) lval t in (* do desired update to value *)
2005+
let nv = VD.update_offset (Queries.to_value_domain_ask (Analyses.ask_of_man man)) iv offs rval_val (Some (Lval lval)) lval lval_t in (* do desired update to value *)
20062006
set_savetop ~man man.local (AD.of_var v) lval_t nv ~lval_raw:lval ~rval_raw:rval (* set top-level variable to updated value *)
20072007
| _ ->
20082008
set_savetop ~man man.local lval_val lval_t rval_val ~lval_raw:lval ~rval_raw:rval

0 commit comments

Comments
 (0)