-
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.
Apron: Do not produce invariants about stale locals that have escaped
- Loading branch information
1 parent
cf2641f
commit 775c15f
Showing
3 changed files
with
44 additions
and
0 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,22 @@ | ||
// PARAM: --set ana.activated[+] apron --set ana.path_sens[+] threadflag --set ana.relation.privatization mutex-meet-tid-cluster12 --set witness.yaml.validate 95-witness-mm-escape.yml | ||
#include<pthread.h> | ||
int *b; | ||
pthread_mutex_t e; | ||
|
||
void* other(void* arg) { | ||
pthread_mutex_lock(&e); | ||
*b = -100; | ||
pthread_mutex_unlock(&e); | ||
|
||
return NULL; | ||
} | ||
|
||
void main() { | ||
pthread_t t; | ||
pthread_create(&t, NULL, other, NULL); | ||
int g = 8; | ||
|
||
b = &g; | ||
|
||
pthread_mutex_lock(&e); | ||
} |
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,18 @@ | ||
$ goblint --disable ana.dead-code.lines --disable warn.race --disable warn.behavior --set ana.activated[+] apron --set ana.path_sens[+] threadflag --set ana.relation.privatization mutex-meet-tid-cluster12 --enable witness.yaml.enabled --disable witness.invariant.other --disable witness.invariant.loop-head 96-witness-mm-escape2.c --set witness.yaml.path 96-witness-mm-escape2.yml | ||
[Info][Witness] witness generation summary: | ||
total generation entries: 5 | ||
|
||
$ goblint --disable ana.dead-code.lines --disable warn.race --disable warn.behavior --set ana.activated[+] apron --set ana.path_sens[+] threadflag --set ana.relation.privatization mutex-meet-tid-cluster12 --set witness.yaml.validate 96-witness-mm-escape2.yml 96-witness-mm-escape2.c | ||
[Success][Witness] invariant confirmed: (unsigned long )arg == 0UL (96-witness-mm-escape2.c:8:5) | ||
[Success][Witness] invariant confirmed: -128 <= g (96-witness-mm-escape2.c:22:1) | ||
[Success][Witness] invariant confirmed: g <= 127 (96-witness-mm-escape2.c:22:1) | ||
[Success][Witness] invariant confirmed: g != 0 (96-witness-mm-escape2.c:22:1) | ||
[Info][Witness] witness validation summary: | ||
confirmed: 8 | ||
unconfirmed: 0 | ||
refuted: 0 | ||
error: 0 | ||
unchecked: 0 | ||
unsupported: 0 | ||
disabled: 0 | ||
total validation entries: 8 |