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
Copy file name to clipboardExpand all lines: src/cdomain/value/cdomains/valueDomain.ml
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -438,24 +438,24 @@ struct
438
438
function
439
439
|Addr.Addr ({ vtype; _}asv, o) asa ->
440
440
beginmatchCil.unrollType vtype, Cil.unrollType t with
441
-
(* only allow conversion of float pointers if source and target type are the same *)
442
-
|TFloat (fkind, _), TFloat (fkind', _) when fkind = fkind' -> a
443
-
(* do not allow conversion from/to float pointers*)
444
-
|TFloat _, _
445
-
|_, TFloat_ -> UnknownPtr
446
-
|TVoid_, _whennot (Cilfacade.isCharType t) -> (* we had no information about the type (e.g. malloc), so we add it; ignore for casts to char* since they're special conversions (N1570 6.3.2.3.7) *)
447
-
Addr ({ v with vtype = t }, o) (* HACK: equal varinfo with different type, causes inconsistencies down the line, when we again assume vtype being "right", but joining etc gives no consideration to which type version to keep *)
448
-
|_, _ ->
449
-
begintryAddr (v, (adjust_offs v o None)) (* cast of one address by adjusting the abstract offset *)
450
-
with
451
-
|CastErrors -> (* don't know how to handle this cast :( *)
452
-
ifM.tracing thenM.tracel "caste""%s" s;
453
-
a (* probably garbage, but this is deref's problem *)
454
-
(*raise (CastError s)*)
455
-
|SizeOfError (s,t) ->
456
-
M.warn "size of error: %s" s;
457
-
a
458
-
end
441
+
(* only allow conversion of float pointers if source and target type are the same *)
442
+
|TFloat (fkind, _), TFloat (fkind', _) when fkind = fkind' -> a
443
+
(* do not allow conversion from/to float pointers*)
444
+
|TFloat _, _
445
+
|_, TFloat_ -> UnknownPtr
446
+
|TVoid_, _whennot (Cilfacade.isCharType t) -> (* we had no information about the type (e.g. malloc), so we add it; ignore for casts to char* since they're special conversions (N1570 6.3.2.3.7) *)
447
+
Addr ({ v with vtype = t }, o) (* HACK: equal varinfo with different type, causes inconsistencies down the line, when we again assume vtype being "right", but joining etc gives no consideration to which type version to keep *)
448
+
|_, _ ->
449
+
begintryAddr (v, (adjust_offs v o None)) (* cast of one address by adjusting the abstract offset *)
450
+
with
451
+
|CastErrors -> (* don't know how to handle this cast :( *)
452
+
ifM.tracing thenM.tracel "caste""%s" s;
453
+
a (* probably garbage, but this is deref's problem *)
454
+
(*raise (CastError s)*)
455
+
|SizeOfError (s,t) ->
456
+
M.warn "size of error: %s" s;
457
+
a
458
+
end
459
459
end
460
460
|x -> x (* TODO we should also keep track of the type here *)
0 commit comments