We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
meet
1 parent c1b7284 commit 3eff22fCopy full SHA for 3eff22f
src/cdomain/value/cdomains/addressDomain.ml
@@ -112,6 +112,7 @@ struct
112
113
let amenable_to_meet x y = match x,y with
114
| StrPtr _, StrPtr _ -> true
115
+ | Addr x, Addr y when Mval.equal (Mval.top_indices x) (Mval.top_indices y) -> true
116
| _ -> false
117
118
let leq x y = match x, y with
tests/regression/27-inv_invariants/22-meet-ptrs.c
@@ -0,0 +1,24 @@
1
+//PARAM: --enable ana.int.interval
2
+#include <stdio.h>
3
+#include <stdlib.h>
4
+#include <time.h>
5
+
6
7
+int main() {
8
+ int arr[20];
9
10
+ int top;
11
12
+ int i = 2;
13
+ if(top) {
14
+ i = 8;
15
+ }
16
17
+ int* imprecise = &arr[i];
18
19
+ if(imprecise == &arr[2]) {
20
+ __goblint_check(imprecise == &arr[2]);
21
22
23
+ return 0;
24
+}
0 commit comments