We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7747c9 commit 48ba6afCopy full SHA for 48ba6af
tests/regression/13-privatized/89-traces-ex-10.c
@@ -0,0 +1,30 @@
1
+#include <pthread.h>
2
+#include <goblint.h>
3
+
4
+int g = 7; // matches precise read
5
+pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
6
+pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
7
8
+void *t_fun(void *arg) {
9
+ pthread_mutex_lock(&A);
10
+ pthread_mutex_lock(&B);
11
+ g = 42;
12
+ pthread_mutex_unlock(&B);
13
+ g = 7;
14
+ pthread_mutex_unlock(&A);
15
+ return NULL;
16
+}
17
18
+int main(void) {
19
+ pthread_t id;
20
+ pthread_create(&id, NULL, t_fun, NULL);
21
22
23
+ // __goblint_check(g == 7); // UNKNOWN!
24
25
26
27
28
+ __goblint_check(g == 7);
29
+ return 0;
30
0 commit comments