-
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
64bf1ca
commit b03ede9
Showing
3 changed files
with
68 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,25 @@ | ||
#include <errno.h> | ||
#include <unistd.h> | ||
|
||
main() | ||
{ | ||
long result; | ||
|
||
errno = 0; | ||
// Examining ARG_MAX limit | ||
if((result = sysconf(_SC_ARG_MAX)) == -1) | ||
{ | ||
if(errno == 0) | ||
{ | ||
__CPROVER_assert(0, "ARG_MAX is not supported"); | ||
} | ||
else | ||
{ | ||
__CPROVER_assert(0, "sysconf() error"); | ||
} | ||
} | ||
else | ||
{ | ||
__CPROVER_assert(0, "ARG_MAX is supported"); | ||
} | ||
} |
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,12 @@ | ||
CORE unix | ||
main.c | ||
|
||
^\[main.assertion.\d+\] line \d+ ARG\_MAX is not supported: FAILURE$ | ||
^\[main.assertion.\d+\] line \d+ sysconf\(\) error: FAILURE$ | ||
^\[main.assertion.\d+\] line \d+ ARG\_MAX is supported: FAILURE$ | ||
^\*\* 3 of 3 failed .*$ | ||
^VERIFICATION FAILED$ | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
-- | ||
^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