-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds an over-approximation model for sysconf
Signed-off-by: Felipe R. Monteiro <[email protected]>
- Loading branch information
1 parent
da48fba
commit 99b4ea8
Showing
3 changed files
with
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <errno.h> | ||
#include <unistd.h> | ||
|
||
int main() | ||
{ | ||
errno = 0; | ||
long result = sysconf(_SC_ARG_MAX); | ||
__CPROVER_assert( | ||
!(errno == EINVAL) || (result == -1), | ||
"Non-deterministically set errno to EINVAL"); | ||
} |
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,9 @@ | ||
CORE | ||
main.c | ||
|
||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^\[main.assertion.\d+\] .* Non-deterministically set errno to EINVAL: SUCCESS$ | ||
^\*\* 0 of 1 failed | ||
-- | ||
^WARNING: no body for function sysconf |
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