-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
symex_dynamic::dynamic_object_size* are constants
We do not have a notion of guaranteed constants, thus mark them thread-local via the auxiliary_symbolt constructor. This avoids repeated renaming of the size of an array, which resulted in spurious errors in concurrent programs (e.g., in SV-COMP running "cbmc --unwind 2 --stop-on-fail --32 c/pthread-C-DAC/pthread-numerical-integration_true-unreach-call.i").
- Loading branch information
1 parent
ef83f93
commit b934aaf
Showing
3 changed files
with
32 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <stdlib.h> | ||
#include <pthread.h> | ||
|
||
_Bool set_done; | ||
int *ptr; | ||
|
||
void *set_x(void *arg) | ||
{ | ||
*(int *)arg = 10; | ||
set_done = 1; | ||
} | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
__CPROVER_assume(argc >= sizeof(int)); | ||
ptr = malloc(argc); | ||
__CPROVER_ASYNC_1: set_x(ptr); | ||
__CPROVER_assume(set_done); | ||
assert(*ptr == 10); | ||
return 0; | ||
} |
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,8 @@ | ||
CORE | ||
main.c | ||
|
||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^VERIFICATION SUCCESSFUL$ | ||
-- | ||
^warning: ignoring |
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