Skip to content

Commit 7e1ecf6

Browse files
committed
Add comment about calloc multiplication overflow
1 parent 4be6a4f commit 7e1ecf6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/analyses/base.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,6 +2764,7 @@ struct
27642764
set_many ~man st ((eval_lv ~man st lv, (Cilfacade.typeOfLval lv), Address addr):: blob_set)
27652765
else
27662766
let blobsize = (* only speculative during ID.mul *)
2767+
(* TODO: Since C23, calloc returns NULL when this multiplication would overflow, but int domains don't return overflow information here currently; needs refactor to not produce overflow warnings inside domains *)
27672768
let@ () = GobRef.wrap AnalysisState.executing_speculative_computations true in
27682769
ID.mul (ID.cast_to ~kind:Internal ik @@ sizeval) (ID.cast_to ~kind:Internal ik @@ countval) (* TODO: proper castkind *)
27692770
in

0 commit comments

Comments
 (0)