-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b4b255
commit 896f236
Showing
2 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// SKIP PARAM: --set ana.activated[+] apron --set ana.relation.privatization mutex-meet-atomic --set ana.apron.domain interval --set sem.int.signed_overflow assume_none | ||
// Checks that assinging to malloc'ed memory does not cause both branches to be dead | ||
#include <pthread.h> | ||
#include <goblint.h> | ||
void nop(void* arg) { | ||
} | ||
|
||
void main() { | ||
pthread_t thread; | ||
pthread_create(&thread, 0, &nop, 0); | ||
|
||
long *k = malloc(sizeof(long)); | ||
*k = 5; | ||
if (1) | ||
; | ||
|
||
__goblint_check(*k >= 5); // Reachable and true | ||
|
||
*k = *k+1; | ||
__goblint_check(*k >= 5); // Reachable and true | ||
} |