Skip to content

Commit c26c83e

Browse files
committed
Make test for suppressing thread-unsafe lib fun calls check more cases
1 parent ee33a80 commit c26c83e

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
// PARAM: --enable allglobs
2-
1+
// PARAM: --enable allglobs --set ana.activated[+] threadJoins
32
#include <stdlib.h>
3+
#include <pthread.h>
4+
5+
void *t_benign(void *arg) {
6+
return NULL;
7+
}
48

59
int main() {
10+
rand();
11+
pthread_t id;
12+
pthread_create(&id, NULL, t_benign, NULL);
13+
pthread_join(id, NULL);
614
rand();
715
return 0;
816
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
$ goblint --enable allglobs 52-thread-unsafe-libfuns-single-thread.c
1+
$ goblint --enable allglobs --set ana.activated[+] threadJoins 52-thread-unsafe-libfuns-single-thread.c
22
[Info][Deadcode] Logical lines of code (LLoC) summary:
3-
live: 3
3+
live: 8
44
dead: 0
5-
total lines: 3
5+
total lines: 8

0 commit comments

Comments
 (0)