We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e52b3c0 commit af65ce4Copy full SHA for af65ce4
1 file changed
src/cdomains/unionDomain.ml
@@ -38,12 +38,13 @@ struct
38
end
39
(* invariant for one field *)
40
| Field (f, offset) ->
41
- let c_lval = Option.get lval in
42
begin match lift_f with
43
| `Lifted f' ->
44
let v = Values.cast ~torg:f'.ftype f.ftype v in
45
- let f_lval = Cil.addOffsetLval (Field (f, NoOffset)) c_lval in
46
- value_invariant ~offset ~lval:(Some f_lval) v
+ (* Do not add the field offset to lval here:
+ Otherwise, for pointers to a member type of the union, this would
+ generate an assertion with illegal field offset. *)
47
+ value_invariant ~offset ~lval:lval v
48
| `Top
49
| `Bot ->
50
Invariant.none
0 commit comments