Skip to content

Commit 4b18694

Browse files
authored
Merge pull request #1799 from goblint/issue-1798
Fix copy-paste typo in interval set overflow handling
2 parents ec3917d + 7c5b772 commit 4b18694

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/cdomain/value/cdomains/int/intervalSetDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ struct
167167
let res = List.map (norm_interval ~suppress_ovwarn ~cast ik) xs in
168168
let intvs = List.concat_map fst res in
169169
let underflow = List.exists (fun (_,{underflow; _}) -> underflow) res in
170-
let overflow = List.exists (fun (_,{overflow; _}) -> underflow) res in
170+
let overflow = List.exists (fun (_,{overflow; _}) -> overflow) res in
171171
(canonize intvs,{underflow; overflow})
172172

173173
let binary_op_with_norm op (ik:ikind) (x: t) (y: t) : t*overflow_info = match x, y with
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// PARAM: --enable ana.int.interval_set
2+
int count_int_int;
3+
void main() {
4+
for (;; count_int_int++) // WARN (overflow)
5+
;
6+
}

0 commit comments

Comments
 (0)