Skip to content

Commit

Permalink
Fix pthread_argument int dereference in added examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Sep 20, 2023
1 parent f217bdf commit 43ec2bb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/regression/03-practical/35-thread-binomial-join.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int data = 0;
pthread_mutex_t data_mutex = PTHREAD_MUTEX_INITIALIZER;

void *thread(void *arg) {
int i = *((int*) arg);
int i = arg;
pthread_mutex_lock(&data_mutex);
data = __VERIFIER_nondet_int(); // NORACE
pthread_mutex_unlock(&data_mutex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extern int __VERIFIER_nondet_int();
int *datas;

void *thread(void *arg) {
int i = *((int*) arg);
int i = arg;
datas[i] = __VERIFIER_nondet_int(); // NORACE
return NULL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pthread_mutex_t threads_mask_mutex = PTHREAD_MUTEX_INITIALIZER;
int *datas;

void *thread(void *arg) {
int j = *((int*) arg);
int j = arg;
datas[j] = __VERIFIER_nondet_int(); // NORACE

pthread_mutex_lock(&threads_mask_mutex);
Expand Down

0 comments on commit 43ec2bb

Please sign in to comment.